cross-gcc: Update to 13.2.0

* sync in patches from cygwin gcc
* sync in important patches from mingw gcc not related to the build
* enabling stripping (not sure why it was disabled)
* reduce diff for build options to the mingw gcc build a bit
This commit is contained in:
Christoph Reiter 2023-11-13 08:36:39 +01:00
parent 78ce2c3a07
commit 5d0ae9ff04
36 changed files with 2828 additions and 6740 deletions

View File

@ -1,65 +0,0 @@
From da7b6bee52df0804953ca867a8e28bbc1889da4c Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Tue, 8 Sep 2020 12:11:02 +0200
Subject: [PATCH 01/18] Cygwin: avoid installing libffi V2
Update ChangeLog and version files for release
---
Makefile.in | 6 ------
1 file changed, 6 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 36e369df6e7..d37bbdceef7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1771,7 +1771,6 @@ install-info-target: maybe-install-info-target-libphobos
install-info-target: maybe-install-info-target-libtermcap
install-info-target: maybe-install-info-target-winsup
install-info-target: maybe-install-info-target-libgloss
-install-info-target: maybe-install-info-target-libffi
install-info-target: maybe-install-info-target-zlib
install-info-target: maybe-install-info-target-rda
install-info-target: maybe-install-info-target-libada
@@ -1860,7 +1859,6 @@ install-pdf-target: maybe-install-pdf-target-libphobos
install-pdf-target: maybe-install-pdf-target-libtermcap
install-pdf-target: maybe-install-pdf-target-winsup
install-pdf-target: maybe-install-pdf-target-libgloss
-install-pdf-target: maybe-install-pdf-target-libffi
install-pdf-target: maybe-install-pdf-target-zlib
install-pdf-target: maybe-install-pdf-target-rda
install-pdf-target: maybe-install-pdf-target-libada
@@ -1949,7 +1947,6 @@ install-html-target: maybe-install-html-target-libphobos
install-html-target: maybe-install-html-target-libtermcap
install-html-target: maybe-install-html-target-winsup
install-html-target: maybe-install-html-target-libgloss
-install-html-target: maybe-install-html-target-libffi
install-html-target: maybe-install-html-target-zlib
install-html-target: maybe-install-html-target-rda
install-html-target: maybe-install-html-target-libada
@@ -2038,7 +2035,6 @@ installcheck-target: maybe-installcheck-target-libphobos
installcheck-target: maybe-installcheck-target-libtermcap
installcheck-target: maybe-installcheck-target-winsup
installcheck-target: maybe-installcheck-target-libgloss
-installcheck-target: maybe-installcheck-target-libffi
installcheck-target: maybe-installcheck-target-zlib
installcheck-target: maybe-installcheck-target-rda
installcheck-target: maybe-installcheck-target-libada
@@ -2728,7 +2724,6 @@ install-target: \
maybe-install-target-libtermcap \
maybe-install-target-winsup \
maybe-install-target-libgloss \
- maybe-install-target-libffi \
maybe-install-target-zlib \
maybe-install-target-rda \
maybe-install-target-libada \
@@ -2837,7 +2832,6 @@ install-strip-target: \
maybe-install-strip-target-libtermcap \
maybe-install-strip-target-winsup \
maybe-install-strip-target-libgloss \
- maybe-install-strip-target-libffi \
maybe-install-strip-target-zlib \
maybe-install-strip-target-rda \
maybe-install-strip-target-libada \
--
2.28.0

View File

@ -1,8 +1,10 @@
From cb0598fe3c511e1d572c89db671c17838c60a2b3 Mon Sep 17 00:00:00 2001
From 7330e79d1eaab54e91d27ff8aae1d610713383cd Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Tue, 8 Sep 2020 14:50:33 +0200
Subject: [PATCH 02/18] Cygwin: use SysV ABI on x86_64
Subject: [PATCH 01/13] Cygwin: use SysV ABI on x86_64
# Conflicts:
# libitm/libitm.h
---
gcc/builtin-attrs.def | 3 +++
gcc/gtm-builtins.def | 2 +-
@ -11,10 +13,10 @@ Subject: [PATCH 02/18] Cygwin: use SysV ABI on x86_64
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/gcc/builtin-attrs.def b/gcc/builtin-attrs.def
index 3239311b5a4..304180cffc3 100644
index 11ce5a3d16c..a544fcf9afd 100644
--- a/gcc/builtin-attrs.def
+++ b/gcc/builtin-attrs.def
@@ -117,6 +117,7 @@ DEF_ATTR_IDENT (ATTR_TYPEGENERIC, "type generic")
@@ -119,6 +119,7 @@ DEF_ATTR_IDENT (ATTR_TYPEGENERIC, "type generic")
DEF_ATTR_IDENT (ATTR_TM_REGPARM, "*tm regparm")
DEF_ATTR_IDENT (ATTR_TM_TMPURE, "transaction_pure")
DEF_ATTR_IDENT (ATTR_RETURNS_TWICE, "returns_twice")
@ -22,7 +24,7 @@ index 3239311b5a4..304180cffc3 100644
DEF_ATTR_IDENT (ATTR_RETURNS_NONNULL, "returns_nonnull")
DEF_ATTR_IDENT (ATTR_WARN_UNUSED_RESULT, "warn_unused_result")
@@ -395,6 +396,8 @@ DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHROW_LIST,
@@ -401,6 +402,8 @@ DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHROW_LIST,
ATTR_TM_REGPARM, ATTR_NULL, ATTR_CONST_NOTHROW_LIST)
DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_RT_LIST,
ATTR_RETURNS_TWICE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
@ -43,7 +45,7 @@ index 6d5cfb9b406..1f47898a71a 100644
DEF_TM_BUILTIN (BUILT_IN_TM_COMMIT, "_ITM_commitTransaction",
BT_FN_VOID, ATTR_TM_NOTHROW_LIST)
diff --git a/libitm/libitm.h b/libitm/libitm.h
index 69f551e2675..77478b115c8 100644
index 7ecf53a93e1..5b2bf7582f1 100644
--- a/libitm/libitm.h
+++ b/libitm/libitm.h
@@ -45,6 +45,7 @@ extern "C" {
@ -51,10 +53,10 @@ index 69f551e2675..77478b115c8 100644
#define ITM_NORETURN __attribute__((noreturn))
#define ITM_PURE __attribute__((transaction_pure))
+#define ITM_SYSV __attribute__((sysv_abi))
/* The following are externally visible definitions and functions, though
only very few of these should be called by user code. */
@@ -145,7 +146,7 @@ typedef uint64_t _ITM_transactionId_t; /* Transaction identifier */
#ifdef _GLIBCXX_NOTHROW
# define _ITM_NOTHROW _GLIBCXX_NOTHROW
#elif !defined (__cplusplus)
@@ -154,7 +155,7 @@ typedef uint64_t _ITM_transactionId_t; /* Transaction identifier */
extern _ITM_transactionId_t _ITM_getTransactionId(void) ITM_REGPARM;
@ -64,7 +66,7 @@ index 69f551e2675..77478b115c8 100644
extern void _ITM_abortTransaction(_ITM_abortReason) ITM_REGPARM ITM_NORETURN;
diff --git a/libitm/libitm_i.h b/libitm/libitm_i.h
index c2beaf41bf3..fd3a6f9bfd9 100644
index 4e415ef53a0..ff3ae90df76 100644
--- a/libitm/libitm_i.h
+++ b/libitm/libitm_i.h
@@ -294,7 +294,7 @@ struct gtm_thread
@ -86,5 +88,5 @@ index c2beaf41bf3..fd3a6f9bfd9 100644
extern "C" void GTM_LB (const void *, size_t) ITM_REGPARM;
--
2.28.0
2.39.0

View File

@ -1,7 +1,7 @@
From f7eda39d692f90d5c2c10e71ed9dc0d52a11c852 Mon Sep 17 00:00:00 2001
From 51dd20d6225772a5d6c77076c7aee92d4d945516 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:44:48 +0800
Subject: [PATCH 04/18] Cygwin: add dummy -pthread, -tsaware and
Subject: [PATCH 02/13] Cygwin: add dummy -pthread, -tsaware and
--large-address-aware for executables only
---
@ -11,7 +11,7 @@ Subject: [PATCH 04/18] Cygwin: add dummy -pthread, -tsaware and
3 files changed, 6 insertions(+)
diff --git a/gcc/config/i386/cygwin-w64.h b/gcc/config/i386/cygwin-w64.h
index 25814a32ace..3fe429379c3 100644
index 8bac9d05ca7..75896f80d7c 100644
--- a/gcc/config/i386/cygwin-w64.h
+++ b/gcc/config/i386/cygwin-w64.h
@@ -67,6 +67,7 @@ along with GCC; see the file COPYING3. If not see
@ -23,10 +23,10 @@ index 25814a32ace..3fe429379c3 100644
/* Cygwin64 will have a 64-bit long type. */
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
index 73737f4805c..13a7d57eb65 100644
index 71fb6135c2c..c42224a7824 100644
--- a/gcc/config/i386/cygwin.h
+++ b/gcc/config/i386/cygwin.h
@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see
@@ -102,6 +102,7 @@ along with GCC; see the file COPYING3. If not see
/* To implement C++ function replacement we always wrap the cxx
malloc-like operators. See N2800 #17.6.4.6 [replacement.functions] */
@ -34,7 +34,7 @@ index 73737f4805c..13a7d57eb65 100644
#define CXX_WRAP_SPEC_LIST " \
--wrap _Znwj \
--wrap _Znaj \
@@ -131,6 +132,7 @@ along with GCC; see the file COPYING3. If not see
@@ -140,6 +141,7 @@ along with GCC; see the file COPYING3. If not see
%{static:-Bstatic} %{!static:-Bdynamic} \
%{shared|mdll: --enable-auto-image-base -e __cygwin_dll_entry@12} \
--dll-search-prefix=cyg \
@ -43,7 +43,7 @@ index 73737f4805c..13a7d57eb65 100644
/* Binutils does not handle weak symbols from dlls correctly. For now,
diff --git a/gcc/config/i386/cygwin.opt b/gcc/config/i386/cygwin.opt
index 44b9c887234..d95cfe7d653 100644
index fcec11db6ad..4062e41a780 100644
--- a/gcc/config/i386/cygwin.opt
+++ b/gcc/config/i386/cygwin.opt
@@ -21,4 +21,7 @@
@ -55,5 +55,5 @@ index 44b9c887234..d95cfe7d653 100644
+
; Retain blank line above
--
2.28.0
2.39.0

View File

@ -1,71 +0,0 @@
From 6bf6b87887a8a5eb53ad409cd4aa32cb1ac50786 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:35:02 +0800
Subject: [PATCH 03/18] Cygwin/MinGW: Do not version lto plugins
---
gcc/config.host | 6 +++---
lto-plugin/Makefile.am | 2 +-
lto-plugin/Makefile.in | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/config.host b/gcc/config.host
index 84f0433e2ad..373d5efd8da 100644
--- a/gcc/config.host
+++ b/gcc/config.host
@@ -232,7 +232,7 @@ case ${host} in
out_host_hook_obj=host-cygwin.o
host_xmake_file="${host_xmake_file} i386/x-cygwin"
host_exeext=.exe
- host_lto_plugin_soname=cyglto_plugin-0.dll
+ host_lto_plugin_soname=cyglto_plugin.dll
;;
i[34567]86-*-mingw32*)
host_xm_file=i386/xm-mingw32.h
@@ -240,7 +240,7 @@ case ${host} in
host_exeext=.exe
out_host_hook_obj=host-mingw32.o
host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
- host_lto_plugin_soname=liblto_plugin-0.dll
+ host_lto_plugin_soname=liblto_plugin.dll
;;
x86_64-*-mingw*)
use_long_long_for_widest_fast_int=yes
@@ -249,7 +249,7 @@ case ${host} in
host_exeext=.exe
out_host_hook_obj=host-mingw32.o
host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
- host_lto_plugin_soname=liblto_plugin-0.dll
+ host_lto_plugin_soname=liblto_plugin.dll
;;
i[34567]86-*-darwin* | x86_64-*-darwin*)
out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index ba5882df7a7..204b25f45ef 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -21,7 +21,7 @@ in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
liblto_plugin_la_SOURCES = lto-plugin.c
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
- $(lt_host_flags) -module -bindir $(libexecsubdir)
+ $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir)
# Can be simplified when libiberty becomes a normal convenience library.
libiberty = $(with_libiberty)/libiberty.a
libiberty_noasan = $(with_libiberty)/noasan/libiberty.a
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index 7da7cd26dbf..834699b439e 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -350,7 +350,7 @@ libexecsub_LTLIBRARIES = liblto_plugin.la
in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
liblto_plugin_la_SOURCES = lto-plugin.c
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
-liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module \
+liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module -avoid-version \
-bindir $(libexecsubdir) $(if $(wildcard \
$(libiberty_noasan)),, $(if $(wildcard \
$(libiberty_pic)),,-Wc,$(libiberty)))
--
2.28.0

View File

@ -1,17 +1,17 @@
From 6b3790d183decea78d75f8d12fe6cd9f9a09ad4b Mon Sep 17 00:00:00 2001
From 8efd8be0cefbf4f0dff1473a4b1077c571145197 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Tue, 8 Sep 2020 14:56:50 +0200
Subject: [PATCH 05/18] Cygwin: handle dllimport properly in medium model V2
Subject: [PATCH 03/13] Cygwin: handle dllimport properly in medium model V2
---
gcc/config/i386/predicates.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 71f4cb1193c..d43708b9e90 100644
index b815aca0da7..c71eed7f60c 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -180,6 +180,7 @@
@@ -202,6 +202,7 @@
switch (XINT (XEXP (op, 0), 1))
{
case UNSPEC_GOTPCREL:
@ -19,7 +19,7 @@ index 71f4cb1193c..d43708b9e90 100644
case UNSPEC_DTPOFF:
case UNSPEC_GOTNTPOFF:
case UNSPEC_NTPOFF:
@@ -282,6 +283,10 @@
@@ -307,6 +308,10 @@
if (ix86_force_load_from_GOT_p (op))
return false;
@ -31,5 +31,5 @@ index 71f4cb1193c..d43708b9e90 100644
return (ix86_cmodel == CM_SMALL
|| (ix86_cmodel == CM_MEDIUM
--
2.28.0
2.39.0

View File

@ -1,7 +1,7 @@
From fd1a87b25723a28fc90dbea6c6f614aef34f7928 Mon Sep 17 00:00:00 2001
From f2c9bdede2258fc953958aab50a2b71502ff9a5f Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:54:57 +0800
Subject: [PATCH 06/18] Cygwin/MinGW: skip test
Subject: [PATCH 04/13] Cygwin/MinGW: skip test
---
gcc/testsuite/gcc.target/i386/pr25993.c | 2 +-
@ -19,5 +19,5 @@ index 1e7e933fb9a..2b12f97b1cc 100644
#ifndef __ASSEMBLER__
--
2.28.0
2.39.0

View File

@ -1,7 +1,7 @@
From b215f8a500ebad7a76cbdaa29ef9cf88066e1e86 Mon Sep 17 00:00:00 2001
From ae0f4a9da588a80f05ecf75a5dfbf3a38107b9c1 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 10:05:50 +0800
Subject: [PATCH 07/18] Cygwin: define RTS_CONTROL_ENABLE and
Subject: [PATCH 05/13] Cygwin: define RTS_CONTROL_ENABLE and
DTR_CONTROL_ENABLE
---
@ -9,10 +9,10 @@ Subject: [PATCH 07/18] Cygwin: define RTS_CONTROL_ENABLE and
1 file changed, 5 insertions(+)
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
index 2a1be803b41..ceaef9e7f69 100644
index 582c35ef7db..0832c6aed15 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -1007,6 +1007,11 @@ CND(VEOL2, "Alternative EOL")
@@ -1044,6 +1044,11 @@ CND(VEOL2, "Alternative EOL")
#endif /* HAVE_TERMIOS */
@ -25,5 +25,5 @@ index 2a1be803b41..ceaef9e7f69 100644
CNU(DTR_CONTROL_ENABLE, "Enable DTR flow ctrl")
CNU(RTS_CONTROL_ENABLE, "Enable RTS flow ctrl")
--
2.28.0
2.39.0

View File

@ -0,0 +1,91 @@
From 0172e3fb2da05cf7a89b4c363dd386593d808a42 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 10:08:25 +0800
Subject: [PATCH 06/13] Cygwin: fix some implicit declaration warnings and
regenerate configure
# Conflicts:
# libiberty/aclocal.m4
---
libiberty/acinclude.m4 | 6 +++++-
libiberty/configure | 18 +++++++++++++++++-
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/libiberty/acinclude.m4 b/libiberty/acinclude.m4
index 6db0e508517..dfa4c6cac10 100644
--- a/libiberty/acinclude.m4
+++ b/libiberty/acinclude.m4
@@ -25,6 +25,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
/* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */
#include <sys/types.h>
+#include <string.h>
+#include <stdlib.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
diff --git a/libiberty/configure b/libiberty/configure
index e4d49732a09..ceb16cf16d9 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -681,6 +681,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -760,6 +761,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1012,6 +1014,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1149,7 +1160,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1302,6 +1313,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -7583,6 +7597,8 @@ else
/* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */
#include <sys/types.h>
+#include <string.h>
+#include <stdlib.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
--
2.39.0

View File

@ -1,7 +1,7 @@
From d8cd8d0211dcd606a3753a6b3c36c19a7b1672dc Mon Sep 17 00:00:00 2001
From 45fab34cb60bc221e6debdf9457d382b62cf4017 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 5 Aug 2015 23:36:13 +0100
Subject: [PATCH 05/19] master Windows: New feature to allow overriding
Subject: [PATCH 05/16] master Windows: New feature to allow overriding
-lmsvcrt
Added in support of the MinGW-w64 WIP feature "agile mscvrt dll" where
@ -13,7 +13,7 @@ always using msvcrt.dll
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt
index a9074bf..e1d89e2 100644
index 12435d813f5..5dff2ac1551 100644
--- a/gcc/config/i386/cygming.opt
+++ b/gcc/config/i386/cygming.opt
@@ -22,6 +22,9 @@ mconsole
@ -27,18 +27,18 @@ index a9074bf..e1d89e2 100644
Target RejectNegative
Generate code for a DLL.
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index 4ac5f68..f875e7b 100644
index b5f31c3da0a..baf80400862 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -165,7 +165,7 @@ along with GCC; see the file COPYING3. If not see
@@ -196,7 +196,7 @@ along with GCC; see the file COPYING3. If not see
#define REAL_LIBGCC_SPEC \
"%{mthreads:-lmingwthrd} -lmingw32 \
" SHARED_LIBGCC_SPEC " \
- -lmoldname -lmingwex -lmsvcrt"
+ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*}"
- -lmoldname -lmingwex -lmsvcrt -lkernel32 " MCFGTHREAD_SPEC
+ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*} -lkernel32 " MCFGTHREAD_SPEC
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
--
2.7.1
2.38.1

View File

@ -1,7 +1,7 @@
From ebcb5ee12d37a5ac379351efdd15cbe26eed8a0e Mon Sep 17 00:00:00 2001
From c4dd31d2a2c6dfa1f68393e6b57d2e4f9dd19a62 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Thu, 30 Oct 2014 17:15:02 +0800
Subject: [PATCH 09/18] Cygwin: __cxa-atexit
Subject: [PATCH 07/13] Cygwin: __cxa-atexit
---
gcc/config.gcc | 2 ++
@ -9,10 +9,10 @@ Subject: [PATCH 09/18] Cygwin: __cxa-atexit
2 files changed, 6 insertions(+)
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 6a349965c0a..547362d93df 100644
index 5636acc2270..7a654f18923 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2096,6 +2096,7 @@ i[34567]86-*-cygwin*)
@@ -2135,6 +2135,7 @@ i[34567]86-*-cygwin*)
fi
default_use_cxa_atexit=yes
use_gcc_stdint=wrap
@ -20,16 +20,8 @@ index 6a349965c0a..547362d93df 100644
;;
x86_64-*-cygwin*)
need_64bit_isa=yes
@@ -2689,6 +2690,7 @@ mipstx39-*-elf* | mipstx39el-*-elf*)
mmix-knuth-mmixware)
tm_file="${tm_file} newlib-stdint.h"
use_gcc_stdint=wrap
+ default_use_cxa_atexit=yes
;;
mn10300-*-*)
tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
diff --git a/libgcc/config/i386/cygming-crtbegin.c b/libgcc/config/i386/cygming-crtbegin.c
index 0f873692a92..929e0862235 100644
index a89dfedca76..76fd3907ec5 100644
--- a/libgcc/config/i386/cygming-crtbegin.c
+++ b/libgcc/config/i386/cygming-crtbegin.c
@@ -145,7 +145,11 @@ __gcc_register_frame (void)
@ -45,5 +37,5 @@ index 0f873692a92..929e0862235 100644
}
--
2.28.0
2.39.0

View File

@ -1,58 +0,0 @@
From 9635fa62f9a1199174d957eab4560e433a4b15aa Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 10:08:25 +0800
Subject: [PATCH 08/18] Cygwin: fix some implicit declaration warnings
---
libiberty/aclocal.m4 | 6 +++++-
libiberty/configure | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4
index 34c0a5bab62..fd1be08c886 100644
--- a/libiberty/aclocal.m4
+++ b/libiberty/aclocal.m4
@@ -17,6 +17,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
/* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */
#include <sys/types.h>
+#include <string.h>
+#include <stdlib.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
@@ -149,7 +151,9 @@ 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([
+#include <stdlib.h>
+find_stack_direction ()
{
static char *addr = 0;
auto char dummy;
diff --git a/libiberty/configure b/libiberty/configure
index 3f82c5bb865..ff05f4f14ba 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -6711,6 +6711,7 @@ else
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdlib.h>
find_stack_direction ()
{
static char *addr = 0;
@@ -7545,6 +7546,8 @@ else
/* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */
#include <sys/types.h>
+#include <string.h>
+#include <stdlib.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
--
2.28.0

View File

@ -1,7 +1,7 @@
From ad26a1b30066f612fdde56890c232fcfc91b7c6d Mon Sep 17 00:00:00 2001
From 7a645349468c61bb1b843ffac6a06d22a61d243c Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Tue, 8 Sep 2020 15:05:44 +0200
Subject: [PATCH 11/18] Cygwin: libgomp soname
Subject: [PATCH 08/13] Cygwin: libgomp soname
---
libgomp/config/cygwin/plugin-suffix.h | 2 ++
@ -22,7 +22,7 @@ index 00000000000..7ea6e7241d9
+#define SONAME_PREFIX "cyg"
+#define SONAME_SUFFIX(n) ("-" #n ".dll")
diff --git a/libgomp/config/darwin/plugin-suffix.h b/libgomp/config/darwin/plugin-suffix.h
index 171a7a8113e..c290b847a05 100644
index af06b7ab87d..d8d172b3a45 100644
--- a/libgomp/config/darwin/plugin-suffix.h
+++ b/libgomp/config/darwin/plugin-suffix.h
@@ -23,4 +23,5 @@
@ -32,7 +32,7 @@ index 171a7a8113e..c290b847a05 100644
+#define SONAME_PREFIX "lib"
#define SONAME_SUFFIX(n) ("." #n ".dylib")
diff --git a/libgomp/config/hpux/plugin-suffix.h b/libgomp/config/hpux/plugin-suffix.h
index 29e1f12726c..7838cc5d184 100644
index 3bd094898f9..9f594f3a6a9 100644
--- a/libgomp/config/hpux/plugin-suffix.h
+++ b/libgomp/config/hpux/plugin-suffix.h
@@ -23,4 +23,5 @@
@ -42,7 +42,7 @@ index 29e1f12726c..7838cc5d184 100644
+#define SONAME_PREFIX "lib"
#define SONAME_SUFFIX(n) (".sl." #n)
diff --git a/libgomp/config/posix/plugin-suffix.h b/libgomp/config/posix/plugin-suffix.h
index d111e529b84..135754ea37e 100644
index 3232fb65e01..707f42cce62 100644
--- a/libgomp/config/posix/plugin-suffix.h
+++ b/libgomp/config/posix/plugin-suffix.h
@@ -23,4 +23,5 @@
@ -52,10 +52,10 @@ index d111e529b84..135754ea37e 100644
+#define SONAME_PREFIX "lib"
#define SONAME_SUFFIX(n) (".so." #n)
diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
index 4790a31e394..6091f130c23 100644
index fe2bf1dac51..f539a6b9302 100644
--- a/libgomp/configure.tgt
+++ b/libgomp/configure.tgt
@@ -135,6 +135,10 @@ case "${target}" in
@@ -141,6 +141,10 @@ case "${target}" in
esac
;;
@ -67,10 +67,10 @@ index 4790a31e394..6091f130c23 100644
config_path="mingw32 posix"
;;
diff --git a/libgomp/target.c b/libgomp/target.c
index d6b3572c8d8..605f9f028c8 100644
index 4a4e1f80745..05264438992 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -3135,7 +3135,7 @@ gomp_target_fini (void)
@@ -3844,7 +3844,7 @@ gomp_target_fini (void)
static void
gomp_target_init (void)
{
@ -80,5 +80,5 @@ index d6b3572c8d8..605f9f028c8 100644
const char *cur, *next;
char *plugin_name;
--
2.28.0
2.39.0

View File

@ -1,7 +1,7 @@
From 109c129db070da8a1935ca6d325a8f5eb5ed0930 Mon Sep 17 00:00:00 2001
From 0daaffabbb1de0118b09170e54611329c61f95ba Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Tue, 8 Sep 2020 15:21:56 +0200
Subject: [PATCH 12/18] Cygwin: g++ time
Subject: [PATCH 09/13] Cygwin: g++ time
---
libstdc++-v3/acinclude.m4 | 3 +++
@ -9,10 +9,10 @@ Subject: [PATCH 12/18] Cygwin: g++ time
2 files changed, 6 insertions(+)
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index ee5e0336f2c..bc7d137dc74 100644
index 15c975ff86e..b5b80ad43a3 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1410,7 +1410,10 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
@@ -1350,7 +1350,10 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
case "${target_os}" in
cygwin*)
@ -24,10 +24,10 @@ index ee5e0336f2c..bc7d137dc74 100644
darwin*)
ac_has_nanosleep=yes
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 9f9c5a2419a..cc6e45592e1 100755
index 3120d5855f6..cfc9d5f8ceb 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -21060,7 +21060,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
@@ -20487,7 +20487,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
case "${target_os}" in
cygwin*)
@ -39,5 +39,5 @@ index 9f9c5a2419a..cc6e45592e1 100755
darwin*)
ac_has_nanosleep=yes
--
2.28.0
2.39.0

View File

@ -1,14 +1,14 @@
From 97eaec05a18ff77e97706d2611c11dfd5e5928fc Mon Sep 17 00:00:00 2001
From 7b152583446b4c4762f0af4c51a8f73d7d6e2d6a Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Tue, 8 Sep 2020 15:24:34 +0200
Subject: [PATCH 13/18] Cygwin: newlib ftm
Subject: [PATCH 10/13] Cygwin: newlib ftm
---
gcc/glimits.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/glimits.h b/gcc/glimits.h
index a37f496ef1b..37ec2d039aa 100644
index 3cd7cf64e63..3905d7bedd2 100644
--- a/gcc/glimits.h
+++ b/gcc/glimits.h
@@ -111,7 +111,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@ -21,5 +21,5 @@ index a37f496ef1b..37ec2d039aa 100644
# undef LONG_LONG_MIN
# define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
--
2.28.0
2.39.0

View File

@ -1,27 +0,0 @@
From 8e37c495b8cb4afc6f9833eb654238b8593367f4 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Fri, 31 Oct 2014 06:46:02 +0800
Subject: [PATCH 10/18] Cygwin: prevent modules from being unloaded before
their dtors are called
---
libstdc++-v3/config/os/mingw32-w64/os_defines.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libstdc++-v3/config/os/mingw32-w64/os_defines.h b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
index e535f6c2b85..e0284216b12 100644
--- a/libstdc++-v3/config/os/mingw32-w64/os_defines.h
+++ b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
@@ -90,4 +90,9 @@
#define _GLIBCXX_USE_CRT_RAND_S 1
+// Enable use of GetModuleHandleEx (requires Windows XP/2003) in
+// __cxa_thread_atexit to prevent modules from being unloaded before
+// their dtors are called
+#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
+
#endif
--
2.28.0

View File

@ -1,17 +1,17 @@
From 189efb9574652865e808b98b77b618712a60539e Mon Sep 17 00:00:00 2001
From 1c0c870dd97ab95688ba703122d4fe42b12ec240 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Tue, 8 Sep 2020 15:26:02 +0200
Subject: [PATCH 14/18] Cygwin: define STD_UNIX
Subject: [PATCH 11/13] Cygwin: define STD_UNIX
---
gcc/config/i386/cygwin.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
index 13a7d57eb65..573df1c3cf0 100644
index c42224a7824..e4e668fbba9 100644
--- a/gcc/config/i386/cygwin.h
+++ b/gcc/config/i386/cygwin.h
@@ -24,14 +24,12 @@ along with GCC; see the file COPYING3. If not see
@@ -24,8 +24,7 @@ along with GCC; see the file COPYING3. If not see
builtin_define ("__CYGWIN__"); \
if (!TARGET_64BIT) \
builtin_define ("__CYGWIN32__"); \
@ -21,6 +21,8 @@ index 13a7d57eb65..573df1c3cf0 100644
} \
while (0)
@@ -40,7 +39,6 @@ along with GCC; see the file COPYING3. If not see
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
- %{!ansi:-Dunix} \
@ -28,5 +30,5 @@ index 13a7d57eb65..573df1c3cf0 100644
%{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
%{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
--
2.28.0
2.39.0

View File

@ -1,6 +1,17 @@
--- a/gcc/gcc.c-original 2019-05-31 12:16:26.175109000 +0200
+++ b/gcc/gcc.c 2019-05-31 12:43:48.461954800 +0200
@@ -6129,7 +6129,6 @@
From 7bb1c4dfb29899729c13376cbae8393f201f1e83 Mon Sep 17 00:00:00 2001
From: Olivier Michel <Olivier.Michel@cyberbotics.com>
Date: Fri, 31 May 2019 15:07:06 +0200
Subject: [PATCH 10/16] Handle spaces in path for default manifest
---
gcc/gcc.cc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index afb23cd07b0..8eee9345afe 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -6829,7 +6829,6 @@ eval_spec_function (const char *func, const char *args,
int save_arg_going;
int save_delete_this_arg;
int save_this_is_output_file;
@ -8,7 +19,7 @@
int save_input_from_pipe;
int save_this_is_linker_script;
const char *save_suffix_subst;
@@ -6145,7 +6146,6 @@
@@ -6847,7 +6846,6 @@ eval_spec_function (const char *func, const char *args,
save_arg_going = arg_going;
save_delete_this_arg = delete_this_arg;
save_this_is_output_file = this_is_output_file;
@ -16,7 +27,7 @@
save_this_is_linker_script = this_is_linker_script;
save_input_from_pipe = input_from_pipe;
save_suffix_subst = suffix_subst;
@@ -6175,13 +6177,15 @@
@@ -6879,13 +6877,15 @@ eval_spec_function (const char *func, const char *args,
argbuf.address ());
/* Pop the spec processing context. */
@ -33,7 +44,7 @@
this_is_linker_script = save_this_is_linker_script;
input_from_pipe = save_input_from_pipe;
suffix_subst = save_suffix_subst;
@@ -6257,8 +6257,9 @@
@@ -6957,8 +6957,9 @@ handle_spec_function (const char *p, bool *retval_nonnull,
/* p now points to just past the end of the spec function expression. */
funcval = eval_spec_function (func, args, soft_matched_part);
@ -43,3 +54,7 @@
+
if (retval_nonnull)
*retval_nonnull = funcval != NULL;
--
2.38.1

View File

@ -1,7 +1,7 @@
From 0ca0e968bf2a79373384f8c072d08bed4f675ed9 Mon Sep 17 00:00:00 2001
From 8b5e94ebdce49fc8f7a0926a695110e83cc408ad Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Mon, 17 Aug 2015 22:57:46 +0100
Subject: [PATCH] clone_function_name_1: Retain any stdcall suffix
Subject: [PATCH 11/16] clone_function_name_1: Retain any stdcall suffix
Previously, clone_function_name_1 would add a suffix after
any existing stdcall suffix, for example ipa-split.c would
@ -51,33 +51,30 @@ test.ii:11:36: error: virtual int ClassC::Dispatch() causes \
test.ii:11:36: note: \
'int ClassC::_ZN6ClassC8DispatchEv@4.part.0()' was declared here
---
gcc/cgraphclones.c | 14 +++++++++++++-
gcc/defaults.h | 2 +-
2 files changed, 14 insertions(+), 2 deletions(-)
gcc/cgraphclones.cc | 13 ++++++++++++-
gcc/defaults.h | 2 +-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index 15f7e119d18..07740c4c403 100644
--- a/gcc/cgraphclones.c
+++ b/gcc/cgraphclones.c
@@ -469,7 +469,8 @@ static GTY(()) hash_map<const char *, unsigned> *clone_fn_ids;
diff --git a/gcc/cgraphclones.cc b/gcc/cgraphclones.cc
index eb0fa87b554..3bde7e6957e 100644
--- a/gcc/cgraphclones.cc
+++ b/gcc/cgraphclones.cc
@@ -470,7 +470,8 @@ static GTY(()) hash_map<const char *, unsigned> *clone_fn_ids;
each NAME) unspecified number. If clone numbering is not needed
then the two argument clone_function_name should be used instead.
Should not be called directly except for by
- lto-partition.c:privatize_symbol_name_1. */
+ lto-partition.c:privatize_symbol_name_1. Final stdcall @N suffixes
- lto-partition.cc:privatize_symbol_name_1. */
+ lto-partition.cc:privatize_symbol_name_1. Final stdcall @N suffixes
+ are maintained. */
tree
clone_function_name_numbered (const char *name, const char *suffix)
@@ -509,12 +510,23 @@ clone_function_name (const char *name, const char *suffix,
{
size_t len = strlen (name);
@@ -511,10 +512,20 @@ clone_function_name (const char *name, const char *suffix,
char *tmp_name, *prefix;
+ char *at_suffix = NULL;
prefix = XALLOCAVEC (char, len + strlen (suffix) + 2);
+ /* name + 1 to skip fastcall which begins with '@' */
+ at_suffix = strchr (name + 1, '@');
+ const char *at_suffix = strchr (name + 1, '@');
+ size_t at_suffix_len = 0;
+ if (at_suffix)
+ {
@ -94,7 +91,7 @@ index 15f7e119d18..07740c4c403 100644
}
diff --git a/gcc/defaults.h b/gcc/defaults.h
index b7534256119..ca089ea3a04 100644
index 376687d91b1..be29e4b7c60 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -51,7 +51,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@ -107,5 +104,5 @@ index b7534256119..ca089ea3a04 100644
} while (0)
#endif
--
2.21.0
2.38.1

View File

@ -1,26 +0,0 @@
From 4ba039687182fccd67e1170f89e259e1c4a58eeb Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sun, 22 Mar 2020 09:56:58 +0800
Subject: [PATCH 15/18] libstdc++: use lt_host_flags for libstdc++.la
Signed-off-by: Jonathan Yong <10walls@gmail.com>
---
libstdc++-v3/src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index a139adc81b3..498f533f3d3 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -107,7 +107,7 @@ libstdc___la_DEPENDENCIES = \
libstdc___la_LDFLAGS = \
-version-info $(libtool_VERSION) ${version_arg} -lm
-libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
+libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags)
# Use special rules for compatibility-ldbl.cc compilation, as we need to
# pass -mlong-double-64.
--
2.28.0

View File

@ -1,26 +0,0 @@
From eac663bd31d1d34cea6a344d5a26fdf4ef12791b Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sun, 22 Mar 2020 09:57:42 +0800
Subject: [PATCH 16/18] libstdc++: regenerate src/Makefile.in for lt_host_flags
Signed-off-by: Jonathan Yong <10walls@gmail.com>
---
libstdc++-v3/src/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index ea37a962a9a..00d863331e8 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -516,7 +516,7 @@ libstdc___la_DEPENDENCIES = \
libstdc___la_LDFLAGS = \
-version-info $(libtool_VERSION) ${version_arg} -lm
-libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
+libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags)
# A note on compatibility and static libraries.
#
--
2.28.0

View File

@ -1,38 +0,0 @@
From 1b20e03e7468760828bfc70fc5e811b5b3738adf Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sun, 22 Mar 2020 09:59:37 +0800
Subject: [PATCH 17/18] libstdc++: use a link test to test for -Wl,-z,relro
Do a link test instead of just a grep. The linker can
support multiple targets, but not all targets can use it.
Signed-off-by: Jonathan Yong <10walls@gmail.com>
---
libstdc++-v3/acinclude.m4 | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index bc7d137dc74..209aa3a91f3 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -274,7 +274,16 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
ac_ld_relro=no
if test x"$with_gnu_ld" = x"yes"; then
AC_MSG_CHECKING([for ld that supports -Wl,-z,relro])
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ AC_LINK_IFELSE([
+ AC_LANG_SOURCE(
+ [[int main() { return 0; }]]
+ )],
+ [cxx_z_relo="1"],
+ [cxx_z_relo=""])
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
--
2.28.0

View File

@ -1,346 +0,0 @@
From e6dff3a1cbca8bab212bf49ecffc4e1a113472ef Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sun, 22 Mar 2020 10:03:10 +0800
Subject: [PATCH 18/18] libstdc++: regenerate configure
Signed-off-by: Jonathan Yong <10walls@gmail.com>
---
libstdc++-v3/configure | 224 +++++++++++++++++++++++++++++++++++++++--
1 file changed, 213 insertions(+), 11 deletions(-)
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index cc6e45592e1..7af78996dd2 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -871,6 +871,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -998,6 +999,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1250,6 +1252,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1387,7 +1398,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1540,6 +1551,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -22901,7 +22913,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
@@ -30083,7 +30114,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
@@ -36006,7 +36056,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
@@ -47913,7 +47982,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
@@ -48178,7 +48266,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
@@ -48645,7 +48752,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
@@ -55013,7 +55139,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
@@ -60944,7 +61089,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
@@ -61145,7 +61309,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
@@ -61365,7 +61548,26 @@ $as_echo "$ac_gcsections" >&6; }
if test x"$with_gnu_ld" = x"yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5
$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; }
- cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"`
+ ac_save_ldflags="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main() { return 0; }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ cxx_z_relo="1"
+else
+ cxx_z_relo=""
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$ac_save_ldflags"
+
if test -n "$cxx_z_relo"; then
OPT_LDFLAGS="-Wl,-z,relro"
ac_ld_relro=yes
--
2.28.0

View File

@ -1,14 +1,14 @@
From 05b0bb43124b041da360ba9adcbaab8430be6d18 Mon Sep 17 00:00:00 2001
From f00621c645ca24f8d228bac7b1dbb5763d1f4db3 Mon Sep 17 00:00:00 2001
From: Liu Hao <lh_mouse@126.com>
Date: Wed, 6 May 2020 21:49:18 +0800
Subject: [PATCH] libgomp: Don't hard-code MS printf attributes
Subject: [PATCH 12/16] libgomp: Don't hard-code MS printf attributes
---
libgomp/libgomp.h | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
index c98c1452bd4..0cc8443f6c2 100644
index 75192749dc7..add858d2cd3 100644
--- a/libgomp/libgomp.h
+++ b/libgomp/libgomp.h
@@ -69,6 +69,13 @@
@ -25,7 +25,7 @@ index c98c1452bd4..0cc8443f6c2 100644
#ifdef HAVE_ATTRIBUTE_VISIBILITY
# pragma GCC visibility push(hidden)
#endif
@@ -180,7 +187,7 @@ extern void gomp_aligned_free (void *);
@@ -176,7 +183,7 @@ team_free (void *ptr)
extern void gomp_vdebug (int, const char *, va_list);
extern void gomp_debug (int, const char *, ...)
@ -34,7 +34,7 @@ index c98c1452bd4..0cc8443f6c2 100644
#define gomp_vdebug(KIND, FMT, VALIST) \
do { \
if (__builtin_expect (gomp_debug_var, 0)) \
@@ -193,11 +200,11 @@ extern void gomp_debug (int, const char *, ...)
@@ -189,11 +196,11 @@ extern void gomp_debug (int, const char *, ...)
} while (0)
extern void gomp_verror (const char *, va_list);
extern void gomp_error (const char *, ...)
@ -49,5 +49,5 @@ index c98c1452bd4..0cc8443f6c2 100644
struct gomp_task;
struct gomp_taskgroup;
--
2.26.2
2.38.1

View File

@ -0,0 +1,183 @@
From 120e9b293a8e9495a90d7b316e027a6286e7a5fc Mon Sep 17 00:00:00 2001
From: Achim Gratz <Achim.Gratz@Stromeko.DE>
Date: Sun, 25 Apr 2021 11:33:55 +0200
Subject: [PATCH 12/13] Cygwin: enable libgccjit not just for MingW
---
configure | 17 +++++++++++++++--
configure.ac | 3 ++-
gcc/cp/Make-lang.in | 2 +-
gcc/jit/Make-lang.in | 15 ++++++++++-----
gcc/system.h | 5 +++--
5 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/configure b/configure
index e218a19e333..b43d5b8124d 100755
--- a/configure
+++ b/configure
@@ -766,6 +766,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -934,6 +935,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1186,6 +1188,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1323,7 +1334,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1483,6 +1494,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -8900,6 +8912,7 @@ $as_echo "$as_me: WARNING: GNAT is required to build $language" >&2;}
# is position independent code (PIC).
case $target in
*mingw*) ;;
+ *cygwin*) ;;
*)
case ${add_this_lang}:${language}:${host_shared} in
yes:jit:no)
@@ -8924,7 +8937,7 @@ $as_echo "$as_me: WARNING: --enable-host-shared required to build $language" >&2
# Silently disable.
add_this_lang=unsupported
;;
- esac
+ esac
;;
esac
diff --git a/configure.ac b/configure.ac
index 7e8e628b325..a688d4ae24a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2166,6 +2166,7 @@ if test -d ${srcdir}/gcc; then
# is position independent code (PIC).
case $target in
*mingw*) ;;
+ *cygwin*) ;;
*)
case ${add_this_lang}:${language}:${host_shared} in
yes:jit:no)
@@ -2189,7 +2190,7 @@ directories, to avoid imposing the performance cost of
# Silently disable.
add_this_lang=unsupported
;;
- esac
+ esac
;;
esac
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 155be74efdb..b750114185c 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -286,7 +286,7 @@ c++.install-plugin: installdirs
# Install import library.
ifeq ($(plugin_implib),yes)
$(mkinstalldirs) $(DESTDIR)$(plugin_resourcesdir)
- $(INSTALL_DATA) cc1plus$(exeext).a $(DESTDIR)/$(plugin_resourcesdir)/cc1plus$(exeext).a
+ $(INSTALL_DATA) cc1plus$(exeext).a $(DESTDIR)$(plugin_resourcesdir)/cc1plus$(exeext).a
endif
c++.uninstall:
diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in
index 2a774d7feb1..6bd882c5ddf 100644
--- a/gcc/jit/Make-lang.in
+++ b/gcc/jit/Make-lang.in
@@ -44,8 +44,13 @@ LIBGCCJIT_VERSION_NUM = 0
LIBGCCJIT_MINOR_NUM = 0
LIBGCCJIT_RELEASE_NUM = 1
-ifneq (,$(findstring mingw,$(target)))
-LIBGCCJIT_FILENAME = libgccjit-$(LIBGCCJIT_VERSION_NUM).dll
+SHARED_PFX=lib
+ifneq (,$(filter %cygwin,$(target)))
+SHARED_PFX=cyg
+endif
+
+ifneq (,$(filter %-mingw% %-cygwin,$(target)))
+LIBGCCJIT_FILENAME = $(SHARED_PFX)gccjit-$(LIBGCCJIT_VERSION_NUM).dll
LIBGCCJIT_IMPORT_LIB = libgccjit.dll.a
jit: $(LIBGCCJIT_FILENAME) \
@@ -139,7 +144,7 @@ endif
# Use strict warnings for this front end.
jit-warn = $(STRICT_WARN)
-ifneq (,$(findstring mingw,$(target)))
+ifneq (,$(filter %-mingw% %-cygwin,$(target)))
# Create import library
LIBGCCJIT_EXTRA_OPTS = -Wl,--out-implib,$(LIBGCCJIT_IMPORT_LIB)
else
@@ -173,7 +178,7 @@ $(LIBGCCJIT_FILENAME): $(jit_OBJS) \
@$(call LINK_PROGRESS,$(INDEX.jit),end)
# Create symlinks when not building for Windows
-ifeq (,$(findstring mingw,$(target)))
+ifeq (,$(filter %-mingw% %-cygwin,$(target)))
ifeq (,$(findstring darwin,$(host)))
# but only one level for Darwin, version info is embedded.
@@ -359,7 +364,7 @@ jit.install-headers: installdirs
$(INSTALL_DATA) $(srcdir)/jit/libgccjit++.h \
$(DESTDIR)$(includedir)/libgccjit++.h
-ifneq (,$(findstring mingw,$(target)))
+ifneq (,$(filter %-mingw% %-cygwin,$(target)))
jit.install-common: installdirs jit.install-headers
# Install import library
$(INSTALL_PROGRAM) $(LIBGCCJIT_IMPORT_LIB) \
diff --git a/gcc/system.h b/gcc/system.h
index b13e9429577..42ccb48e671 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -693,8 +693,9 @@ extern int vsnprintf (char *, size_t, const char *, va_list);
# endif
#endif
-#if defined (ENABLE_PLUGIN) && defined (HAVE_DLFCN_H)
-/* If plugin support is enabled, we could use libdl. */
+#if defined (HAVE_DLFCN_H) && (defined (ENABLE_PLUGIN) || defined (__CYGWIN__))
+/* If plugin support is enabled, we could use libdl.
+ On Cygwin libdl is needed for libgccjit but no plugin support is available. */
#include <dlfcn.h>
#endif
--
2.39.0

View File

@ -0,0 +1,114 @@
From 13b3250e3680ff72440506fba78e65cb83db1477 Mon Sep 17 00:00:00 2001
From: Achim Gratz <Achim.Gratz@Stromeko.DE>
Date: Sat, 30 Apr 2022 15:48:50 +0200
Subject: [PATCH 13/13] Cygwin: testsuite fixes for libgccjit
The .exe suffix is handled specially by Cygwin, so using that for JIT
objects make the testsuite fail almost all tests. Changing the suffix
doesn't quite work everywhere unfortunately.
---
gcc/testsuite/jit.dg/jit.exp | 10 +++++-----
gcc/testsuite/jit.dg/test-compile-to-assembler.c | 2 +-
gcc/testsuite/jit.dg/test-compile-to-dynamic-library.c | 2 +-
gcc/testsuite/jit.dg/test-compile-to-executable.c | 4 ++--
gcc/testsuite/jit.dg/test-compile-to-object.c | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/gcc/testsuite/jit.dg/jit.exp b/gcc/testsuite/jit.dg/jit.exp
index 90e5122b346..a5072027677 100644
--- a/gcc/testsuite/jit.dg/jit.exp
+++ b/gcc/testsuite/jit.dg/jit.exp
@@ -521,7 +521,7 @@ proc jit-dg-test { prog do_what extra_tool_flags } {
# This also ensures that the source name makes it into the
# pass/fail output, so that we can distinguish e.g. which test-foo
# is failing.
- set output_file "[file tail $prog].exe"
+ set output_file "[file tail $prog].xcx"
verbose "output_file: $output_file"
# Create the test executable:
@@ -662,7 +662,7 @@ proc jit-dg-test { prog do_what extra_tool_flags } {
# Verify that a reproducer was generated
if { [file exists $generated_reproducer] == 1} {
pass "found generated reproducer: $generated_reproducer"
- set output_file "${generated_reproducer}.exe"
+ set output_file "${generated_reproducer}.xcx"
# (this overwrites output_file)
# Try to compile the generated reproducer
@@ -836,7 +836,7 @@ proc jit-verify-assembler { args } {
# Name the built executable as OUTPUT_FILENAME with
# ".exe" appended.
- set executable_from_asm ${asm_filename}.exe
+ set executable_from_asm ${asm_filename}.xsx
verbose " executable_from_asm: ${executable_from_asm}"
# Invoke the driver to assemble/link the .s file to the .exe
@@ -917,7 +917,7 @@ proc jit-verify-object { args } {
# Name the linked executable as OUTPUT_FILENAME with
# ".exe" appended.
- set executable_from_obj ${obj_filename}.exe
+ set executable_from_obj ${obj_filename}.xox
verbose " executable_from_obj: ${executable_from_obj}"
# Invoke the driver to link the .o file to the .exe
@@ -969,7 +969,7 @@ proc jit-verify-dynamic-library { args } {
# Build a test executable from
# verify-dynamic-library.c
set test_src "verify-dynamic-library.c"
- set test_executable ${test_src}.exe
+ set test_executable ${test_src}.xdx
verbose " test_executable: ${test_executable}"
# Invoke the driver to build the test executable
diff --git a/gcc/testsuite/jit.dg/test-compile-to-assembler.c b/gcc/testsuite/jit.dg/test-compile-to-assembler.c
index e3a6d2edd20..6321402e20e 100644
--- a/gcc/testsuite/jit.dg/test-compile-to-assembler.c
+++ b/gcc/testsuite/jit.dg/test-compile-to-assembler.c
@@ -10,4 +10,4 @@
#include "create-code-for-hello-world-executable.h"
/* { dg-final { jit-verify-output-file-was-created "" } } */
-/* { dg-final { jit-verify-assembler "hello from ./output-of-test-compile-to-assembler.c.s.exe" } } */
+/* { dg-final { jit-verify-assembler "hello from ./output-of-test-compile-to-assembler.c.s.xsx" } } */
diff --git a/gcc/testsuite/jit.dg/test-compile-to-dynamic-library.c b/gcc/testsuite/jit.dg/test-compile-to-dynamic-library.c
index c29e6f6d628..ead2085d303 100644
--- a/gcc/testsuite/jit.dg/test-compile-to-dynamic-library.c
+++ b/gcc/testsuite/jit.dg/test-compile-to-dynamic-library.c
@@ -63,4 +63,4 @@ create_code (gcc_jit_context *ctxt, void *user_data)
}
/* { dg-final { jit-verify-output-file-was-created "" } } */
-/* { dg-final { jit-verify-dynamic-library "hello from ./verify-dynamic-library.c.exe" } } */
+/* { dg-final { jit-verify-dynamic-library "hello from ./verify-dynamic-library.c.xdx" } } */
diff --git a/gcc/testsuite/jit.dg/test-compile-to-executable.c b/gcc/testsuite/jit.dg/test-compile-to-executable.c
index 2fb0bd91cc9..f9c5c583aae 100644
--- a/gcc/testsuite/jit.dg/test-compile-to-executable.c
+++ b/gcc/testsuite/jit.dg/test-compile-to-executable.c
@@ -5,9 +5,9 @@
#define TEST_COMPILING_TO_FILE
#define OUTPUT_KIND GCC_JIT_OUTPUT_KIND_EXECUTABLE
-#define OUTPUT_FILENAME "output-of-test-compile-to-executable.c.exe"
+#define OUTPUT_FILENAME "output-of-test-compile-to-executable.c.xcx.exe"
#include "harness.h"
#include "create-code-for-hello-world-executable.h"
/* { dg-final { jit-verify-output-file-was-created "" } } */
-/* { dg-final { jit-verify-executable "hello from ./output-of-test-compile-to-executable.c.exe" } } */
+/* { dg-final { jit-verify-executable "hello from ./output-of-test-compile-to-executable.c.xcx" } } */
diff --git a/gcc/testsuite/jit.dg/test-compile-to-object.c b/gcc/testsuite/jit.dg/test-compile-to-object.c
index 81d41c21d40..56914cf9e20 100644
--- a/gcc/testsuite/jit.dg/test-compile-to-object.c
+++ b/gcc/testsuite/jit.dg/test-compile-to-object.c
@@ -10,4 +10,4 @@
#include "create-code-for-hello-world-executable.h"
/* { dg-final { jit-verify-output-file-was-created "" } } */
-/* { dg-final { jit-verify-object "hello from ./output-of-test-compile-to-object.c.o.exe" } } */
+/* { dg-final { jit-verify-object "hello from ./output-of-test-compile-to-object.c.o.xox" } } */
--
2.39.0

File diff suppressed because it is too large Load Diff

View File

@ -1,55 +0,0 @@
--- a/gcc/diagnostic-color.c 2018-01-03 16:03:58.000000000 +0600
+++ b/gcc/diagnostic-color.c 2018-08-02 16:33:22.679146900 +0600
@@ -23,6 +23,7 @@
#ifdef __MINGW32__
# include <windows.h>
+# include <winternl.h>
#endif
#include "color-macros.h"
@@ -210,10 +211,42 @@
to care about it either... */
HANDLE h;
DWORD m;
-
+ bool ret = false;
h = GetStdHandle (STD_ERROR_HANDLE);
- return (h != INVALID_HANDLE_VALUE) && (h != NULL)
+ ret = (h != INVALID_HANDLE_VALUE) && (h != NULL)
&& GetConsoleMode (h, &m);
+ if (!ret){
+ HMODULE ntdll = GetModuleHandle ("ntdll.dll");
+ if (ntdll != INVALID_HANDLE_VALUE){
+
+ typedef NTSTATUS NTAPI func_NtQueryObject (HANDLE, OBJECT_INFORMATION_CLASS,
+ PVOID, ULONG, PULONG);
+ func_NtQueryObject *fNtQueryObject =
+ (func_NtQueryObject*) GetProcAddress (ntdll, "NtQueryObject");
+ if (fNtQueryObject){
+
+ ULONG s = 0xffff * sizeof (WCHAR);
+ OBJECT_NAME_INFORMATION *oni = (OBJECT_NAME_INFORMATION*) xmalloc (s);
+ ULONG len;
+ /* mintty uses a named pipe like "ptyNNNN-to-master". */
+ if (!fNtQueryObject (h, ObjectNameInformation, oni, s, &len))
+ {
+ wchar_t namedPipe[] = L"\\Device\\NamedPipe\\";
+ size_t l1 = sizeof (namedPipe) / 2 - 1;
+ wchar_t toMaster[] = L"-to-master";
+ size_t l2 = sizeof (toMaster) / 2 - 1;
+ USHORT name_length = oni->Name.Length / 2;
+ if (name_length > l1 + l2 &&
+ !memcmp (oni->Name.Buffer, namedPipe, l1 * 2) &&
+ !memcmp (oni->Name.Buffer + (name_length - l2), toMaster, l2 * 2))
+ ret = true;
+ }
+
+ free (oni);
+ }
+ }
+ }
+ return ret;
#else
char const *t = getenv ("TERM");
return t && strcmp (t, "dumb") != 0 && isatty (STDERR_FILENO);

View File

@ -1,10 +0,0 @@
--- gcc-10.1.0/libcpp/mkdeps.c.orig 2020-05-10 20:37:27.263933600 +0300
+++ gcc-10.1.0/libcpp/mkdeps.c 2020-05-10 20:42:00.700896900 +0300
@@ -156,7 +156,6 @@
/* FALLTHROUGH */
case '#':
- case ':':
buf[dst++] = '\\';
/* FALLTHROUGH */

View File

@ -1,27 +0,0 @@
From aa56b2ce5e717d798e0e9cd0b46cd6537d637114 Mon Sep 17 00:00:00 2001
From: Liu Hao <lh_mouse@126.com>
Date: Fri, 29 May 2020 21:14:56 +0800
Subject: [PATCH] gcc/config/i386/mingw32.h: Ensure `-lmsvcrt` precede
`-lkernel32`
Signed-off-by: Liu Hao <lh_mouse@126.com>
---
gcc/config/i386/mingw32.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index 1bbabfe8bed..321c30e41cc 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -165,7 +165,7 @@ along with GCC; see the file COPYING3. If not see
#define REAL_LIBGCC_SPEC \
"%{mthreads:-lmingwthrd} -lmingw32 \
" SHARED_LIBGCC_SPEC " \
- -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*}"
+ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*} -lkernel32"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
--
2.26.2

View File

@ -0,0 +1,191 @@
From 02840e72b20cea4248485462245d4fd3fbe4f385 Mon Sep 17 00:00:00 2001
From: Kai Tietz <ktietz@anaconda.com>
Date: Wed, 21 Apr 2021 07:54:59 +0200
Subject: [PATCH 15/16] add -m(no-)align-vector-insn option for i386
---
gcc/config/i386/i386-options.cc | 9 +++++--
gcc/config/i386/i386.opt | 8 ++++++
gcc/config/i386/mingw32.h | 2 +-
gcc/config/i386/predicates.md | 2 +-
gcc/config/i386/sse.md | 43 +++++++++++++++++++++++++++++----
5 files changed, 55 insertions(+), 9 deletions(-)
diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc
index acb2291e70f..2de64ed5cde 100644
--- a/gcc/config/i386/i386-options.cc
+++ b/gcc/config/i386/i386-options.cc
@@ -386,6 +386,7 @@ ix86_target_string (HOST_WIDE_INT isa, HOST_WIDE_INT isa2,
{ "-minline-stringops-dynamically", MASK_INLINE_STRINGOPS_DYNAMICALLY },
{ "-mms-bitfields", MASK_MS_BITFIELD_LAYOUT },
{ "-mno-align-stringops", MASK_NO_ALIGN_STRINGOPS },
+ { "-mno-align-vector-insn", MASK_NO_ALIGN_VECTOR_INSN },
{ "-mno-fancy-math-387", MASK_NO_FANCY_MATH_387 },
{ "-mno-push-args", MASK_NO_PUSH_ARGS },
{ "-mno-red-zone", MASK_NO_RED_ZONE },
@@ -1103,8 +1104,12 @@ ix86_valid_target_attribute_inner_p (tree fndecl, tree args, char *p_strings[],
MASK_INLINE_STRINGOPS_DYNAMICALLY),
IX86_ATTR_NO ("align-stringops",
- OPT_mno_align_stringops,
- MASK_NO_ALIGN_STRINGOPS),
+ OPT_mno_align_stringops,
+ MASK_NO_ALIGN_STRINGOPS),
+
+ IX86_ATTR_NO ("align-vector-insn",
+ OPT_mno_align_vector_insn,
+ MASK_NO_ALIGN_VECTOR_INSN),
IX86_ATTR_YES ("recip",
OPT_mrecip,
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index 0dbaacb57ed..3b1a644e2b6 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -241,6 +241,10 @@ malign-stringops
Target RejectNegative InverseMask(NO_ALIGN_STRINGOPS, ALIGN_STRINGOPS) Save
Align destination of the string operations.
+malign-vector-insn
+Target RejectNegative InverseMask(NO_ALIGN_VECTOR_INSN, ALIGN_VECTOR_INSN) Save
+Use aligned vector instruction
+
malign-data=
Target RejectNegative Joined Var(ix86_align_data_type) Enum(ix86_align_data) Init(ix86_align_data_type_compat)
Use the given data alignment.
@@ -420,6 +424,10 @@ mpc80
Target RejectNegative
Set 80387 floating-point precision to 80-bit.
+mno-align-vector-insn
+Target Mask(NO_ALIGN_VECTOR_INSN) Save
+Uses unaligned over aligned vector instruction memonics
+
mpreferred-stack-boundary=
Target RejectNegative Joined UInteger Var(ix86_preferred_stack_boundary_arg)
Attempt to keep stack aligned to this power of 2.
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index baf80400862..2ff2a99e31b 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3. If not see
#define TARGET_SUBTARGET_DEFAULT \
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS \
| MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
- | MASK_MS_BITFIELD_LAYOUT)
+ | MASK_MS_BITFIELD_LAYOUT | MASK_NO_ALIGN_VECTOR_INSN)
#ifndef TARGET_USING_MCFGTHREAD
#define TARGET_USING_MCFGTHREAD 0
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index c4141a96735..0ee5a9054ee 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -1644,7 +1644,7 @@
;; less than its natural alignment.
(define_predicate "misaligned_operand"
(and (match_code "mem")
- (match_test "MEM_ALIGN (op) < GET_MODE_BITSIZE (mode)")))
+ (match_test "TARGET_NO_ALIGN_VECTOR_INSN || MEM_ALIGN (op) < GET_MODE_BITSIZE (mode)")))
;; Return true if OP is a parallel for an mov{d,q,dqa,ps,pd} vec_select,
;; where one of the two operands of the vec_concat is const0_operand.
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 076064f97e6..b224b578676 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1749,7 +1749,8 @@
(vec_concat:V2DF (vec_select:DF (match_dup 2)
(parallel [(const_int 0)]))
(match_operand:DF 3 "memory_operand")))]
- "TARGET_SSE2 && TARGET_SSE_UNALIGNED_LOAD_OPTIMAL
+ "TARGET_SSE2
+ && (TARGET_SSE_UNALIGNED_LOAD_OPTIMAL || TARGET_NO_ALIGN_VECTOR_INSN)
&& ix86_operands_ok_for_move_multiple (operands, true, DFmode)"
[(set (match_dup 2) (match_dup 5))]
"operands[5] = adjust_address (operands[1], V2DFmode, 0);")
@@ -1760,7 +1761,8 @@
(set (match_operand:V2DF 2 "sse_reg_operand")
(vec_concat:V2DF (match_operand:DF 4 "sse_reg_operand")
(match_operand:DF 3 "memory_operand")))]
- "TARGET_SSE2 && TARGET_SSE_UNALIGNED_LOAD_OPTIMAL
+ "TARGET_SSE2
+ && (TARGET_SSE_UNALIGNED_LOAD_OPTIMAL || TARGET_NO_ALIGN_VECTOR_INSN)
&& REGNO (operands[4]) == REGNO (operands[2])
&& ix86_operands_ok_for_move_multiple (operands, true, DFmode)"
[(set (match_dup 2) (match_dup 5))]
@@ -1774,7 +1776,8 @@
(set (match_operand:DF 2 "memory_operand")
(vec_select:DF (match_operand:V2DF 3 "sse_reg_operand")
(parallel [(const_int 1)])))]
- "TARGET_SSE2 && TARGET_SSE_UNALIGNED_STORE_OPTIMAL
+ "TARGET_SSE2
+ && (TARGET_SSE_UNALIGNED_STORE_OPTIMAL || TARGET_NO_ALIGN_VECTOR_INSN)
&& ix86_operands_ok_for_move_multiple (operands, false, DFmode)"
[(set (match_dup 4) (match_dup 1))]
"operands[4] = adjust_address (operands[0], V2DFmode, 0);")
@@ -10434,7 +10437,8 @@
(vec_select:V2SF
(match_operand:V4SF 1 "nonimmediate_operand" " v,v,m")
(parallel [(const_int 0) (const_int 1)])))]
- "TARGET_SSE && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+ "TARGET_SSE && TARGET_ALIGN_VECTOR_INSN
+ && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
"@
%vmovlps\t{%1, %0|%q0, %1}
%vmovaps\t{%1, %0|%0, %1}
@@ -10443,6 +10447,21 @@
(set_attr "prefix" "maybe_vex")
(set_attr "mode" "V2SF,V4SF,V2SF")])
+(define_insn "sse_storelps_unalign"
+ [(set (match_operand:V2SF 0 "nonimmediate_operand" "=m,v,v")
+ (vec_select:V2SF
+ (match_operand:V4SF 1 "nonimmediate_operand" " v,v,m")
+ (parallel [(const_int 0) (const_int 1)])))]
+ "TARGET_SSE && TARGET_NO_ALIGN_VECTOR_INSN
+ && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+ "@
+ %vmovlps\t{%1, %0|%q0, %1}
+ %vmovups\t{%1, %0|%0, %1}
+ %vmovlps\t{%1, %d0|%d0, %q1}"
+ [(set_attr "type" "ssemov")
+ (set_attr "prefix" "maybe_vex")
+ (set_attr "mode" "V2SF,V4SF,V2SF")])
+
(define_expand "sse_loadlps_exp"
[(set (match_operand:V4SF 0 "nonimmediate_operand")
(vec_concat:V4SF
@@ -13338,7 +13357,7 @@
(vec_select:DF
(match_operand:V2DF 1 "nonimmediate_operand" "x,x,m")
(parallel [(const_int 0)])))]
- "!TARGET_SSE2 && TARGET_SSE
+ "!TARGET_SSE2 && TARGET_SSE && TARGET_ALIGN_VECTOR_INSN
&& !(MEM_P (operands[0]) && MEM_P (operands[1]))"
"@
movlps\t{%1, %0|%0, %1}
@@ -13347,6 +13366,20 @@
[(set_attr "type" "ssemov")
(set_attr "mode" "V2SF,V4SF,V2SF")])
+(define_insn "*vec_extractv2df_0_sse_unalign"
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=m,x,x")
+ (vec_select:DF
+ (match_operand:V2DF 1 "nonimmediate_operand" "x,x,m")
+ (parallel [(const_int 0)])))]
+ "!TARGET_SSE2 && TARGET_SSE && TARGET_NO_ALIGN_VECTOR_INSN
+ && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+ "@
+ movlps\t{%1, %0|%0, %1}
+ movups\t{%1, %0|%0, %1}
+ movlps\t{%1, %0|%0, %q1}"
+ [(set_attr "type" "ssemov")
+ (set_attr "mode" "V2SF,V4SF,V2SF")])
+
(define_expand "sse2_loadhpd_exp"
[(set (match_operand:V2DF 0 "nonimmediate_operand")
(vec_concat:V2DF
--
2.38.1

View File

@ -0,0 +1,82 @@
From b053e90d5db4e9fe844d1dd1203792197873d51f Mon Sep 17 00:00:00 2001
From: Tomas Kalibera <tomas.kalibera@gmail.com>
Date: Mon, 16 May 2022 06:43:09 -0400
Subject: [PATCH] c-family: Let stdio.h override built in printf format
[PR95130,PR92292]
Mingw32 targets use ms_printf format for printf, but mingw-w64 when
configured for UCRT uses gnu_format (via stdio.h). GCC checks both formats,
which means that one gets a warning twice if the format string violates both
formats:
printf("Hello %lu\n", (long long unsigned) x);
Fixed by disabling the built in format in case there are additional ones.
This fixes also prevents issues if the print formats disagree. In the past
it was the case when printing 64-bit integers, but GCC ms_printf format since
c51f1e7427e6a5ae2a6d82b5a790df77a3adc99 supports %llu.
gcc/c-family/ChangeLog:
PR c/95130
PR c/92292
* c-format.cc (check_function_format): For builtin functions with a
built in format and at least one more, do not check the first one.
---
gcc/c-family/c-format.cc | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc
index 01adea4ff41..613b7c827bb 100644
--- a/gcc/c-family/c-format.cc
+++ b/gcc/c-family/c-format.cc
@@ -1173,9 +1173,10 @@ void
check_function_format (const_tree fn, tree attrs, int nargs,
tree *argarray, vec<location_t> *arglocs)
{
- tree a;
+ tree a, aa;
tree atname = get_identifier ("format");
+ bool skipped_default_format = false;
/* See if this function has any format attributes. */
for (a = attrs; a; a = TREE_CHAIN (a))
@@ -1186,6 +1187,32 @@ check_function_format (const_tree fn, tree attrs, int nargs,
function_format_info info;
decode_format_attr (fn, atname, TREE_VALUE (a), &info,
/*validated=*/true);
+
+ /* Mingw32 targets have traditionally used ms_printf format for the
+ printf function, and this format is built in GCC. But nowadays,
+ if mingw-w64 is configured to target UCRT, the printf function
+ uses the gnu_printf format (specified in the stdio.h header). This
+ causes GCC to check both formats, which means that GCC would
+ warn twice about the same issue when both formats are violated,
+ e.g. for %lu used to print long long unsigned.
+
+ Hence, if there are multiple format specifiers, we skip the first
+ one. See PR 95130 (but note that GCC ms_printf already supports
+ %llu) and PR 92292. */
+
+ if (!skipped_default_format && fn && TREE_CODE (fn) == FUNCTION_DECL)
+ {
+ for(aa = TREE_CHAIN (a); aa; aa = TREE_CHAIN (aa))
+ if (is_attribute_p ("format", get_attribute_name (aa))
+ && fndecl_built_in_p (fn, BUILT_IN_NORMAL))
+ {
+ skipped_default_format = true;
+ break;
+ }
+ if (skipped_default_format)
+ continue;
+ }
+
if (warn_format)
{
/* FIXME: Rewrite all the internal functions in this file
--
2.38.1

View File

@ -1,10 +1,10 @@
diff -Naur gcc-10.2.0-orig/gcc/config/i386/msys.h gcc-10.2.0/gcc/config/i386/msys.h
--- gcc-10.2.0-orig/gcc/config/i386/msys.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-10.2.0/gcc/config/i386/msys.h 2020-10-26 12:18:07.539626100 +0300
diff -Naur gcc-13.2.0-orig/gcc/config/i386/msys.h gcc-13.2.0/gcc/config/i386/msys.h
--- gcc-13.2.0-orig/gcc/config/i386/msys.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-13.2.0/gcc/config/i386/msys.h 2023-09-12 13:31:33.348712400 +0100
@@ -0,0 +1,160 @@
+/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows32, using a Unix style C library and tools.
+ Copyright (C) 1995-2020 Free Software Foundation, Inc.
+ Copyright (C) 1995-2023 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
@ -51,7 +51,7 @@ diff -Naur gcc-10.2.0-orig/gcc/config/i386/msys.h gcc-10.2.0/gcc/config/i386/msy
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}\
+ "%{mdaz-ftz:crtfastmath.o%s;Ofast|ffast-math|funsafe-math-optimizations:%{!shared:%{!mno-daz-ftz:crtfastmath.o%s}}} \
+ %{!shared:%:if-exists(default-manifest.o%s)}\
+ %{fvtable-verify=none:%s; \
+ fvtable-verify=preinit:vtv_end.o%s; \
@ -162,14 +162,14 @@ diff -Naur gcc-10.2.0-orig/gcc/config/i386/msys.h gcc-10.2.0/gcc/config/i386/msy
+#define HAVE_ENABLE_EXECUTE_STACK
+#undef CHECK_EXECUTE_STACK_ENABLED
+#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable
diff -Naur gcc-10.2.0-orig/gcc/config/i386/msys-w64.h gcc-10.2.0/gcc/config/i386/msys-w64.h
--- gcc-10.2.0-orig/gcc/config/i386/msys-w64.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-10.2.0/gcc/config/i386/msys-w64.h 2020-10-26 12:17:50.248052300 +0300
@@ -0,0 +1,84 @@
diff -Naur gcc-13.2.0-orig/gcc/config/i386/msys-w64.h gcc-13.2.0/gcc/config/i386/msys-w64.h
--- gcc-13.2.0-orig/gcc/config/i386/msys-w64.h 1970-01-01 01:00:00.000000000 +0100
+++ gcc-13.2.0/gcc/config/i386/msys-w64.h 2023-09-12 13:11:45.732746500 +0100
@@ -0,0 +1,85 @@
+/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows 32/64 via MSYS runtime, using GNU tools and
+ the Windows API Library.
+ Copyright (C) 2013-2020 Free Software Foundation, Inc.
+ Copyright (C) 2013-2023 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
@ -240,6 +240,7 @@ diff -Naur gcc-10.2.0-orig/gcc/config/i386/msys-w64.h gcc-10.2.0/gcc/config/i386
+
+/* MSYS64 will have a 64-bit long type. */
+#undef LONG_TYPE_SIZE
+#undef LONG_TYPE_SIZE
+#define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32)
+
+/* Override default "long long unsigned int" from cygming.h. */
@ -250,17 +251,17 @@ diff -Naur gcc-10.2.0-orig/gcc/config/i386/msys-w64.h gcc-10.2.0/gcc/config/i386
+
+#undef LIBGCC_SONAME
+#define LIBGCC_SONAME "msys-gcc_s-seh-1.dll"
diff -Naur gcc-10.2.0-orig/gcc/config/i386/t-msys-w64 gcc-10.2.0/gcc/config/i386/t-msys-w64
--- gcc-10.2.0-orig/gcc/config/i386/t-msys-w64 1970-01-01 03:00:00.000000000 +0300
+++ gcc-10.2.0/gcc/config/i386/t-msys-w64 2020-10-26 12:15:15.004347800 +0300
diff -Naur gcc-13.2.0-orig/gcc/config/i386/t-msys-w64 gcc-13.2.0/gcc/config/i386/t-msys-w64
--- gcc-13.2.0-orig/gcc/config/i386/t-msys-w64 1970-01-01 01:00:00.000000000 +0100
+++ gcc-13.2.0/gcc/config/i386/t-msys-w64 2023-09-12 13:12:22.066839500 +0100
@@ -0,0 +1,3 @@
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64
+MULTILIB_OSDIRNAMES = ../lib ../lib32
diff -Naur gcc-10.2.0-orig/gcc/config.build gcc-10.2.0/gcc/config.build
--- gcc-10.2.0-orig/gcc/config.build 2020-07-23 09:35:17.316384200 +0300
+++ gcc-10.2.0/gcc/config.build 2020-10-26 12:15:15.007351900 +0300
@@ -60,6 +60,10 @@
diff -Naur gcc-13.2.0-orig/gcc/config.build gcc-13.2.0/gcc/config.build
--- gcc-13.2.0-orig/gcc/config.build 2023-09-12 12:53:16.894699700 +0100
+++ gcc-13.2.0/gcc/config.build 2023-09-12 13:00:15.495551700 +0100
@@ -57,6 +57,10 @@
build_xm_file=i386/xm-cygwin.h
build_exeext=.exe
;;
@ -271,38 +272,43 @@ diff -Naur gcc-10.2.0-orig/gcc/config.build gcc-10.2.0/gcc/config.build
i[34567]86-*-mingw32* | x86_64-*-mingw*)
build_xm_file=i386/xm-mingw32.h
build_exeext=.exe
diff -Naur gcc-10.2.0-orig/gcc/config.gcc gcc-10.2.0/gcc/config.gcc
--- gcc-10.2.0-orig/gcc/config.gcc 2020-10-26 12:02:07.079835500 +0300
+++ gcc-10.2.0/gcc/config.gcc 2020-10-26 12:21:30.364479900 +0300
@@ -2115,6 +2115,38 @@
diff -Naur gcc-13.2.0-orig/gcc/config.gcc gcc-13.2.0/gcc/config.gcc
--- gcc-13.2.0-orig/gcc/config.gcc 2023-09-12 12:53:16.600217500 +0100
+++ gcc-13.2.0/gcc/config.gcc 2023-09-12 13:44:28.139343300 +0100
@@ -2122,6 +2122,43 @@
use_gcc_stdint=wrap
tm_defines="${tm_defines} TARGET_CYGWIN64=1"
;;
+i[34567]86-*-msys*)
+ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/msys.h i386/cygwin-stdint.h"
+ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/cygming.h i386/msys.h i386/cygwin-stdint.h"
+ xm_file=i386/xm-cygwin.h
+ tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
+ target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.c"
+ target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
+ extra_objs="${extra_objs} winnt.o winnt-stubs.o"
+ c_target_objs="${c_target_objs} msformat-c.o"
+ cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
+ d_target_objs="${d_target_objs} cygwin-d.o"
+ target_has_targetdm="yes"
+ if test x$enable_threads = xyes; then
+ thread_file='posix'
+ fi
+ default_use_cxa_atexit=yes
+ use_gcc_stdint=wrap
+ default_use_cxa_atexit=yes
+ ;;
+x86_64-*-msys*)
+ need_64bit_isa=yes
+ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/msys.h i386/msys-w64.h i386/cygwin-stdint.h"
+ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/cygming.h i386/msys.h i386/msys-w64.h i386/cygwin-stdint.h"
+ xm_file=i386/xm-cygwin.h
+ tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-msys-w64"
+ target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.c"
+ tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
+ target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.cc"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
+ extra_objs="${extra_objs} winnt.o winnt-stubs.o"
+ c_target_objs="${c_target_objs} msformat-c.o"
+ cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
+ d_target_objs="${d_target_objs} cygwin-d.o"
+ target_has_targetdm="yes"
+ if test x$enable_threads = xyes; then
+ thread_file='posix'
+ fi
@ -311,9 +317,9 @@ diff -Naur gcc-10.2.0-orig/gcc/config.gcc gcc-10.2.0/gcc/config.gcc
+ tm_defines="${tm_defines} TARGET_CYGWIN64=1"
+ ;;
i[34567]86-*-mingw* | x86_64-*-mingw*)
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/cygming.h"
xm_file=i386/xm-mingw32.h
@@ -5190,6 +5222,8 @@
@@ -5672,6 +5709,8 @@
;;
i[34567]86-*-cygwin* | x86_64-*-cygwin*)
;;
@ -322,10 +328,10 @@ diff -Naur gcc-10.2.0-orig/gcc/config.gcc gcc-10.2.0/gcc/config.gcc
i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
diff -Naur gcc-10.2.0-orig/gcc/config.host gcc-10.2.0/gcc/config.host
--- gcc-10.2.0-orig/gcc/config.host 2020-10-26 12:02:06.655785500 +0300
+++ gcc-10.2.0/gcc/config.host 2020-10-26 12:15:15.017385100 +0300
@@ -234,6 +234,13 @@
diff -Naur gcc-13.2.0-orig/gcc/config.host gcc-13.2.0/gcc/config.host
--- gcc-13.2.0-orig/gcc/config.host 2023-09-12 12:53:13.960945500 +0100
+++ gcc-13.2.0/gcc/config.host 2023-09-12 13:02:58.203239500 +0100
@@ -230,6 +230,13 @@
host_exeext=.exe
host_lto_plugin_soname=cyglto_plugin.dll
;;
@ -338,10 +344,10 @@ diff -Naur gcc-10.2.0-orig/gcc/config.host gcc-10.2.0/gcc/config.host
+ ;;
i[34567]86-*-mingw32*)
host_xm_file=i386/xm-mingw32.h
host_xmake_file="${host_xmake_file} i386/x-mingw32"
diff -Naur gcc-10.2.0-orig/libgcc/config/i386/t-msys gcc-10.2.0/libgcc/config/i386/t-msys
--- gcc-10.2.0-orig/libgcc/config/i386/t-msys 1970-01-01 03:00:00.000000000 +0300
+++ gcc-10.2.0/libgcc/config/i386/t-msys 2020-10-26 12:15:15.020545400 +0300
host_xmake_file="${host_xmake_file} i386/x-mingw32 i386/x-mingw32-utf8"
diff -Naur gcc-13.2.0-orig/libgcc/config/i386/t-msys gcc-13.2.0/libgcc/config/i386/t-msys
--- gcc-13.2.0-orig/libgcc/config/i386/t-msys 1970-01-01 01:00:00.000000000 +0100
+++ gcc-13.2.0/libgcc/config/i386/t-msys 2023-09-12 13:14:31.324573000 +0100
@@ -0,0 +1,19 @@
+# If we are building next to winsup, this will let us find the real
+# limits.h when building libgcc2. Otherwise, winsup must be installed
@ -362,10 +368,10 @@ diff -Naur gcc-10.2.0-orig/libgcc/config/i386/t-msys gcc-10.2.0/libgcc/config/i3
+# We'd like to use SHLIB_SONAME here too, and we can, since
+# we don't rely on shlib_base_name substitution for it.
+SHLIB_MKMAP_OPTS = -v pe_dll=$(SHLIB_SONAME)
diff -Naur gcc-10.2.0-orig/libgcc/config.host gcc-10.2.0/libgcc/config.host
--- gcc-10.2.0-orig/libgcc/config.host 2020-07-23 09:35:18.752400000 +0300
+++ gcc-10.2.0/libgcc/config.host 2020-10-26 13:04:09.890014100 +0300
@@ -353,6 +353,9 @@
diff -Naur gcc-13.2.0-orig/libgcc/config.host gcc-13.2.0/libgcc/config.host
--- gcc-13.2.0-orig/libgcc/config.host 2023-09-12 12:51:10.404290400 +0100
+++ gcc-13.2.0/libgcc/config.host 2023-09-12 13:37:04.237380300 +0100
@@ -380,6 +380,9 @@
i[34567]86-*-cygwin* | x86_64-*-cygwin*)
enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
;;
@ -375,7 +381,7 @@ diff -Naur gcc-10.2.0-orig/libgcc/config.host gcc-10.2.0/libgcc/config.host
*)
enable_execute_stack=enable-execute-stack-empty.c;
;;
@@ -827,6 +830,48 @@
@@ -837,6 +840,48 @@
# FIXME - dj - t-chkstk used to be in here, need a 64-bit version of that
tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin t-crtfm t-dfprules i386/t-chkstk"
;;
@ -385,7 +391,7 @@ diff -Naur gcc-10.2.0-orig/libgcc/config.host gcc-10.2.0/libgcc/config.host
+ extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
+ fi
+ # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ if test x$enable_sjlj_exceptions = xyes; then
+ if test x$ac_cv_sjlj_exceptions = xyes; then
+ tmake_eh_file="i386/t-sjlj-eh"
+ else
+ tmake_eh_file="i386/t-dw2-eh"
@ -404,11 +410,11 @@ diff -Naur gcc-10.2.0-orig/libgcc/config.host gcc-10.2.0/libgcc/config.host
+ extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
+ fi
+ # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ if test x$enable_sjlj_exceptions = xyes; then
+ if test x$ac_cv_sjlj_exceptions = xyes; then
+ tmake_eh_file="i386/t-sjlj-eh"
+ elif test "${host_address}" = 32; then
+ # biarch -m32 with --disable-sjlj-exceptions
+ tmake_eh_file="i386/t-dw2-eh"
+ # biarch -m32 with --disable-sjlj-exceptions
+ tmake_eh_file="i386/t-dw2-eh"
+ else
+ tmake_eh_file="i386/t-seh-eh"
+ fi

