[klibc] [kvm-unit-tests PATCH v3 3/4] Kbuild: Add "-fcommon" for clang builds
Bill Wendling
morbo at google.com
Sun Mar 29 04:38:32 PDT 2020
Clang defaults to "-fno-common" which causes linking errors because of
duplicate symbols in the BSS section.
Signed-off-by: Bill Wendling <morbo at google.com>
---
scripts/Kbuild.klibc | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index ca2539d6..59cc7cf4 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -70,6 +70,7 @@ KLIBCREQFLAGS := $(call cc-option, -fno-stack-protector, ) \
$(call cc-option, -fwrapv, ) \
$(call cc-option, -fno-PIE, ) \
$(call cc-option, -fno-builtin-bcmp, ) \
+ $(call cc-option, -fcommon, ) \
-ggdb
KLIBCARCHREQFLAGS :=
KLIBCOPTFLAGS :=
--
2.26.0.rc2.310.g2932bb562d-goog
More information about the klibc
mailing list