git: 4c0dfd5959bd - main - arm: fail early on gcc builds
- Reply: John Baldwin : "Re: git: 4c0dfd5959bd - main - arm: fail early on gcc builds"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 May 2024 16:01:28 UTC
The branch main has been updated by brooks:
URL: https://cgit.FreeBSD.org/src/commit/?id=4c0dfd5959bd499754e3fc9a7ce37c1d5ece31f7
commit 4c0dfd5959bd499754e3fc9a7ce37c1d5ece31f7
Author: Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-05-17 15:47:22 +0000
Commit: Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-05-17 16:01:19 +0000
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
---
Makefile.inc1 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Makefile.inc1 b/Makefile.inc1
index 0728df1221a0..1bf4212b1d5e 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -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"