Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Setting -mcpu=cortex-a53 breaks build in openssl/lib/libcrypto



On Sun, 19 May 2019 00:59:45 -0400
Michael <macallan%netbsd.org@localhost> wrote:

> Hello,
> 
> On Sat, 18 May 2019 21:17:58 +0100
> Sad Clouds <cryintothebluesky%gmail.com@localhost> wrote:
> 
> > Trying to optimize for Raspberry Pi 3 B+ when building 32-bit. So
> > have the following in mk.conf
> > 
> > # If no specific architecture is requested, then set to cortex-a53
> > .if empty(CPUFLAGS:M-march=*) && empty(CPUFLAGS:M-mcpu=*)
> > CPUFLAGS+=-mcpu=cortex-a53
> > .else
> > CPUFLAGS+=-mtune=cortex-a53
> > .endif
> > 
> > however this gives the following error
> ...
> > Well, changing -mcpu to -mtune avoids the above error, but does
> > anyone think this is a bug in openssl, that you can't build it with
> > -mcpu flag?
> 
> I think you need -m32 too since -mcpu=cortex-a53 implies a 64bit CPU.
> 
> have fun
> Michael

I don't think it does imply 64-bit CPU, if your compiler was built to
generate 32-bit code, setting -mcpu=cortex-a53 will generate 32-bit code,
that's how I build packages from pkgsrc.
Anyway, adding COPTS+=-m32 results in a different error

/netbsd_build/tools.evbarm/bin/armv7--netbsdelf-eabihf-gcc -O2   -fPIE -m32   -std=gnu99    -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wsystem-headers   -Wno-traditional   -Wa,--fatal-warnings  -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2  -Wno-format-zero-length  -Werror  -mcpu=cortex-a53   --sysroot=/netbsd_build/obj.evbarm/destdir.evbarm -I/netbsd_build/netbsd-current-src/lib/csu/arch/earm -DHAVE_INITFINI_ARRAY -DELF_NOTE_MARCH_DESC=\"earmv7hf\" -I/netbsd_build/netbsd-current-src/lib/csu/common -I.  -c -fPIC -DMCRT0 /netbsd_build/netbsd-current-src/lib/csu/common/crt0-common.c -o gcrt0.o.c.o
armv7--netbsdelf-eabihf-gcc: error: unrecognized command line option '-m32'
*** [gcrt0.o] Error code 1

nbmake[7]: stopped in /netbsd_build/netbsd-current-src/lib/csu
1 error


Home | Main Index | Thread Index | Old Index