Blame SOURCES/mingw-gcc-config.patch

6bc895
diff -rupN --no-dereference gcc-11.2.1-20210728/config/intdiv0.m4 gcc-11.2.1-20210728-new/config/intdiv0.m4
6bc895
--- gcc-11.2.1-20210728/config/intdiv0.m4	2021-07-28 11:09:49.000000000 +0200
6bc895
+++ gcc-11.2.1-20210728-new/config/intdiv0.m4	2021-07-30 11:19:58.858765997 +0200
6bc895
@@ -31,10 +31,10 @@ sigfpe_handler (sig) int sig;
6bc895
   exit (sig != SIGFPE);
6bc895
 }
6bc895
 
6bc895
-int x = 1;
6bc895
-int y = 0;
6bc895
-int z;
6bc895
-int nan;
6bc895
+volatile int x = 1;
6bc895
+volatile int y = 0;
6bc895
+volatile int z;
6bc895
+volatile int nan;
6bc895
 
6bc895
 int main ()
6bc895
 {
6bc895
diff -rupN --no-dereference gcc-11.2.1-20210728/libiberty/acinclude.m4 gcc-11.2.1-20210728-new/libiberty/acinclude.m4
6bc895
--- gcc-11.2.1-20210728/libiberty/acinclude.m4	2021-07-28 11:09:49.000000000 +0200
6bc895
+++ gcc-11.2.1-20210728-new/libiberty/acinclude.m4	2021-07-30 11:19:58.859766044 +0200
6bc895
@@ -157,7 +157,7 @@ if test $ac_cv_os_cray = yes; then
6bc895
 fi
6bc895
 
6bc895
 AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
6bc895
-[AC_TRY_RUN([find_stack_direction ()
6bc895
+[AC_TRY_RUN([__attribute__ ((noclone,noinline)) find_stack_direction ()
6bc895
 {
6bc895
   static char *addr = 0;
6bc895
   auto char dummy;
6bc895
diff -rupN --no-dereference gcc-11.2.1-20210728/libiberty/configure.ac gcc-11.2.1-20210728-new/libiberty/configure.ac
6bc895
--- gcc-11.2.1-20210728/libiberty/configure.ac	2021-07-28 11:09:49.000000000 +0200
6bc895
+++ gcc-11.2.1-20210728-new/libiberty/configure.ac	2021-07-30 11:19:58.859766044 +0200
6bc895
@@ -665,7 +665,7 @@ if test -z "${setobjs}"; then
6bc895
   for v in $vars; do
6bc895
     AC_MSG_CHECKING([for $v])
6bc895
     AC_CACHE_VAL(libiberty_cv_var_$v,
6bc895
-      [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])],
6bc895
+      [AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((used)) int *p;]],[[extern int $v []; p = $v;]])],
6bc895
 		      [eval "libiberty_cv_var_$v=yes"],
6bc895
 		      [eval "libiberty_cv_var_$v=no"])])
6bc895
     if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then