Skip to contentSkip to conversation

configure: Do not add --warn-common to the linker flags anymore

RFC PATCH In review Thomas Huth 2 participants 2 messages May 25, 2021

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 configure: Do not add --warn-common to the linker flags anymore

We are compiling with -fno-common since commit 4c288acbd6 ("configure:
Always build with -fno-common"), so --warn-common (which had been added in commit 49237acdb725e in 2008 already) should not be necessary anymore nowadays.

---
Marked as RFC since I'm not 100% sure whether I'm missing here something... but IMHO the --warn-common does not buy us anything if we also compile with -fno-common...

 configure | 7 -------
 1 file changed, 7 deletions(-)
configure +0 -7
index 86a8a7e44f..99b9216af3 100755
@@ -5383,13 +5383,6 @@ fi
 
 ##########################################
 
-# Exclude --warn-common with TSan to suppress warnings from the TSan libraries.
-if test "$solaris" = "no" && test "$tsan" = "no"; then
-    if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then
-        QEMU_LDFLAGS="-Wl,--warn-common $QEMU_LDFLAGS"
-    fi
-fi
-
 # Use ASLR, no-SEH and DEP if available
 if test "$mingw32" = "yes" ; then
     flags="--no-seh --nxcompat"
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Thomas Huth

We are compiling with -fno-common since commit 4c288acbd6 ("configure:
Always build with -fno-common"), so --warn-common (which had been added in commit 49237acdb725e in 2008 already) should not be necessary anymore nowadays.

---
Marked as RFC since I'm not 100% sure whether I'm missing here something... but IMHO the --warn-common does not buy us anything if we also compile with -fno-common...

I agree.

r~