View File

@ -1,6 +1,6 @@
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/bitfield3.C gcc-10.2.0/gcc/testsuite/g++.dg/abi/bitfield3.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/bitfield3.C 2020-07-23 09:35:17.920390800 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/abi/bitfield3.C 2020-10-26 13:07:06.410835500 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/abi/bitfield3.C gcc-11.2.0/gcc/testsuite/g++.dg/abi/bitfield3.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/abi/bitfield3.C 2021-11-29 16:32:00.115532200 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/abi/bitfield3.C 2021-11-29 16:49:32.556601800 +0100
@@ -3,7 +3,7 @@
// { dg-options "-O2" }
// Cygwin and mingw default to MASK_ALIGN_DOUBLE. Override to ensure
@ -10,9 +10,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/bitfield3.C gcc-10.2.0/gcc/t
// As for mingw target the ms-bitfield switch is activated by default,
// make sure for this test that it is disabled.
// { dg-additional-options "-mno-ms-bitfields" { target i?86-*-mingw* } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/rtti3.C gcc-10.2.0/gcc/testsuite/g++.dg/abi/rtti3.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/rtti3.C 2020-07-23 09:35:17.924390900 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/abi/rtti3.C 2020-10-26 13:07:06.413729700 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/abi/rtti3.C gcc-11.2.0/gcc/testsuite/g++.dg/abi/rtti3.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/abi/rtti3.C 2021-11-29 16:32:00.162395900 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/abi/rtti3.C 2021-11-29 16:50:13.664297700 +0100
@@ -2,7 +2,7 @@
// necessarily the type info object
@ -22,9 +22,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/rtti3.C gcc-10.2.0/gcc/tests
// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* hppa*-*-hpux* } } } } }
// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* } } } } }
// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZTSPP1A" { target { *-*-darwin* } } } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/thunk4.C gcc-10.2.0/gcc/testsuite/g++.dg/abi/thunk4.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/thunk4.C 2020-07-23 09:35:17.924390900 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/abi/thunk4.C 2020-10-26 13:07:06.416721400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/abi/thunk4.C gcc-11.2.0/gcc/testsuite/g++.dg/abi/thunk4.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/abi/thunk4.C 2021-11-29 16:32:00.146775300 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/abi/thunk4.C 2021-11-29 16:50:13.664297700 +0100
@@ -1,5 +1,5 @@
// { dg-require-weak "" }
-// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } }
@ -32,9 +32,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/thunk4.C gcc-10.2.0/gcc/test
// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c gcc-10.2.0/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c 2020-07-23 09:35:17.924390900 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c 2020-10-26 13:08:12.124927500 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c gcc-11.2.0/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c 2021-11-29 16:31:59.709376900 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c 2021-11-29 16:49:32.556601800 +0100
@@ -46,8 +46,8 @@
const char *dg_options[] = {
"/* { dg-options \"%s%s-I%s -Wno-abi\" } */\n",
@ -46,21 +46,21 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.
"/* { dg-options \"%s%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
"/* { dg-options \"%s%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
#define NDG_OPTIONS (sizeof (dg_options) / sizeof (dg_options[0]))
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C 2020-07-23 09:35:17.944391100 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C 2020-10-26 13:07:06.427519200 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C gcc-11.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C 2021-11-29 16:31:58.598695500 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C 2021-11-29 16:50:13.664297700 +0100
@@ -1,7 +1,7 @@
// Test for conversion from stateless lambda to function pointer.
// { dg-do compile { target c++11_only } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-hpux10* } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-msys *-*-hpux10* } } } } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-msys } } } } }
inline void f()
{
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C 2020-07-23 09:35:17.944391100 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C 2020-10-26 13:07:06.431481700 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C gcc-11.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C 2021-11-29 16:31:58.614316700 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C 2021-11-29 16:50:13.664297700 +0100
@@ -12,7 +12,7 @@
// The call operator of that type is _ZZ1giENKUlvE_clEv.
@ -79,18 +79,27 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C gcc
[]{return 1;}()
// Type: ZN1S1fEiiEd0_UlvE0_
// Operator: _ZZN1S1fEiiEd0_NKUlvE0_clEv
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C 2020-07-23 09:35:17.944391100 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C 2020-10-26 13:13:18.831874900 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C gcc-11.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C 2021-11-29 16:31:58.614316700 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C 2021-11-29 16:50:13.664297700 +0100
@@ -12,4 +12,4 @@
// Type of lambda in intializer of R<int>::x: N1RIiE1xMUlvE_E
// Corresponding operator(): _ZNK1RIiE1xMUlvE_clEv
// { dg-final { scan-assembler "_ZNK1RIiE1xMUlvE_clEv" } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZNK1RIiE1xMUlvE_clEv" { target { ! { *-*-mingw* *-*-cygwin } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZNK1RIiE1xMUlvE_clEv" { target { ! { *-*-mingw* *-*-cygwin *-*-msys } } } } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport1.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport1.C 2020-10-26 13:07:06.436561600 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport-MI1.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllexport-MI1.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport-MI1.C 2021-11-29 16:31:57.318016200 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllexport-MI1.C 2021-11-29 16:49:32.556601800 +0100
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw*} }
// Test that non-virtual MI thunks are exported.
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport1.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllexport1.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport1.C 2021-11-29 16:31:57.349259000 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllexport1.C 2021-11-29 16:49:32.556601800 +0100
@@ -1,5 +1,5 @@
// Test that inline functions are exported with -fkeep-inline-functions.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
@ -98,9 +107,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport1.C gcc-10.2.0/gcc/
// { dg-options -fkeep-inline-functions }
__attribute__((dllexport)) inline int foo (int a) { return a;}
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport3.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport3.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport3.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport3.C 2020-10-26 13:07:06.439554100 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport3.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllexport3.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport3.C 2021-11-29 16:31:57.349259000 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllexport3.C 2021-11-29 17:07:33.561954000 +0100
@@ -1,5 +1,5 @@
// PR c++/42870
-// { dg-do compile { target i?86-*-cygwin *-*-mingw* } }
@ -108,18 +117,26 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport3.C gcc-10.2.0/gcc/
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZN2SaD1Ev" } }
#define ATTRIBUTE __attribute__ ((dllexport))
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport-MI1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport-MI1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport-MI1.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport-MI1.C 2020-10-26 13:07:06.442551000 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-MI1.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport-MI1.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-MI1.C 2021-11-29 16:31:57.271152200 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport-MI1.C 2021-11-29 16:49:32.557598300 +0100
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw*} }
// Test that non-virtual MI thunks are exported.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// Test handling of MI thunks in dllimported classes.
// To build the dll and client app:
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-initialized.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport-initialized.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-initialized.C 2021-11-29 16:31:57.630443000 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport-initialized.C 2021-11-29 16:49:32.556601800 +0100
@@ -1,3 +1,3 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport1.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport1.C 2020-10-26 13:07:06.444512500 +0300
__attribute__((dllimport)) int i __attribute__((unused)) = 0; // { dg-error "32:definition of .int i. is marked .dllimport." }
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport1.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport1.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport1.C 2021-11-29 16:31:57.333637200 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport1.C 2021-11-29 16:49:32.557598300 +0100
@@ -1,5 +1,5 @@
// PR c++/7910
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
@ -127,9 +144,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport1.C gcc-10.2.0/gcc/
// { dg-options { -Wall -W } }
class __attribute__((dllimport)) Foo
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport10.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport10.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport10.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport10.C 2020-10-26 13:07:06.447504400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport10.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport10.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport10.C 2021-11-29 16:31:57.661683500 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport10.C 2021-11-29 16:49:32.557598300 +0100
@@ -1,7 +1,7 @@
// PR c++/5287, c++/11021
// Inherit a virtual method from a dllimport'd base class.
@ -139,9 +156,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport10.C gcc-10.2.0/gcc
struct __attribute__((dllimport)) A
{
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport11.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport11.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport11.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport11.C 2020-10-26 13:07:06.450496300 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport11.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport11.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport11.C 2021-11-29 16:31:57.302395300 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport11.C 2021-11-29 16:49:32.556601800 +0100
@@ -1,6 +1,6 @@
// PR target/23589
// Template member functions do not get dllimport status of class.
@ -150,9 +167,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport11.C gcc-10.2.0/gcc
struct __attribute__((dllimport)) Foo
{
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport12.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport12.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport12.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport12.C 2020-10-26 13:07:06.452491000 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport12.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport12.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport12.C 2021-11-29 16:31:57.427365600 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport12.C 2021-11-29 16:49:32.556601800 +0100
@@ -1,7 +1,7 @@
// PR target/27650
// Don't use dllimport semantics on virtual methods when initializing
@ -162,9 +179,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport12.C gcc-10.2.0/gcc
// Use import lib thunk for vtable entry of explicitly virtual method,
struct base
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport13.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport13.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport13.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport13.C 2020-10-26 13:07:06.455820700 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport13.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport13.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport13.C 2021-11-29 16:31:57.349259000 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport13.C 2021-11-29 16:49:32.557598300 +0100
@@ -1,7 +1,7 @@
// PR c++/34749
// Ensure dllimport is handled correctly for friends
@ -174,27 +191,27 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport13.C gcc-10.2.0/gcc
int __declspec (dllimport) bar();
int __declspec (dllimport) baz();
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport2.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport2.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport2.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport2.C 2020-10-26 13:07:06.458808800 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport2.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport2.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport2.C 2021-11-29 16:31:57.318016200 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport2.C 2021-11-29 16:49:32.556601800 +0100
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// PR c++/9738 Dllimport attribute is overriden by later definition/redeclaration
void __attribute__((dllimport)) Bar(void);
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport3.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport3.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport3.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport3.C 2020-10-26 13:07:06.461801400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport3.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport3.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport3.C 2021-11-29 16:31:57.599199900 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport3.C 2021-11-29 16:49:32.557598300 +0100
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// PR 10148 Dllimport attribute of object is overriden by later
// redefinition without attribute.
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport4.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport4.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport4.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport4.C 2020-10-26 13:07:06.464599000 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport4.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport4.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport4.C 2021-11-29 16:31:57.567957600 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport4.C 2021-11-29 16:49:32.556601800 +0100
@@ -1,5 +1,5 @@
// Report error if dllimport attribute in definition itself.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
@ -202,27 +219,27 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport4.C gcc-10.2.0/gcc/
__attribute__((dllimport)) void bar () { } // { dg-error "definition" }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport5.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport5.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport5.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport5.C 2020-10-26 13:07:06.467278400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport5.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport5.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport5.C 2021-11-29 16:31:57.630443000 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport5.C 2021-11-29 16:49:32.557598300 +0100
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// Report error if static symbol definition has dllimport attribute.
__attribute__((dllimport))
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport6.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport6.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport6.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport6.C 2020-10-26 13:07:06.469183300 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport6.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport6.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport6.C 2021-11-29 16:31:57.677313500 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport6.C 2021-11-29 16:49:32.556601800 +0100
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// Mark class static members as dllimport.
struct Baz
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport7.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport7.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport7.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport7.C 2020-10-26 13:07:06.473208100 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport7.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport7.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport7.C 2021-11-29 16:31:57.318016200 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport7.C 2021-11-29 16:49:32.556601800 +0100
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
@ -238,9 +255,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport7.C gcc-10.2.0/gcc/
const Baz Bar::null_baz; // { dg-warning "redeclared without dllimport" }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport8.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport8.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport8.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport8.C 2020-10-26 13:07:06.476192000 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport8.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport8.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport8.C 2021-11-29 16:31:57.599199900 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport8.C 2021-11-29 16:49:32.556601800 +0100
@@ -2,7 +2,7 @@
// Ignore dllimport of static members if marked inlined.
// or if definition follows declaration in dllimported class.
@ -250,9 +267,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport8.C gcc-10.2.0/gcc/
// { dg-options { -Wall -W } }
struct __attribute__((dllimport)) Foo
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport9.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport9.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport9.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport9.C 2020-10-26 13:07:06.479183900 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport9.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport9.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport9.C 2021-11-29 16:31:57.286773600 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/dllimport9.C 2021-11-29 16:49:32.557598300 +0100
@@ -1,5 +1,5 @@
// Handle dllimport attribute for functions declared inline.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
@ -260,44 +277,27 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport9.C gcc-10.2.0/gcc/
// { dg-options { -W } }
inline __attribute__((dllimport)) void bar() { } // { dg-warning "inline" }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-initialized.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport-initialized.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-initialized.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport-initialized.C 2020-10-26 13:07:06.481178400 +0300
@@ -1,3 +1,3 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
__attribute__((dllimport)) int i __attribute__((unused)) = 0; // { dg-error "32:definition of .int i. is marked .dllimport." }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-MI1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport-MI1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-MI1.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport-MI1.C 2020-10-26 13:07:06.484664700 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// Test handling of MI thunks in dllimported classes.
// To build the dll and client app:
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/selectany1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/selectany1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/selectany1.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/selectany1.C 2020-10-26 13:07:06.486658500 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/selectany1.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/selectany1.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/selectany1.C 2021-11-29 16:31:57.521094200 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/selectany1.C 2021-11-29 16:37:36.184085400 +0100
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-pc-cygwin } }
+// { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } }
// { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
// Check that selectany attribute puts symbols into link-once sections.
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/selectany2.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/selectany2.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/selectany2.C 2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/selectany2.C 2020-10-26 13:07:06.490647700 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/selectany2.C gcc-11.2.0/gcc/testsuite/g++.dg/ext/selectany2.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/ext/selectany2.C 2021-11-29 16:31:57.286773600 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/ext/selectany2.C 2021-11-29 16:37:36.184085400 +0100
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-pc-cygwin } }
+// { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } }
// { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
// Check for errors with invalid usage of selectany attribute.
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/opt/vt1.C gcc-10.2.0/gcc/testsuite/g++.dg/opt/vt1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/opt/vt1.C 2020-07-23 09:35:18.004391800 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/opt/vt1.C 2020-10-26 13:09:25.904916400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/opt/vt1.C gcc-11.2.0/gcc/testsuite/g++.dg/opt/vt1.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/opt/vt1.C 2021-11-29 16:32:03.240896500 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/opt/vt1.C 2021-11-29 16:50:13.664297700 +0100
@@ -1,7 +1,7 @@
// Test whether vtable for S is not put into read-only section.
// { dg-do compile { target fpic } }
@ -307,9 +307,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/opt/vt1.C gcc-10.2.0/gcc/testsui
// Origin: Jakub Jelinek <jakub@redhat.com>
struct S
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/template/spec35.C gcc-10.2.0/gcc/testsuite/g++.dg/template/spec35.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/template/spec35.C 2020-07-23 09:35:18.028392000 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/template/spec35.C 2020-10-26 13:07:06.498280400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.dg/template/spec35.C gcc-11.2.0/gcc/testsuite/g++.dg/template/spec35.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.dg/template/spec35.C 2021-11-29 16:32:00.631036400 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.dg/template/spec35.C 2021-11-29 16:50:13.664297700 +0100
@@ -24,6 +24,6 @@
// { dg-final { scan-assembler-not ".glob(a|)l\[\t \]*_?_Z2f1IiEvT_" } }
f1(0); // Expected to have static linkage
@ -318,18 +318,18 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/template/spec35.C gcc-10.2.0/gcc
+ // { dg-final { scan-assembler ".weak(_definition)?\[\t \]*_?_Z2f2IiEvT_" { target { ! { *-*-mingw* *-*-cygwin *-*-msys } } } } }
f2(0); // Expected to have weak global linkage
}
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C gcc-10.2.0/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C 2020-07-23 09:35:18.052392300 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C 2020-10-26 13:07:06.501420700 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C gcc-11.2.0/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
--- gcc-11.2.0-orig/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C 2021-11-29 16:31:54.561915200 +0100
+++ gcc-11.2.0/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C 2021-11-29 16:37:36.184085400 +0100
@@ -1,4 +1,4 @@
-// { dg-do run { xfail i?86-pc-cygwin } }
+// { dg-do run { xfail i?86-pc-cygwin i?86-pc-msys } }
// Test that attributes weak and alias coexist.
// { dg-require-weak "" }
// { dg-require-alias "" }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-attrib.c gcc-10.2.0/gcc/testsuite/gcc.dg/bf-ms-attrib.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-attrib.c 2020-07-23 09:35:18.128393100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/bf-ms-attrib.c 2020-10-26 13:07:06.504609800 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-attrib.c gcc-11.2.0/gcc/testsuite/gcc.dg/bf-ms-attrib.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-attrib.c 2021-11-29 16:31:46.975785100 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/bf-ms-attrib.c 2021-11-29 16:43:00.090274000 +0100
@@ -3,7 +3,7 @@
posted to GCC-patches
http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */
@ -339,9 +339,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-attrib.c gcc-10.2.0/gcc/te
/* We don't want the default "pedantic-errors" in this case, since we're
testing nonstandard stuff to begin with. */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-layout-3.c gcc-10.2.0/gcc/testsuite/gcc.dg/bf-ms-layout-3.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-layout-3.c 2020-07-23 09:35:18.128393100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/bf-ms-layout-3.c 2020-10-26 13:07:06.507901600 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-layout-3.c gcc-11.2.0/gcc/testsuite/gcc.dg/bf-ms-layout-3.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-layout-3.c 2021-11-29 16:31:49.479092400 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/bf-ms-layout-3.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,5 +1,5 @@
/* Test for MS bitfield layout */
-/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-* x86_64-*-* } } */
@ -349,9 +349,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-layout-3.c gcc-10.2.0/gcc/
extern void abort();
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-no-ms-layout.c gcc-10.2.0/gcc/testsuite/gcc.dg/bf-no-ms-layout.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-no-ms-layout.c 2020-07-23 09:35:18.128393100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/bf-no-ms-layout.c 2020-10-26 13:07:06.510823900 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/bf-no-ms-layout.c gcc-11.2.0/gcc/testsuite/gcc.dg/bf-no-ms-layout.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/bf-no-ms-layout.c 2021-11-29 16:31:50.182051100 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/bf-no-ms-layout.c 2021-11-29 16:43:00.090274000 +0100
@@ -5,7 +5,7 @@
posted to GCC-patches
http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */
@ -361,9 +361,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-no-ms-layout.c gcc-10.2.0/gcc
/* { dg-options "-mno-ms-bitfields" } */
#include <stddef.h>
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-3.c gcc-10.2.0/gcc/testsuite/gcc.dg/dll-3.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-3.c 2020-07-23 09:35:18.148393400 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/dll-3.c 2020-10-26 13:07:06.514064900 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/dll-3.c gcc-11.2.0/gcc/testsuite/gcc.dg/dll-3.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/dll-3.c 2021-11-29 16:31:47.867770700 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/dll-3.c 2021-11-29 16:37:36.184085400 +0100
@@ -1,7 +1,7 @@
/* Ensure dllexport overrides dllimport. */
@ -373,9 +373,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-3.c gcc-10.2.0/gcc/testsuite
/* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw*} } */
__declspec (dllimport) int foo1 ();
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-4.c gcc-10.2.0/gcc/testsuite/gcc.dg/dll-4.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-4.c 2020-07-23 09:35:18.148393400 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/dll-4.c 2020-10-26 13:07:06.516725400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/dll-4.c gcc-11.2.0/gcc/testsuite/gcc.dg/dll-4.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/dll-4.c 2021-11-29 16:31:52.134717100 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/dll-4.c 2021-11-29 16:37:36.184085400 +0100
@@ -1,5 +1,5 @@
/* { dg-do compile { target arm*-*-pe* } } */
-/* { dg-do compile { target i?86-pc-cygwin } } */
@ -383,36 +383,36 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-4.c gcc-10.2.0/gcc/testsuite
/* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } } */
__declspec (dllimport) int foo1;
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-5.c gcc-10.2.0/gcc/testsuite/gcc.dg/dll-5.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-5.c 2020-07-23 09:35:18.148393400 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/dll-5.c 2020-10-26 13:07:06.519688300 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/dll-5.c gcc-11.2.0/gcc/testsuite/gcc.dg/dll-5.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/dll-5.c 2021-11-29 16:31:51.150581400 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/dll-5.c 2021-11-29 16:37:36.184085400 +0100
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
/* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } } */
/* { dg-do compile { target arm*-*-pe* } } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-8.c gcc-10.2.0/gcc/testsuite/gcc.dg/dll-8.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-8.c 2020-07-23 09:35:18.148393400 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/dll-8.c 2020-10-26 13:07:06.522680200 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/dll-8.c gcc-11.2.0/gcc/testsuite/gcc.dg/dll-8.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/dll-8.c 2021-11-29 16:31:46.087502800 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/dll-8.c 2021-11-29 16:37:36.184085400 +0100
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
/* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw*} } */
/* { dg-options "-O3 -fwhole-program" } */
/* { dg-final { scan-assembler "foo1" } } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/graphite/run-id-1.c gcc-10.2.0/gcc/testsuite/gcc.dg/graphite/run-id-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/graphite/run-id-1.c 2020-07-23 09:35:18.160393500 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/graphite/run-id-1.c 2020-10-26 13:07:06.525672100 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/graphite/run-id-1.c gcc-11.2.0/gcc/testsuite/gcc.dg/graphite/run-id-1.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/graphite/run-id-1.c 2021-11-29 16:31:50.885010700 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/graphite/run-id-1.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,4 +1,4 @@
-/* { dg-options "-Wl,--stack,12582912" { target *-*-mingw* *-*-cygwin* } } */
+/* { dg-options "-Wl,--stack,12582912" { target *-*-mingw* *-*-cygwin* *-*-msys* } } */
/* { dg-require-effective-target size32plus } */
/* { dg-require-stack-size "4*1000*1000" } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/lto/20090914-2_0.c gcc-10.2.0/gcc/testsuite/gcc.dg/lto/20090914-2_0.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/lto/20090914-2_0.c 2020-07-23 09:35:18.168393600 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/lto/20090914-2_0.c 2020-10-26 13:07:06.527666600 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/lto/20090914-2_0.c gcc-11.2.0/gcc/testsuite/gcc.dg/lto/20090914-2_0.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/lto/20090914-2_0.c 2021-11-29 16:31:45.752462600 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/lto/20090914-2_0.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,7 +1,7 @@
/* { dg-lto-do run } */
/* { dg-skip-if "x86 only" { ! { x86_64-*-* i?86-*-* } } } */
@ -422,15 +422,15 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/lto/20090914-2_0.c gcc-10.2.0/gc
/* Doesn't work without this dummy function with -fwhopr. */
int foo(void) { }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c gcc-10.2.0/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c 2020-07-23 09:35:18.220394200 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c 2020-10-26 13:07:06.531449900 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c gcc-11.2.0/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c 2021-11-29 16:31:48.541158800 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c 2021-11-29 16:49:32.556601800 +0100
@@ -46,10 +46,10 @@
/* CRIS and MSP430 keep the address in a register. */
/* m68k sometimes puts the address in a register, depending on CPU and PIC. */
-/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* x86_64-*-mingw* visium-*-* nvptx*-*-* pdp11*-*-* msp430-*-* amdgcn*-*-* } } } */
+/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* i?86-*-msys* x86_64-*-mingw* visium-*-* nvptx*-*-* pdp11*-*-* msp430-*-* amdgcn*-*-* } } } */
-/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* x86_64-*-mingw* visium-*-* nvptx*-*-* pdp11*-*-* msp430-*-* amdgcn*-*-* } } } */
+/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* i?86-*-msys* x86_64-*-mingw* visium-*-* nvptx*-*-* pdp11*-*-* msp430-*-* amdgcn*-*-* } } } */
/* { dg-final { scan-assembler-times "foo,%r" 5 { target hppa*-*-* } } } */
/* { dg-final { scan-assembler-times "= foo" 5 { target ia64*-*-* } } } */
-/* { dg-final { scan-assembler-times "call\[ \t\]*_foo" 5 { target i?86-*-mingw* i?86-*-cygwin* } } } */
@ -438,27 +438,27 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c gcc-10.2.0/gcc
/* { dg-final { scan-assembler-times "call\[ \t\]*foo" 5 { target x86_64-*-mingw* } } } */
/* { dg-final { scan-assembler-times "jsr|bsrf|blink\ttr?,r18" 5 { target sh*-*-* } } } */
/* { dg-final { scan-assembler-times "Jsr \\\$r" 5 { target cris-*-* } } } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c gcc-10.2.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c 2020-07-23 09:35:18.232394300 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c 2020-10-26 13:07:06.535440200 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c gcc-11.2.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c 2021-11-29 16:31:49.197252300 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c 2021-11-29 16:43:00.090274000 +0100
@@ -10,4 +10,4 @@
/* There should be a reference to conststaticvariable since it may
may be overriden at link time. */
-/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { xfail { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { xfail { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/fastcall-1.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/fastcall-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/fastcall-1.c 2020-07-23 09:35:18.388396000 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/fastcall-1.c 2020-10-26 13:07:06.538432200 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/fastcall-1.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/fastcall-1.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/fastcall-1.c 2021-11-29 16:32:16.686052200 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/fastcall-1.c 2021-11-29 16:49:32.556601800 +0100
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-mingw32* i?86-*-cygwin* } } */
+/* { dg-do compile { target i?86-*-mingw32* i?86-*-cygwin* i?86-*-msys* } } */
/* { dg-options "-std=gnu89" } */
void
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pad-4.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pad-4.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pad-4.c 2020-07-23 09:35:18.392396000 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pad-4.c 2020-10-26 13:07:06.541424000 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pad-4.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/pad-4.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pad-4.c 2021-11-29 16:32:16.988650600 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/pad-4.c 2021-11-29 16:50:13.664297700 +0100
@@ -2,7 +2,7 @@
/* { dg-require-effective-target ia32 } */
/* { dg-require-effective-target fpic } */
@ -468,9 +468,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pad-4.c gcc-10.2.0/gcc/
/* { dg-options "-O2 -fomit-frame-pointer -march=atom -fPIC" } */
/* { dg-final { scan-assembler-times "nop" 8 } } */
/* { dg-final { scan-assembler-not "rep" } } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pic-1.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pic-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pic-1.c 2020-07-23 09:35:18.392396000 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pic-1.c 2020-10-26 13:07:06.544416200 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pic-1.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/pic-1.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pic-1.c 2021-11-29 16:32:17.482191600 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/pic-1.c 2021-11-29 16:50:13.664297700 +0100
@@ -2,7 +2,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */
@ -480,9 +480,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pic-1.c gcc-10.2.0/gcc/
/* { dg-options "-fPIC" } */
/* Test verifies that %ebx is no longer fixed when generating PIC code on i686. */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr25993.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr25993.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr25993.c 2020-10-26 12:02:06.876358600 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr25993.c 2020-10-26 13:07:06.546410800 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr25993.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr25993.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr25993.c 2021-11-29 16:32:16.146175000 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr25993.c 2021-11-29 17:00:50.001181700 +0100
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" } } */
@ -490,9 +490,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr25993.c gcc-10.2.0/gc
/* { dg-options "-std=c99 -x assembler-with-cpp" } */
#ifndef __ASSEMBLER__
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-1.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr40906-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-1.c 2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr40906-1.c 2020-10-26 13:07:06.549062300 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-1.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr40906-1.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-1.c 2021-11-29 16:32:18.167171900 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr40906-1.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-require-effective-target ia32 } */
@ -502,9 +502,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-1.c gcc-10.2.0/
void abort (void);
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-2.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr40906-2.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-2.c 2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr40906-2.c 2020-10-26 13:07:06.552082600 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-2.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr40906-2.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-2.c 2021-11-29 16:32:15.885904100 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr40906-2.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-require-effective-target ia32 } */
@ -514,9 +514,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-2.c gcc-10.2.0/
void abort (void);
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr46226.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr46226.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr46226.c 2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr46226.c 2020-10-26 13:07:06.555046200 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr46226.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr46226.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr46226.c 2021-11-29 16:32:15.948389100 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr46226.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-options "-Os -fomit-frame-pointer -fno-asynchronous-unwind-tables" } */
@ -525,9 +525,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr46226.c gcc-10.2.0/gc
extern void abort(void);
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-1.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr56564-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-1.c 2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr56564-1.c 2020-10-26 13:07:06.558391100 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-1.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr56564-1.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-1.c 2021-11-29 16:32:17.195959800 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr56564-1.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,6 +1,6 @@
/* PR target/56564 */
/* { dg-do compile { target { fpic && lp64 } } } */
@ -536,9 +536,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-1.c gcc-10.2.0/
/* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
struct S { long a, b; } s = { 5, 6 };
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-3.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr56564-3.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-3.c 2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr56564-3.c 2020-10-26 13:07:06.561501600 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-3.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr56564-3.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-3.c 2021-11-29 16:32:17.190979200 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/pr56564-3.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,6 +1,6 @@
/* PR target/56564 */
/* { dg-do compile { target { fpic && lp64 } } } */
@ -547,9 +547,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-3.c gcc-10.2.0/
/* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
__thread struct S { long a, b; } s = { 5, 6 };
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/sse-10.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/sse-10.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/sse-10.c 2020-07-23 09:35:18.408396200 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/sse-10.c 2020-10-26 13:07:06.564157200 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/sse-10.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/sse-10.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/sse-10.c 2021-11-29 16:32:16.114932400 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/sse-10.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,7 +1,7 @@
/* PR 17930 */
/* { dg-do run } */
@ -559,18 +559,18 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/sse-10.c gcc-10.2.0/gcc
/* { dg-require-effective-target sse2 } */
#include "sse2-check.h"
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/stack-realign-win.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/stack-realign-win.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/stack-realign-win.c 2020-07-23 09:35:18.412396300 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/stack-realign-win.c 2020-10-26 13:07:06.567119400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/stack-realign-win.c gcc-11.2.0/gcc/testsuite/gcc.target/i386/stack-realign-win.c
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/i386/stack-realign-win.c 2021-11-29 16:32:15.032050500 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/i386/stack-realign-win.c 2021-11-29 16:43:00.090274000 +0100
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-mingw* *-*-cygwin* } } */
+/* { dg-do compile { target *-*-mingw* *-*-cygwin* *-*-msys* } } */
/* { dg-require-effective-target ia32 } */
/* { dg-options "-msse -O" } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp gcc-10.2.0/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp 2020-07-23 09:35:18.460396800 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp 2020-10-26 13:07:06.570111200 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp gcc-11.2.0/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
--- gcc-11.2.0-orig/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp 2021-11-29 16:32:14.321921800 +0100
+++ gcc-11.2.0/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp 2021-11-29 17:13:15.000596100 +0100
@@ -144,7 +144,7 @@
runtest_ms_sysv "$cflags" "$gen_opts"
@ -580,78 +580,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.e
runtest_ms_sysv "-mcall-ms2sysv-xlogues$cflags" "$gen_opts"
}
}
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2020-07-23 09:35:18.496397200 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2020-10-26 13:07:06.574100400 +0300
@@ -16,9 +16,9 @@
call test(aa)
end
-! { dg-final { scan-assembler-times "\[ \t\]\[$,_0-9\]*myBindC" 1 { target { ! { hppa*-*-* s390*-*-* *-*-cygwin* amdgcn*-*-* } } } } }
+! { dg-final { scan-assembler-times "\[ \t\]\[$,_0-9\]*myBindC" 1 { target { ! { hppa*-*-* s390*-*-* *-*-cygwin* *-*-msys* amdgcn*-*-* } } } } }
! { dg-final { scan-assembler-times "myBindC,%r2" 1 { target { hppa*-*-* } } } }
-! { dg-final { scan-assembler-times "call\tmyBindC" 1 { target { *-*-cygwin* } } } }
+! { dg-final { scan-assembler-times "call\tmyBindC" 1 { target { *-*-cygwin* *-*-msys* } } } }
! { dg-final { scan-assembler-times "brasl\t%r\[0-9\]*,myBindC" 1 { target { s390*-*-* } } } }
! { dg-final { scan-assembler-times "add_u32\t\[sv\]\[0-9\]*, \[sv\]\[0-9\]*, myBindC@rel32@lo" 1 { target { amdgcn*-*-* } } } }
! { dg-final { scan-tree-dump-times "cfi_desc_to_gfc_desc \\\(&parm\\." 1 "original" } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_1.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_1.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_1.f90 2020-07-23 09:35:18.504397300 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_1.f90 2020-10-26 13:10:06.927030700 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } }
! { dg-options "-std=gnu" }
! See PR38956. Test fails on cygwin when user has Administrator rights
implicit none
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_2.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_2.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_2.f90 2020-07-23 09:35:18.504397300 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_2.f90 2020-10-26 13:10:20.714898700 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } }
! { dg-options "-std=gnu" }
! See PR38956. Test fails on cygwin when user has Administrator rights
implicit none
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_3.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_3.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_3.f90 2020-07-23 09:35:18.504397300 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_3.f90 2020-10-26 13:10:31.338725600 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } }
! { dg-options "-std=gnu -fdefault-integer-8" }
! See PR38956. Test fails on cygwin when user has Administrator rights
implicit none
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 2020-07-23 09:35:18.512397400 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 2020-10-26 13:11:08.149028800 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { xfail *-*-darwin[89]* *-*-cygwin* } }
+! { dg-do run { xfail *-*-darwin[89]* *-*-cygwin* *-*-msys* } }
! Test XFAILed on these platforms because the system's printf() lacks
! proper support for denormals.
!
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/open_errors.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/open_errors.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/open_errors.f90 2020-07-23 09:35:18.540397700 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/open_errors.f90 2020-10-26 13:11:32.908799900 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } }
! PR30005 Enhanced error messages for OPEN
! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
! See PR38956. Test fails on cygwin when user has Administrator rights
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/winapi.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/winapi.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/winapi.f90 2020-07-23 09:35:18.564397900 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/winapi.f90 2020-10-26 13:07:06.610016800 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target *-*-cygwin* *-*-mingw* } }
+! { dg-do run { target *-*-cygwin* *-*-msys* *-*-mingw* } }
! { dg-options "-lkernel32" }
! Test case provided by Dennis Wassel.
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/g++.exp gcc-10.2.0/gcc/testsuite/lib/g++.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/g++.exp 2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/g++.exp 2020-10-26 13:07:06.614049400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/lib/g++.exp gcc-11.2.0/gcc/testsuite/lib/g++.exp
--- gcc-11.2.0-orig/gcc/testsuite/lib/g++.exp 2021-11-29 16:31:41.218990500 +0100
+++ gcc-11.2.0/gcc/testsuite/lib/g++.exp 2021-11-29 17:13:44.996201200 +0100
@@ -205,7 +205,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
@ -661,9 +592,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/g++.exp gcc-10.2.0/gcc/testsuite/li
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/gcc-dg.exp gcc-10.2.0/gcc/testsuite/lib/gcc-dg.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/gcc-dg.exp 2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/gcc-dg.exp 2020-10-26 13:07:06.617486000 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/lib/gcc-dg.exp gcc-11.2.0/gcc/testsuite/lib/gcc-dg.exp
--- gcc-11.2.0-orig/gcc/testsuite/lib/gcc-dg.exp 2021-11-29 16:31:41.203368700 +0100
+++ gcc-11.2.0/gcc/testsuite/lib/gcc-dg.exp 2021-11-29 16:41:26.248499200 +0100
@@ -40,7 +40,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
@ -673,21 +604,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/gcc-dg.exp gcc-10.2.0/gcc/testsuite
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/gfortran.exp gcc-10.2.0/gcc/testsuite/lib/gfortran.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/gfortran.exp 2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/gfortran.exp 2020-10-26 13:07:06.620615100 +0300
@@ -161,7 +161,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
- if { [ishost "*-*-cygwin*"] } {
+ if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/objc.exp gcc-10.2.0/gcc/testsuite/lib/objc.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/objc.exp 2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/objc.exp 2020-10-26 13:07:06.624053400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/lib/objc.exp gcc-11.2.0/gcc/testsuite/lib/objc.exp
--- gcc-11.2.0-orig/gcc/testsuite/lib/objc.exp 2021-11-29 16:31:41.203368700 +0100
+++ gcc-11.2.0/gcc/testsuite/lib/objc.exp 2021-11-29 16:41:26.248499200 +0100
@@ -105,7 +105,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
@ -697,9 +616,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/objc.exp gcc-10.2.0/gcc/testsuite/l
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/options.exp gcc-10.2.0/gcc/testsuite/lib/options.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/options.exp 2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/options.exp 2020-10-26 13:07:06.626077400 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/lib/options.exp gcc-11.2.0/gcc/testsuite/lib/options.exp
--- gcc-11.2.0-orig/gcc/testsuite/lib/options.exp 2021-11-29 16:31:41.203368700 +0100
+++ gcc-11.2.0/gcc/testsuite/lib/options.exp 2021-11-29 16:41:26.248499200 +0100
@@ -20,7 +20,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
@ -709,9 +628,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/options.exp gcc-10.2.0/gcc/testsuit
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-libpath.exp gcc-10.2.0/gcc/testsuite/lib/target-libpath.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/target-libpath.exp 2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/target-libpath.exp 2020-10-26 13:07:06.630058500 +0300
diff -Naur gcc-11.2.0-orig/gcc/testsuite/lib/target-libpath.exp gcc-11.2.0/gcc/testsuite/lib/target-libpath.exp
--- gcc-11.2.0-orig/gcc/testsuite/lib/target-libpath.exp 2021-11-29 16:31:41.218990500 +0100
+++ gcc-11.2.0/gcc/testsuite/lib/target-libpath.exp 2021-11-29 16:42:40.206951900 +0100
@@ -171,7 +171,7 @@
} else {
setenv DYLD_LIBRARY_PATH "$ld_library_path"
@ -730,10 +649,10 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-libpath.exp gcc-10.2.0/gcc/t
set shlib_ext "dll"
} elseif { [istarget hppa*-*-hpux*] } {
set shlib_ext "sl"
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-supports.exp gcc-10.2.0/gcc/testsuite/lib/target-supports.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/target-supports.exp 2020-07-23 09:35:18.612398500 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/target-supports.exp 2020-10-26 13:07:06.636118300 +0300
@@ -301,7 +301,7 @@
diff -Naur gcc-11.2.0-orig/gcc/testsuite/lib/target-supports.exp gcc-11.2.0/gcc/testsuite/lib/target-supports.exp
--- gcc-11.2.0-orig/gcc/testsuite/lib/target-supports.exp 2021-11-29 16:31:41.187747200 +0100
+++ gcc-11.2.0/gcc/testsuite/lib/target-supports.exp 2021-11-29 16:44:39.750478200 +0100
@@ -304,7 +304,7 @@
# Windows targets Cygwin and MingW32 support it
@ -742,7 +661,7 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-supports.exp gcc-10.2.0/gcc/
return 1
}
@@ -678,6 +678,11 @@
@@ -699,6 +699,11 @@
return 0
}
@ -750,11 +669,11 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-supports.exp gcc-10.2.0/gcc/
+ if { [istarget *-*-msys*] && $test_what == "-p" } {
+ return 0
+ }
+
+
# uClibc does not have gcrt1.o.
if { [check_effective_target_uclibc]
&& ($test_what == "-p" || $test_what == "-pg") } {
@@ -1111,7 +1116,7 @@
@@ -1137,7 +1142,7 @@
# for trivial code, 0 otherwise.
proc check_effective_target_pe_aligned_commons {} {
@ -763,7 +682,7 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-supports.exp gcc-10.2.0/gcc/
return [check_no_compiler_messages pe_aligned_commons object {
int foo;
} "-mpe-aligned-commons"]
@@ -2598,7 +2603,7 @@
@@ -2629,7 +2634,7 @@
# Returns true iff "mkfifo" is available on the target system.
proc check_mkfifo_available {} {
@ -772,7 +691,7 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-supports.exp gcc-10.2.0/gcc/
# Cygwin has mkfifo, but support is incomplete.
return 0
}
@@ -8218,7 +8223,7 @@
@@ -8549,7 +8554,7 @@
proc check_effective_target_automatic_stack_alignment { } {
# Ordinarily x86 supports automatic stack alignment ...
if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then {
@ -781,9 +700,9 @@ diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-supports.exp gcc-10.2.0/gcc/
# ... except Win64 SEH doesn't. Succeed for Win32 though.
return [check_effective_target_ilp32];
}
diff -Naur gcc-10.2.0-orig/libffi/testsuite/lib/target-libpath.exp gcc-10.2.0/libffi/testsuite/lib/target-libpath.exp
--- gcc-10.2.0-orig/libffi/testsuite/lib/target-libpath.exp 2020-07-23 09:35:18.744399900 +0300
+++ gcc-10.2.0/libffi/testsuite/lib/target-libpath.exp 2020-10-26 13:07:06.640139000 +0300
diff -Naur gcc-11.2.0-orig/libffi/testsuite/lib/target-libpath.exp gcc-11.2.0/libffi/testsuite/lib/target-libpath.exp
--- gcc-11.2.0-orig/libffi/testsuite/lib/target-libpath.exp 2021-11-29 16:32:26.588682200 +0100
+++ gcc-11.2.0/libffi/testsuite/lib/target-libpath.exp 2021-11-29 16:56:14.258512200 +0100
@@ -175,7 +175,7 @@
} else {
setenv DYLD_LIBRARY_PATH "$ld_library_path"
@ -802,10 +721,10 @@ diff -Naur gcc-10.2.0-orig/libffi/testsuite/lib/target-libpath.exp gcc-10.2.0/li
set shlib_ext "dll"
} elseif { [ istarget hppa*-*-hpux* ] } {
set shlib_ext "sl"
diff -Naur gcc-10.2.0-orig/libgomp/testsuite/lib/libgomp.exp gcc-10.2.0/libgomp/testsuite/lib/libgomp.exp
--- gcc-10.2.0-orig/libgomp/testsuite/lib/libgomp.exp 2020-07-23 09:35:19.020403000 +0300
+++ gcc-10.2.0/libgomp/testsuite/lib/libgomp.exp 2020-10-26 13:07:06.644097900 +0300
@@ -82,7 +82,7 @@
diff -Naur gcc-11.2.0-orig/libgomp/testsuite/lib/libgomp.exp gcc-11.2.0/libgomp/testsuite/lib/libgomp.exp
--- gcc-11.2.0-orig/libgomp/testsuite/lib/libgomp.exp 2021-11-29 16:32:36.634229900 +0100
+++ gcc-11.2.0/libgomp/testsuite/lib/libgomp.exp 2021-11-29 16:56:51.718594500 +0100
@@ -83,7 +83,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
@ -814,9 +733,21 @@ diff -Naur gcc-10.2.0-orig/libgomp/testsuite/lib/libgomp.exp gcc-10.2.0/libgomp/
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-10.2.0-orig/libstdc++-v3/testsuite/lib/libstdc++.exp gcc-10.2.0/libstdc++-v3/testsuite/lib/libstdc++.exp
--- gcc-10.2.0-orig/libstdc++-v3/testsuite/lib/libstdc++.exp 2020-07-23 09:35:19.408407200 +0300
+++ gcc-10.2.0/libstdc++-v3/testsuite/lib/libstdc++.exp 2020-10-26 13:07:06.648087200 +0300
diff -Naur gcc-11.2.0-orig/libstdc++-v3/testsuite/27_io/filesystem/path/concat/94063.cc gcc-11.2.0/libstdc++-v3/testsuite/27_io/filesystem/path/concat/94063.cc
--- gcc-11.2.0-orig/libstdc++-v3/testsuite/27_io/filesystem/path/concat/94063.cc 2021-11-29 16:32:28.766162200 +0100
+++ gcc-11.2.0/libstdc++-v3/testsuite/27_io/filesystem/path/concat/94063.cc 2021-11-29 16:58:04.162728000 +0100
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-do run { target { *-*-*mingw* || *-*-cygwin } } }
+// { dg-do run { target { *-*-*mingw* || *-*-cygwin || *-*-msys } } }
// { dg-require-effective-target c++17 }
#include <filesystem>
diff -Naur gcc-11.2.0-orig/libstdc++-v3/testsuite/lib/libstdc++.exp gcc-11.2.0/libstdc++-v3/testsuite/lib/libstdc++.exp
--- gcc-11.2.0-orig/libstdc++-v3/testsuite/lib/libstdc++.exp 2021-11-29 16:32:27.482748500 +0100
+++ gcc-11.2.0/libstdc++-v3/testsuite/lib/libstdc++.exp 2021-11-29 16:57:48.174417300 +0100
@@ -113,7 +113,7 @@
# Many hosts now default to a non-ASCII C locale, however, so

View File

@ -0,0 +1,364 @@
From 777aa930b106fea2dd6ed9fe22b42a2717f1472d Mon Sep 17 00:00:00 2001
From: Aldy Hernandez <aldyh@redhat.com>
Date: Mon, 15 May 2023 12:25:58 +0200
Subject: [PATCH] [GCC13] Add auto-resizing capability to irange's [PR109695]
Backport the following from trunk.
Note that the patch has been adapted to trees.
The numbers for various sub-ranges on GCC13 are:
< 2> = 64 bytes, -3.02% for VRP.
< 3> = 80 bytes, -2.67% for VRP.
< 8> = 160 bytes, -2.46% for VRP.
<16> = 288 bytes, -2.40% for VRP.
<tldr>
We can now have int_range<N, RESIZABLE=false> for automatically
resizable ranges. int_range_max is now int_range<3, true>
for a 69X reduction in size from current trunk, and 6.9X reduction from
GCC12. This incurs a 5% performance penalty for VRP that is more than
covered by our > 13% improvements recently.
</tldr>
int_range_max is the temporary range object we use in the ranger for
integers. With the conversion to wide_int, this structure bloated up
significantly because wide_ints are huge (80 bytes a piece) and are
about 10 times as big as a plain tree. Since the temporary object
requires 255 sub-ranges, that's 255 * 80 * 2, plus the control word.
This means the structure grew from 4112 bytes to 40912 bytes.
This patch adds the ability to resize ranges as needed, defaulting to
no resizing, while int_range_max now defaults to 3 sub-ranges (instead
of 255) and grows to 255 when the range being calculated does not fit.
For example:
int_range<1> foo; // 1 sub-range with no resizing.
int_range<5> foo; // 5 sub-ranges with no resizing.
int_range<5, true> foo; // 5 sub-ranges with resizing.
I ran some tests and found that 3 sub-ranges cover 99% of cases, so
I've set the int_range_max default to that:
typedef int_range<3, /*RESIZABLE=*/true> int_range_max;
We don't bother growing incrementally, since the default covers most
cases and we have a 255 hard-limit. This hard limit could be reduced
to 128, since my tests never saw a range needing more than 124, but we
could do that as a follow-up if needed.
With 3-subranges, int_range_max is now 592 bytes versus 40912 for
trunk, and versus 4112 bytes for GCC12! The penalty is 5.04% for VRP
and 3.02% for threading, with no noticeable change in overall
compilation (0.27%). This is more than covered by our 13.26%
improvements for the legacy removal + wide_int conversion.
I think this approach is a good alternative, while providing us with
flexibility going forward. For example, we could try defaulting to a
8 sub-ranges for a noticeable improvement in VRP. We could also use
large sub-ranges for switch analysis to avoid resizing.
Another approach I tried was always resizing. With this, we could
drop the whole int_range<N> nonsense, and have irange just hold a
resizable range. This simplified things, but incurred a 7% penalty on
ipa_cp. This was hard to pinpoint, and I'm not entirely convinced
this wasn't some artifact of valgrind. However, until we're sure,
let's avoid massive changes, especially since IPA changes are coming
up.
For the curious, a particular hot spot for IPA in this area was:
ipcp_vr_lattice::meet_with_1 (const value_range *other_vr)
{
...
...
value_range save (m_vr);
m_vr.union_ (*other_vr);
return m_vr != save;
}
The problem isn't the resizing (since we do that at most once) but the
fact that for some functions with lots of callers we end up a huge
range that gets copied and compared for every meet operation. Maybe
the IPA algorithm could be adjusted somehow??.
Anywhooo... for now there is nothing to worry about, since value_range
still has 2 subranges and is not resizable. But we should probably
think what if anything we want to do here, as I envision IPA using
infinite ranges here (well, int_range_max) and handling frange's, etc.
gcc/ChangeLog:
PR tree-optimization/109695
* value-range.cc (irange::operator=): Resize range.
(irange::union_): Same.
(irange::intersect): Same.
(irange::invert): Same.
(int_range_max): Default to 3 sub-ranges and resize as needed.
* value-range.h (irange::maybe_resize): New.
(~int_range): New.
(int_range::int_range): Adjust for resizing.
(int_range::operator=): Same.
---
gcc/value-range-storage.h | 2 +-
gcc/value-range.cc | 15 ++++++
gcc/value-range.h | 96 +++++++++++++++++++++++++++------------
3 files changed, 83 insertions(+), 30 deletions(-)
diff --git a/gcc/value-range-storage.h b/gcc/value-range-storage.h
index 6da377ebd2e..1ed6f1ccd61 100644
--- a/gcc/value-range-storage.h
+++ b/gcc/value-range-storage.h
@@ -184,7 +184,7 @@ vrange_allocator::alloc_irange (unsigned num_pairs)
// Allocate the irange and required memory for the vector.
void *r = alloc (sizeof (irange));
tree *mem = static_cast <tree *> (alloc (nbytes));
- return new (r) irange (mem, num_pairs);
+ return new (r) irange (mem, num_pairs, /*resizable=*/false);
}
inline frange *
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index ec826c2fe1b..753f5e8cc76 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -831,6 +831,10 @@ irange::operator= (const irange &src)
copy_to_legacy (src);
return *this;
}
+
+ int needed = src.num_pairs ();
+ maybe_resize (needed);
+
if (src.legacy_mode_p ())
{
copy_legacy_to_multi_range (src);
@@ -2506,6 +2510,7 @@ irange::irange_union (const irange &r)
// Now it simply needs to be copied, and if there are too many
// ranges, merge some. We wont do any analysis as to what the
// "best" merges are, simply combine the final ranges into one.
+ maybe_resize (i / 2);
if (i > m_max_ranges * 2)
{
res[m_max_ranges * 2 - 1] = res[i - 1];
@@ -2605,6 +2610,11 @@ irange::irange_intersect (const irange &r)
if (r.irange_contains_p (*this))
return intersect_nonzero_bits (r);
+ // ?? We could probably come up with something smarter than the
+ // worst case scenario here.
+ int needed = num_pairs () + r.num_pairs ();
+ maybe_resize (needed);
+
signop sign = TYPE_SIGN (TREE_TYPE(m_base[0]));
unsigned bld_pair = 0;
unsigned bld_lim = m_max_ranges;
@@ -2831,6 +2841,11 @@ irange::invert ()
m_num_ranges = 1;
return;
}
+
+ // At this point, we need one extra sub-range to represent the
+ // inverse.
+ maybe_resize (m_num_ranges + 1);
+
// The algorithm is as follows. To calculate INVERT ([a,b][c,d]), we
// generate [-MIN, a-1][b+1, c-1][d+1, MAX].
//
diff --git a/gcc/value-range.h b/gcc/value-range.h
index 969b2b68418..96e59ecfa72 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -172,7 +172,8 @@ public:
bool legacy_verbose_intersect (const irange *); // DEPRECATED
protected:
- irange (tree *, unsigned);
+ void maybe_resize (int needed);
+ irange (tree *, unsigned nranges, bool resizable);
// potential promotion to public?
tree tree_lower_bound (unsigned = 0) const;
tree tree_upper_bound (unsigned) const;
@@ -200,6 +201,8 @@ protected:
void copy_to_legacy (const irange &);
void copy_legacy_to_multi_range (const irange &);
+ // Hard limit on max ranges allowed.
+ static const int HARD_MAX_RANGES = 255;
private:
friend void gt_ggc_mx (irange *);
friend void gt_pch_nx (irange *);
@@ -214,15 +217,21 @@ private:
bool intersect (const wide_int& lb, const wide_int& ub);
unsigned char m_num_ranges;
+ bool m_resizable;
unsigned char m_max_ranges;
tree m_nonzero_mask;
+protected:
tree *m_base;
};
// Here we describe an irange with N pairs of ranges. The storage for
// the pairs is embedded in the class as an array.
+//
+// If RESIZABLE is true, the storage will be resized on the heap when
+// the number of ranges needed goes past N up to a max of
+// HARD_MAX_RANGES. This new storage is freed upon destruction.
-template<unsigned N>
+template<unsigned N, bool RESIZABLE = false>
class GTY((user)) int_range : public irange
{
public:
@@ -233,7 +242,7 @@ public:
int_range (tree type);
int_range (const int_range &);
int_range (const irange &);
- virtual ~int_range () = default;
+ virtual ~int_range ();
int_range& operator= (const int_range &);
private:
template <unsigned X> friend void gt_ggc_mx (int_range<X> *);
@@ -472,6 +481,38 @@ is_a <frange> (vrange &v)
return v.m_discriminator == VR_FRANGE;
}
+// For resizable ranges, resize the range up to HARD_MAX_RANGES if the
+// NEEDED pairs is greater than the current capacity of the range.
+
+inline void
+irange::maybe_resize (int needed)
+{
+ if (!m_resizable || m_max_ranges == HARD_MAX_RANGES)
+ return;
+
+ if (needed > m_max_ranges)
+ {
+ m_max_ranges = HARD_MAX_RANGES;
+ tree *newmem = new tree[m_max_ranges * 2];
+ memcpy (newmem, m_base, sizeof (tree) * num_pairs () * 2);
+ m_base = newmem;
+ }
+}
+
+template<unsigned N, bool RESIZABLE>
+inline
+int_range<N, RESIZABLE>::~int_range ()
+{
+ if (RESIZABLE && m_base != m_ranges)
+ delete m_base;
+}
+
+// This is an "infinite" precision irange for use in temporary
+// calculations. It starts with a sensible default covering 99% of
+// uses, and goes up to HARD_MAX_RANGES when needed. Any allocated
+// storage is freed upon destruction.
+typedef int_range<3, /*RESIZABLE=*/true> int_range_max;
+
class vrange_visitor
{
public:
@@ -490,10 +531,6 @@ public:
// There are copy operators to seamlessly copy to/fro multi-ranges.
typedef int_range<1> value_range;
-// This is an "infinite" precision irange for use in temporary
-// calculations.
-typedef int_range<255> int_range_max;
-
// This is an "infinite" precision range object for use in temporary
// calculations for any of the handled types. The object can be
// transparently used as a vrange.
@@ -872,64 +909,65 @@ gt_pch_nx (int_range<N> *x, gt_pointer_operator op, void *cookie)
// Constructors for irange
inline
-irange::irange (tree *base, unsigned nranges)
+irange::irange (tree *base, unsigned nranges, bool resizable)
{
m_discriminator = VR_IRANGE;
m_base = base;
m_max_ranges = nranges;
+ m_resizable = resizable;
set_undefined ();
}
// Constructors for int_range<>.
-template<unsigned N>
+template<unsigned N, bool RESIZABLE>
inline
-int_range<N>::int_range ()
- : irange (m_ranges, N)
+int_range<N, RESIZABLE>::int_range ()
+ : irange (m_ranges, N, RESIZABLE)
{
}
-template<unsigned N>
-int_range<N>::int_range (const int_range &other)
- : irange (m_ranges, N)
+template<unsigned N, bool RESIZABLE>
+int_range<N, RESIZABLE>::int_range (const int_range &other)
+ : irange (m_ranges, N, RESIZABLE)
{
irange::operator= (other);
}
-template<unsigned N>
-int_range<N>::int_range (tree min, tree max, value_range_kind kind)
- : irange (m_ranges, N)
+template<unsigned N, bool RESIZABLE>
+int_range<N, RESIZABLE>::int_range (tree min, tree max, value_range_kind kind)
+ : irange (m_ranges, N, RESIZABLE)
{
irange::set (min, max, kind);
}
-template<unsigned N>
-int_range<N>::int_range (tree type)
- : irange (m_ranges, N)
+template<unsigned N, bool RESIZABLE>
+int_range<N, RESIZABLE>::int_range (tree type)
+ : irange (m_ranges, N, RESIZABLE)
{
set_varying (type);
}
-template<unsigned N>
-int_range<N>::int_range (tree type, const wide_int &wmin, const wide_int &wmax,
+template<unsigned N, bool RESIZABLE>
+int_range<N, RESIZABLE>::int_range (tree type, const wide_int &wmin, const wide_int &wmax,
value_range_kind kind)
- : irange (m_ranges, N)
+ : irange (m_ranges, N, RESIZABLE)
{
tree min = wide_int_to_tree (type, wmin);
tree max = wide_int_to_tree (type, wmax);
set (min, max, kind);
}
-template<unsigned N>
-int_range<N>::int_range (const irange &other)
- : irange (m_ranges, N)
+template<unsigned N, bool RESIZABLE>
+int_range<N, RESIZABLE>::int_range (const irange &other)
+ : irange (m_ranges, N, RESIZABLE)
{
irange::operator= (other);
}
-template<unsigned N>
-int_range<N>&
-int_range<N>::operator= (const int_range &src)
+template<unsigned N, bool RESIZABLE>
+int_range<N, RESIZABLE>&
+int_range<N, RESIZABLE>::operator= (const int_range &src)
{
irange::operator= (src);
return *this;
--
2.40.0

View File

@ -3,8 +3,8 @@
_realname=gcc
_mingw_suff=mingw-w64-cross
pkgname=("${_mingw_suff}-${_realname}")
pkgver=10.2.0
pkgrel=2
pkgver=13.2.0
pkgrel=1
pkgdesc="Cross GCC for the MinGW-w64"
arch=('i686' 'x86_64')
url="https://gcc.gnu.org"
@ -13,80 +13,67 @@ msys2_references=(
'archlinux: gcc'
)
groups=("${_mingw_suff}-toolchain" "${_mingw_suff}")
depends=("zlib" "mpc" "isl"
depends=("zlib" "mpc" "isl" "libzstd"
"${_mingw_suff}-binutils"
"${_mingw_suff}-crt"
"${_mingw_suff}-headers"
"${_mingw_suff}-winpthreads"
"${_mingw_suff}-windows-default-manifest")
makedepends=("gcc" 'lndir' "gmp-devel" "mpc-devel" "zlib-devel" "isl-devel" 'autotools' 'gperf')
makedepends=("gcc" 'lndir' "gmp-devel" "mpc-devel" "zlib-devel" "isl-devel" 'autotools' 'gperf' 'libzstd-devel')
#checkdepends=('dejagnu')
options=('!strip' 'staticlibs' '!emptydirs' '!buildflags')
options=('staticlibs' '!emptydirs' '!buildflags')
source=(https://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/gcc-${pkgver}.tar.gz
0001-Cygwin-avoid-installing-libffi-V2.patch
0002-Cygwin-use-SysV-ABI-on-x86_64.patch
0003-Cygwin-MinGW-Do-not-version-lto-plugins.patch
0004-Cygwin-add-dummy-pthread-tsaware-and-large-address-a.patch
0005-Cygwin-handle-dllimport-properly-in-medium-model-V2.patch
0006-Cygwin-MinGW-skip-test.patch
0007-Cygwin-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENA.patch
0008-Cygwin-fix-some-implicit-declaration-warnings.patch
0009-Cygwin-__cxa-atexit.patch
0010-Cygwin-prevent-modules-from-being-unloaded-before-th.patch
0011-Cygwin-libgomp-soname.patch
0012-Cygwin-g-time.patch
0013-Cygwin-newlib-ftm.patch
0014-Cygwin-define-STD_UNIX.patch
0015-libstdc-use-lt_host_flags-for-libstdc-.la.patch
0016-libstdc-regenerate-src-Makefile.in-for-lt_host_flags.patch
0017-libstdc-use-a-link-test-to-test-for-Wl-z-relro.patch
0018-libstdc-regenerate-configure.patch
0130-libstdc++-in-out.patch
0140-gcc-8.2.0-diagnostic-color.patch
0150-Handle-spaces-in-path-for-default-manifest.patch
0151-makedeps-properly-handle-win-paths.patch
0152-gcc-9-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch
0153-libgomp-Don-t-hard-code-MS-printf-attributes.patch
0154-Windows-New-feature-to-allow-overriding.patch
0155-gcc-config-i386-mingw32.h-Ensure-lmsvcrt-precede-lke.patch
0950-10.2.0-configure-msys2.patch
0951-10.2.0-msys2-spec.patch
0953-10.2.0-testsuite-msys2.patch)
sha256sums=('27e879dccc639cd7b0cc08ed575c1669492579529b53c9ff27b0b96265fa867d'
'84f699d1a345b563d70147694b93c92a159f2cc91bf9584d54bfdbe8cdf9ecd2'
'32301742d515ac6cac5181a7133c388b09c1ddd1507bcc6964bfbf2a756fda14'
'9b525568457aae4e97a3aa36e92ea3ad85f31f76772c954c662eb9509f9497cc'
'aeb2c85dd73a4111cfc90d002193412936be698e04b989cf6940a9c641af9c8b'
'02934797f382c8071b2660d26b5ee0d738101e72b0289aee3fbc117ee55ccb29'
'dc88c7738bef3f7d6c062b7a07590588d5cd7a2cdef6c55079add4ff01d22e95'
'c7501151cc5912facaa8a8a62ce675d74daddbb0fa68d69cfb7a7262f40d5e3b'
'e2530b6e5e539b02a29d804fbc6ef8ef30a685913961519a00c12f607e4211b9'
'33039e0844536ab42f72dd555bcb30c06c027d403ed83648886362f6bcbafa23'
'6b0f9553b34b55b94b3d2c908ba12d8c0568ba989941f6e8480adde153ec2aa0'
'360d3690a5d5c06f19e089d9f2ce1e7706b3fefd0f63580ecb4da3aef6b43c98'
'4bf2962a76f83758cd07a131b53f0ebda39cf460036f07ad6e9ed7beafcc791d'
'b8342467f4cd94d28a6d6c91a623148a106742bcd345e36158f7c171ef8f3828'
'1fb907f1fcaa6270c17364afe5433bd15eef611448b7dc192c60d543ea539fd2'
'4a04d6809315b4f0bf224f55f27ae6fff9e6c1d28938e23ec7f395806f176b3b'
'1c15c1ff7aa612323e77070875f436839cf4ed2a3080c998ebf66282e1ed52dc'
'1fd8d6ce76ed98b97202de58d8cac7d179ecbb55dbe81cebb3a4b0fc813be016'
'a94c48e659fd3cfef6d8cd4d65d2c28bfc88488864f853e2e36f27a2dc435939'
'055289699c4222ef0b8125abdc8c9ceeff0712876c86e6d552a056fbacc14284'
'5240a9e731b45c17a164066c7eb193c1fbee9fd8d9a2a5afa2edbcde9510da47'
'11dd5388a1e1c0a2bc8bc3824726598784b9b9e0896a3d77950ba6a4569f1128'
'4233a8d893787413b316de3ac320fd65c46844d463b98c0a98fdc17100cca505'
'21e31addcf13bc6fa6650b02ed0f2e195a1226260ae48c536840cc9230de2cfc'
'276ecc392c777d4b17d771a987e80dca50ff25d8f65671d5de139be73997064b'
'7f5fc74961ec0face6c4c56d3fc3613c38c5133bb68648191065bbf597f3e906'
'c7359f4c7015bc1fb02bc13449fa9826669273bd1f0663ba898decb67e8487fc'
'8b8bfa768c4e21ab45aa6b5815aeea795e05140d690e44e2294ffbb1dcb6e3a2'
'941d9d1d12ab3549a15fe8c26eab35c236a28443a1e32dca23a39d4451b86ae2'
'369c7a74312ea06e8e7298e4fcca018a39a626650cd4a5dd565b6f929a0f4787')
0001-Cygwin-use-SysV-ABI-on-x86_64.patch
0002-Cygwin-add-dummy-pthread-tsaware-and-large-address-a.patch
0003-Cygwin-handle-dllimport-properly-in-medium-model-V2.patch
0004-Cygwin-MinGW-skip-test.patch
0005-Cygwin-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENA.patch
0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch
0007-Cygwin-__cxa-atexit.patch
0008-Cygwin-libgomp-soname.patch
0009-Cygwin-g-time.patch
0010-Cygwin-newlib-ftm.patch
0011-Cygwin-define-STD_UNIX.patch
0101-Cygwin-enable-libgccjit-not-just-for-MingW.patch
0102-Cygwin-testsuite-fixes-for-libgccjit.patch
0950-11.2.0-configure-msys2.patch
0951-11.2.0-msys2-spec.patch
0953-11.2.0-testsuite-msys2.patch
0006-Windows-New-feature-to-allow-overriding.patch
0012-Handle-spaces-in-path-for-default-manifest.patch
0014-gcc-9-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch
0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch
0200-add-m-no-align-vector-insn-option-for-i386.patch
0300-override-builtin-printf-format.patch
777aa930b106fea2dd6ed9fe22b42a2717f1472d.patch)
sha256sums=('8cb4be3796651976f94b9356fa08d833524f62420d6292c5033a9a26af315078'
'bc788aa466a83184d285cc2f6c1ffc40c6ed416dd08c6999015262a53f1ab1b5'
'704acfaeb11d24d3fe5aab34bc883c184ca93aff03d752016c9a50fdd82c5655'
'c5676fd62d5f7f69be26062b95d42ef47f28151af83b83efa3998ecd8e939e19'
'03ecf29419119286ebcef35864f9bd26d3bf3eaa355945856953204ed727e173'
'06214859ae4030ce30bb68aa35aa4a9ac92d1e79e34133089dcbfeb7cc8066e8'
'a843c038042811265d6ce5917b0c76b709e2591822e5cab53a32b7e9c806da29'
'e27f82af1eb7a4aad955ec36d5fd7d9a4c24575845bcf718372df9bc2b099eb6'
'de5692673731f90b888bf301a547481ab8e3cc0029713b6fd5abaabd860250f0'
'a40e7025507130a2a5d2eb2eea8ba4b053398c307cd55b3c9421a8507bd315ed'
'2658eb376f7829179963978b69a048ed105a41508adc55d0fc0d607c14181926'
'83b6aea4a462ae80121fd68d42c6234d02e20865132197a10575bbf95fd33b7e'
'c5aeab9609f90a8430c43bb50172b63c3155eb10082369f81fac58a395d2e2ee'
'3707b0aab99b203cbd9e513be46c7d4600de06e6c8344160b7fb1779061d08da'
'8a29a40ee426ee786da97656c35d2e9c17838b12c1b750cecf857760da273381'
'959ef644853398fe6f2c291a43e5e5bfac4dc973ce6ae7ff23734135cb9a5b60'
'adb8baaa35dcfbea9ab60694262d0958e090495146d50df1a0844a977832aef9'
'a3637466910fae6145c947095051e3b91b16e4715d4abddc474eeb00539e9dc2'
'e98805ead7d78ee2a92f237894c4b2b7ddc1688e1b517d8c04f28d440202e40f'
'fd9bdecb2bbc4796bbc9f00b708dac42ef9e3464a06d6d27e5475cee117de5be'
'ad1f7b5e7afaaec008b7cbd14feea13a10989fa91bda7003af72d457619bb199'
'c34f9e71b5a092be1987ad4c65891742c74c9eb8ef6560100e751cd31375f579'
'f73c8d1701762fed7d8102d17d8e4416a4cc5e600e297a89c2e1fe09cd743a1c'
'b0a98a41fea4a68f15d35b44495a487183a4d85ea9cb70cd4a645b4ed6583122')
_threads="win32"
_targets="i686-w64-mingw32 x86_64-w64-mingw32"
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _fname in "$@"
do
@ -95,79 +82,40 @@ apply_patch_with_msg() {
done
}
apply_patch_p2_with_msg() {
for _fname in "$@"
do
msg2 "Applying ${_fname}"
patch -Nbp2 -i "${srcdir}"/${_fname}
done
}
del_file_exists() {
for _fname in "$@"
do
if [ -f $_fname ] || [ -d $_fname ]; then
rm -rf $_fname
fi
done
}
# =========================================== #
prepare() {
cd ${srcdir}/${_realname}-${pkgver}
#do not install libiberty
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
#sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
# Remove files created by patches
rm -f config/mt-cygwin \
gcc/ada/system-cygwin-x86_64.ads \
libgomp/config/cygwin/plugin-suffix.h \
libgcc/config/i386/t-msys \
gcc/config/i386/msys.h \
gcc/config/i386/msys-w64.h \
gcc/config/i386/t-msys-w64 > /dev/null 2>&1 | true
# Cygwin patches
apply_patch_with_msg \
0001-Cygwin-avoid-installing-libffi-V2.patch \
0002-Cygwin-use-SysV-ABI-on-x86_64.patch \
0003-Cygwin-MinGW-Do-not-version-lto-plugins.patch \
0004-Cygwin-add-dummy-pthread-tsaware-and-large-address-a.patch \
0005-Cygwin-handle-dllimport-properly-in-medium-model-V2.patch \
0006-Cygwin-MinGW-skip-test.patch \
0007-Cygwin-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENA.patch \
0008-Cygwin-fix-some-implicit-declaration-warnings.patch \
0009-Cygwin-__cxa-atexit.patch \
0010-Cygwin-prevent-modules-from-being-unloaded-before-th.patch \
0011-Cygwin-libgomp-soname.patch \
0012-Cygwin-g-time.patch \
0013-Cygwin-newlib-ftm.patch \
0014-Cygwin-define-STD_UNIX.patch \
0015-libstdc-use-lt_host_flags-for-libstdc-.la.patch \
0016-libstdc-regenerate-src-Makefile.in-for-lt_host_flags.patch \
0017-libstdc-use-a-link-test-to-test-for-Wl-z-relro.patch \
0018-libstdc-regenerate-configure.patch
# MINGW patches
apply_patch_with_msg \
0130-libstdc++-in-out.patch \
0140-gcc-8.2.0-diagnostic-color.patch \
0150-Handle-spaces-in-path-for-default-manifest.patch \
0151-makedeps-properly-handle-win-paths.patch \
0152-gcc-9-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch \
0153-libgomp-Don-t-hard-code-MS-printf-attributes.patch \
0154-Windows-New-feature-to-allow-overriding.patch \
0155-gcc-config-i386-mingw32.h-Ensure-lmsvcrt-precede-lke.patch
0001-Cygwin-use-SysV-ABI-on-x86_64.patch \
0002-Cygwin-add-dummy-pthread-tsaware-and-large-address-a.patch \
0003-Cygwin-handle-dllimport-properly-in-medium-model-V2.patch \
0004-Cygwin-MinGW-skip-test.patch \
0005-Cygwin-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENA.patch \
0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch \
0007-Cygwin-__cxa-atexit.patch \
0008-Cygwin-libgomp-soname.patch \
0009-Cygwin-g-time.patch \
0010-Cygwin-newlib-ftm.patch \
0011-Cygwin-define-STD_UNIX.patch \
0101-Cygwin-enable-libgccjit-not-just-for-MingW.patch \
0102-Cygwin-testsuite-fixes-for-libgccjit.patch
# MSYS2 Patches
apply_patch_with_msg \
0950-10.2.0-configure-msys2.patch \
0951-10.2.0-msys2-spec.patch \
0953-10.2.0-testsuite-msys2.patch
0950-11.2.0-configure-msys2.patch \
0951-11.2.0-msys2-spec.patch \
0953-11.2.0-testsuite-msys2.patch
# MinGW Patches
apply_patch_with_msg \
0006-Windows-New-feature-to-allow-overriding.patch \
0012-Handle-spaces-in-path-for-default-manifest.patch \
0014-gcc-9-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch \
0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch \
0200-add-m-no-align-vector-insn-option-for-i386.patch \
0300-override-builtin-printf-format.patch \
777aa930b106fea2dd6ed9fe22b42a2717f1472d.patch
}
build() {
@ -179,21 +127,17 @@ build() {
case "${_target}" in
i686*)
local _conf="--disable-sjlj-exceptions --with-dwarf2"
local _arch=i686
local _arch=pentium4
_langs="${_langs} fortran"
;;
x86_64*)
local _arch=x86-64
local _arch=nocona
local _conf=""
_langs="${_langs} fortran"
;;
esac
# use built-in SSP with Cygwin 2.10
# FIXME: --disable-libssp should suffice in GCC 8
export gcc_cv_libc_provides_ssp=yes
../${_realname}-${pkgver}/configure \
--prefix=/opt \
--build=${CHOST} \
@ -204,12 +148,13 @@ build() {
--with-arch=${_arch} \
--with-tune=generic \
--enable-languages=${_langs} \
--enable-shared --enable-static \
--enable-shared \
--enable-static \
--enable-threads=${_threads} \
--enable-graphite \
--enable-fully-dynamic-string \
--enable-libstdcxx-filesystem-ts=yes \
--enable-libstdcxx-time=yes \
--enable-libstdcxx-filesystem-ts \
--enable-libstdcxx-time \
--disable-libstdcxx-pch \
--disable-libstdcxx-debug \
--enable-cloog-backend=isl \
@ -217,6 +162,7 @@ build() {
--disable-isl-version-check \
--enable-lto \
--enable-libgomp \
--disable-libssp \
--disable-multilib \
--enable-checking=release \
--disable-rpath \
@ -226,11 +172,12 @@ build() {
--with-libiconv \
--with-system-zlib \
--with-{gmp,mpfr,mpc,isl}=/usr \
--with-gnu-as --with-gnu-ld \
--with-gnu-as \
--with-gnu-ld \
${_conf} \
CFLAGS="-O2 -pipe" \
CXXFALGS="-O2 -pipe"
CXXFLAGS="-O2 -pipe"
make all
done
}