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 May 18, 2019, at 1:17 PM, Sad Clouds <cryintothebluesky%gmail.com@localhost> wrote:
> 
> 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?

I guess that's happening here is that you configured GCC for ARMv7, so __ARM_MAX_ARCH__ is being set to 7, but when you say -mcpu=cortex-a53, you're saying "Hey, I want to use an ARMv8 CPU", so __ARM_ARCH_8A__ gets defined, and thus __ARM_ARCH__ winds up being 8 due to the checks in OpenSSL's arm_arch.h.

Seems like this is just two quirks (one in GCC, one in OpenSSL) interacting badly.  I'd suggest just going with -mtune=cortex-a53.

-- thorpej



Home | Main Index | Thread Index | Old Index