Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Oct 2019 00:55:08 +0100
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        ports-list freebsd <freebsd-ports@freebsd.org>
Subject:   Re: security/nss (from head -r515742): build failure for poudriere-devel based amd64->armv7 (cortex-a7) cross build, it tried to build aes-armv8.c and failed
Message-ID:  <36fd-oiar-wny@FreeBSD.org>
In-Reply-To: <B486E2E0-8880-48B3-9525-6AA9769B3BB5@yahoo.com> (Mark Millard's message of "Sun, 27 Oct 2019 16:24:16 -0700")
References:  <B486E2E0-8880-48B3-9525-6AA9769B3BB5.ref@yahoo.com> <B486E2E0-8880-48B3-9525-6AA9769B3BB5@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Millard <marklmi@yahoo.com> writes:

> For some reason security/nss tried to build "-march=armv8-a -mfpu=crypto-neon-fp-armv8 aes-armv8.c"
> material when targeting armv7 (cortex-a7). This did not go well . . .

ARMv8 isn't limited to 64-bit mode. NSS 3.47 builds fine on 12.0 armv7, see
http://www.ipv6proxy.net/go.php?u=http://beefy13.nyi.freebsd.org/data/120armv7-quarterly/515271/logs/nss-3.47.log

$ clang -target armv7-unknown-freebsd13.0-gnueabihf \
  -march=armv8-a -mfpu=crypto-neon-fp-armv8 \
  -dM -E -</dev/null | fgrep -i feature
#define __ARM_FEATURE_CLZ 1
#define __ARM_FEATURE_CRC32 1
#define __ARM_FEATURE_CRYPTO 1   <-- Required by NSS
#define __ARM_FEATURE_DIRECTED_ROUNDING 1
#define __ARM_FEATURE_DSP 1
#define __ARM_FEATURE_FMA 1
#define __ARM_FEATURE_IDIV 1
#define __ARM_FEATURE_LDREX 0xf
#define __ARM_FEATURE_NUMERIC_MAXMIN 1
#define __ARM_FEATURE_QBIT 1
#define __ARM_FEATURE_SAT 1
#define __ARM_FEATURE_SIMD32 1

> /nxb-bin/usr/bin/cc ... -O2 -pipe -mcpu=cortex-a7 ...
> aes-armv8.c:13:2: error: "Compiler option is invalid"
> #error "Compiler option is invalid"
>  ^
> aes-armv8.c:65:17: error: implicit declaration of function 'vaeseq_u8' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>         state = vaeseq_u8(state, key1);
>                 ^

-mcpu=cortex-a7 is not part of vendor CFLAGS. Did you define CPUTYPE or
similar in make.conf(5) ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36fd-oiar-wny>