aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc124
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 0728df1221a0..90439adcbc09 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -172,6 +172,30 @@ 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"
+_GCC_BROKEN="https://reviews.freebsd.org/D36754"
+.endif
+.if ${TARGET_ARCH} == "powerpc"
+_GCC_BROKEN=Missing atomic builtins in libc++.
+.endif
+.if ${TARGET_ARCH:Mpowerpc64*}
+_GCC_BROKEN=libsys.so.7.full has a LOAD segment with RWX permissions.
+.endif
+.if ${TARGET} == "riscv"
+_GCC_BROKEN=boot code linker script issues.
+.endif
+.if defined(_GCC_BROKEN)
+.warning Target ${TARGET} is broken with GCC: ${_GCC_BROKEN}
+.if defined(TRY_GCC_BROKEN)
+.warning Trying build anyway.
+.else
+.error Avoiding broken build. Define TRY_GCC_BROKEN to try anyway.
+.endif
+.endif
+.endif
+
.if ${.MAKE.OS} != "FreeBSD"
CROSSBUILD_HOST=${.MAKE.OS}
.if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin"