Port-arm archive

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

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



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

#   compile  libcrypto/aes-armv4.pico
/netbsd_build/tools.evbarm/bin/armv7--netbsdelf-eabihf-gcc  -DELF -mcpu=cortex-a53 -fPIE -fstack-protector -Wstack-protector   --param ssp-buffer-size=1    --sysroot=/netbsd_build/obj.evbarm/destdir.evbarm -Dlibcrypto -I. -I/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist/crypto -I/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist -I/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist/include -I/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist/crypto/include -I/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist/crypto/asn1 -I/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist/crypto/evp -I/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist/crypto/modes -I/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist/../include -DOPENSSLDIR=\"/etc/openssl\" -DENGINESDIR=\"/usr/lib/openssl\" -DDSO_DLFCN -DHAVE_DLFCN_H -D__ARM_MAX_ARCH__=7 -DBF_PTR -DBN_LLONG="long long" -DOPENSSL_B
 N_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DDES_INT -DDES_UNROLL  -D_FORTIFY_SOURCE=2 -x assembler-with-cpp -c -fPIC   -I/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist/crypto/aes -DAES_ASM -DBSAES_ASM /netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S -o aes-armv4.pico
In file included from /netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S:43:0:
/netbsd_build/netbsd-current-src/crypto/external/bsd/openssl/dist/crypto/arm_arch.h:65:4: error: #error "__ARM_MAX_ARCH__ can't be less than __ARM_ARCH__"
 #  error "__ARM_MAX_ARCH__ can't be less than __ARM_ARCH__"
    ^~~~~
*** [aes-armv4.pico] Error code 1

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?


Home | Main Index | Thread Index | Old Index