arm: fail early on gcc builds

Since at least 2022 (see https://reviews.freebsd.org/D36754), it has
not been possible to build armv6/armv7 with gcc due to atomics macros
gcc doesn't like.  Prevent developers doing due diligance from wasting
time and CPU cycles on this combination as it just fails to build in
libc.

Reviewed by:	imp, andrew
Differential Revision:	https://reviews.freebsd.org/D45193
This commit is contained in:
Brooks Davis 2024-05-17 16:47:22 +01:00
parent 16d8dfde0c
commit 4c0dfd5959

View File

@ -172,6 +172,13 @@ LIBCOMPAT_INCLUDE_DIRS+= i386
LIBCOMPAT_INCLUDE_DIRS+= arm
.endif
.if ((defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == "gcc") || \
(!defined(X_COMPILER_TYPE) && ${COMPILER_TYPE} == "gcc"))
.if ${TARGET} == "arm"
.error "armv6/armv7 build are broken with gcc. See https://reviews.freebsd.org/D36754"
.endif
.endif
.if ${.MAKE.OS} != "FreeBSD"
CROSSBUILD_HOST=${.MAKE.OS}
.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin"