aboutsummaryrefslogtreecommitdiff
path: root/share/mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/bsd.compiler.mk9
-rw-r--r--share/mk/bsd.sys.mk2
2 files changed, 9 insertions, 2 deletions
diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk
index 681f6ffec14c..757361a566dd 100644
--- a/share/mk/bsd.compiler.mk
+++ b/share/mk/bsd.compiler.mk
@@ -235,7 +235,14 @@ ${X_}COMPILER_FEATURES+= c++11 c++14
${X_}COMPILER_FEATURES+= c++17
.endif
.if ${${X_}COMPILER_TYPE} == "clang"
-${X_}COMPILER_FEATURES+= compressed-debug retpoline init-all
+${X_}COMPILER_FEATURES+= retpoline init-all
+# PR257638 lld fails with BE compressed debug. Fixed in main but external tool
+# chains will initially not have the fix. For now limit the feature to LE
+# targets.
+.include <bsd.endian.mk>
+.if ${TARGET_ENDIANNESS} == "1234"
+${X_}COMPILER_FEATURES+= compressed-debug
+.endif
.endif
.if ${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 100000 || \
(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 80100)
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 031d49bbaca2..a964cf6e596c 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -247,7 +247,7 @@ CFLAGS+= ${SSP_CFLAGS}
# Additional flags passed in CFLAGS and CXXFLAGS when MK_DEBUG_FILES is
# enabled.
-DEBUG_FILES_CFLAGS?= -g
+DEBUG_FILES_CFLAGS?= -g -gz=zlib
# Allow user-specified additional warning flags, plus compiler and file
# specific flag overrides, unless we've overridden this...