1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-07 23:27:48 +02:00

Set -fcommon compile option

--
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 <cb@gnupg.org>
This commit is contained in:
Christoph Biedl 2021-01-22 11:50:32 +01:00
parent c8ad567e7c
commit 809f2473c2

View File

@ -1439,6 +1439,20 @@ if test "$GCC" = yes; then
if test x"$_gcc_psign" = xyes ; then if test x"$_gcc_psign" = xyes ; then
CFLAGS="$CFLAGS -Wno-pointer-sign" CFLAGS="$CFLAGS -Wno-pointer-sign"
fi 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 fi
CL_AS_NOEXECSTACK CL_AS_NOEXECSTACK