diff options
author | Manoj Gupta <manojgupta@google.com> | 2020-03-13 10:33:13 -0700 |
---|---|---|
committer | Manoj Gupta <manojgupta@chromium.org> | 2020-03-13 21:57:47 +0000 |
commit | 99b3ff928b1c000980d331f30174614484095d37 (patch) | |
tree | 9dc95db6f7026a61d26f8e1c543550e5ebf0d38f /compiler_wrapper/config.go | |
parent | fbb16169c0cb546b48c849ec06853018a2cf1e22 (diff) | |
download | toolchain-utils-99b3ff928b1c000980d331f30174614484095d37.tar.gz |
compiler_wrapper: Add "-fcommon" to clang invocations
Clang ToT has switched to "-fno-common" as default to match GCC 10 which
breaks many packages. Upgrading to ToT versions of many packages does not
fix the problem as packages upstream have not fixed them yet.
Pass "-fcommon" in compiler wrapper to workaround this for now.
This does not change the current clang behavior which defaults to
"-fcommon" so this is a NFC.
BUG=chromium:1060413
TEST=packages build with ToT clang; NFC for current clang
Change-Id: I5a40e502db201615f45a7e4720105bebef2f2b0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2102905
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'compiler_wrapper/config.go')
-rw-r--r-- | compiler_wrapper/config.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler_wrapper/config.go b/compiler_wrapper/config.go index ed0b597b..fc43a29b 100644 --- a/compiler_wrapper/config.go +++ b/compiler_wrapper/config.go @@ -118,10 +118,13 @@ var crosHardenedConfig = &config{ // Temporarily add no-unknown-warning-option to deal with old clang versions. // Temporarily disable Wsection since kernel gets a bunch of these. chromium:778867 // Disable "-faddrsig" since it produces object files that strip doesn't understand, chromium:915742. + // Pass "-fcommon" till the packages are fixed to work with new clang default + // "-fno-common", crbug.com/1060413. clangFlags: []string{ "-Qunused-arguments", "-grecord-gcc-switches", "-fno-addrsig", + "-fcommon", "-Wno-tautological-constant-compare", "-Wno-tautological-unsigned-enum-zero-compare", "-Wno-unknown-warning-option", @@ -178,10 +181,13 @@ var crosHostConfig = &config{ }, // Temporarily disable tautological-*-compare chromium:778316. // Temporarily add no-unknown-warning-option to deal with old clang versions. + // Pass "-fcommon" till the packages are fixed to work with new clang default + // "-fno-common", crbug.com/1060413. clangFlags: []string{ "-Qunused-arguments", "-grecord-gcc-switches", "-fno-addrsig", + "-fcommon", "-fuse-ld=lld", "-Wno-unused-local-typedefs", "-Wno-deprecated-declarations", |