From 426edf4a6e3995a0da16c4e415a609c33e55f65e Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 20 Jul 2020 13:58:21 -0600 Subject: [PATCH] - Fix more configure tests compromised by LTO. --- binutils-config.patch | 32 ++++++++++++++++++++++++++++++++ binutils.spec | 10 ++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/binutils-config.patch b/binutils-config.patch index 63fff62..8456584 100644 --- a/binutils-config.patch +++ b/binutils-config.patch @@ -10,3 +10,35 @@ diff -Nrup a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 { static char *addr = 0; auto char dummy; +diff --git a/config/intdiv0.m4 b/config/intdiv0.m4 +index 55dddcf1..ba906efc 100644 +--- a/config/intdiv0.m4 ++++ b/config/intdiv0.m4 +@@ -31,10 +31,10 @@ sigfpe_handler (sig) int sig; + exit (sig != SIGFPE); + } + +-int x = 1; +-int y = 0; +-int z; +-int nan; ++volatile int x = 1; ++volatile int y = 0; ++volatile int z; ++volatile int nan; + + int main () + { +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index f1ce7601..fc20d228 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -661,7 +661,7 @@ if test -z "${setobjs}"; then + for v in $vars; do + AC_MSG_CHECKING([for $v]) + AC_CACHE_VAL(libiberty_cv_var_$v, +- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])], ++ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((used)) int *p;]],[[extern int $v []; p = $v;]])], + [eval "libiberty_cv_var_$v=yes"], + [eval "libiberty_cv_var_$v=no"])]) + if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then diff --git a/binutils.spec b/binutils.spec index 419a815..f57b755 100644 --- a/binutils.spec +++ b/binutils.spec @@ -490,7 +490,10 @@ export LDFLAGS=$RPM_LD_FLAGS # in the subdirectories. So we just rebuild the ones we care # about after applying the configure patches pushd libiberty -autoreconf -ivf +autoconf +popd +pushd intl +autoconf popd @@ -801,7 +804,10 @@ exit 0 #---------------------------------------------------------------------------- %changelog -- Sun Jul 19 2020 Jeff Law - 2.34-9 +* Mon Jul 20 2020 Jeff Law - 2.34-9 +- Fix more configure tests compromised by LTO. + +* Sun Jul 19 2020 Jeff Law - 2.34-9 - Fix configure test compromised by LTO. Add appropriate BuildRequires and force rebuliding the configure files in the appropriate dirs - Fix various warnings exposed by LTO.