aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Biedl <[email protected]>2021-01-22 10:50:32 +0000
committerChristoph Biedl <[email protected]>2021-01-22 10:56:32 +0000
commit809f2473c2c3b653ff9b3a3961135a554948d7fb (patch)
treeaa4a1bcb95bc42642b9445fa266ab5176429a27c
parentProtect error counter against overflow. (diff)
downloadgnupg-cb/T5215.tar.gz
gnupg-cb/T5215.zip
Set -fcommon compile optioncb/T5215
-- In gcc 10, the default was changed to -fno-common, triggering linker errors since the code indeed uses extern declarations in such a way. Turns out fixing these isn't easy, so rather just restore the previous behaviour. GnuPG-bug-id: 5215 Signed-off-by: Christoph Biedl <[email protected]>
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e5bf1bc1a..9a14c4e28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1439,6 +1439,20 @@ if test "$GCC" = yes; then
if test x"$_gcc_psign" = xyes ; then
CFLAGS="$CFLAGS -Wno-pointer-sign"
fi
+
+ AC_MSG_CHECKING([if gcc supports -fcommon])
+
+ _gcc_cflags_save=$CFLAGS
+ CFLAGS="-fcommon"
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],_gcc_fcommon=yes,_gcc_fcommon=no)
+ AC_MSG_RESULT($_gcc_fcommon)
+
+ CFLAGS=$_gcc_cflags_save;
+
+ if test x"$_gcc_fcommon" = xyes ; then
+ CFLAGS="$CFLAGS -fcommon"
+ fi
fi
CL_AS_NOEXECSTACK