diff --git a/gcc-config.patch b/gcc-config.patch new file mode 100644 index 0000000..8456584 --- /dev/null +++ b/gcc-config.patch @@ -0,0 +1,44 @@ +diff -Nrup a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 +--- a/libiberty/aclocal.m4 2019-01-19 09:01:34.000000000 -0700 ++++ b/libiberty/aclocal.m4 2020-01-09 22:00:27.183312982 -0700 +@@ -147,7 +147,7 @@ if test $ac_cv_os_cray = yes; then + fi + + AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, +-[AC_TRY_RUN([find_stack_direction () ++[AC_TRY_RUN([__attribute__ ((noclone,noinline)) find_stack_direction () + { + 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/ghdl.spec b/ghdl.spec index e6a6d9b..d441b9e 100644 --- a/ghdl.spec +++ b/ghdl.spec @@ -40,7 +40,7 @@ Summary: A VHDL simulator, using the GCC technology Name: ghdl Version: %{ghdlver} -Release: 5.%{ghdlgitrev}%{?dist} +Release: 6.%{ghdlgitrev}%{?dist} License: GPLv2+ and GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD URL: http://ghdl.free.fr/ # The source for this package was pulled from upstream's vcs. Use the @@ -71,6 +71,8 @@ Patch100: ghdl-llvmflags.patch Patch106: ghdl-ppc64abort.patch Requires: gcc +Patch200: gcc-config.patch + BuildRequires: binutils >= 2.31 BuildRequires: zlib-devel, gettext, bison, flex BuildRequires: texinfo @@ -201,6 +203,14 @@ that tracks signal updates and schedules processes. %patch10 -p0 -b .rh1574936~ %endif +%patch200 -p1 +pushd libiberty +autoconf -f +popd +pushd intl +autoconf -f +popd + echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h @@ -517,6 +527,9 @@ rm %{buildroot}/usr/lib/libghdl.{a,link} %endif %changelog +* Mon Jul 20 2020 Jeff Law - 0.38~dev-6.20200702git9828b51 +- Fix broken configure tests compromised by LTO + * Fri Jul 03 2020 Dan HorĂ¡k - 0.38~dev-5.20200702git9828b51 - updated to new ghdl snapshot