klibc-bot for Bill Wendling
2020-Jul-25 20:57 UTC
[klibc] [klibc:master] Kbuild: Add "-fcommon" for clang builds
Commit-ID: cfa1174baa1cd74525484afd4a9e5840dc08dfb9
Gitweb:
http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=cfa1174baa1cd74525484afd4a9e5840dc08dfb9
Author: Bill Wendling <morbo at google.com>
AuthorDate: Sun, 29 Mar 2020 04:38:32 -0700
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 25 Jul 2020 20:45:34 +0100
[klibc] Kbuild: Add "-fcommon" for clang builds
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>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
scripts/Kbuild.klibc | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index ce646212..82c74ea7 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 :=
Maybe Matching Threads
- [klibc:master] Kbuild: add support for clang builds
- [PATCH v2 4/5] Kbuild: Add "-fcommon" for clang builds
- [kvm-unit-tests PATCH v3 1/4] Kbuild: add support for clang builds
- [PATCH v2 3/5] Kbuild: use "libc.a" with clang
- [PATCH] kbuild: add -ffreestanding to required flags
