summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-Cygwin-use-SysV-ABI-on-x86_64.patch92
-rw-r--r--0002-Cygwin-add-dummy-pthread-tsaware-and-large-address-a.patch (renamed from 0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch)31
-rw-r--r--0003-Cygwin-handle-dllimport-properly-in-medium-model-V2.patch (renamed from 0012-handle-dllimport-properly-in-medium-model-V2.patch)18
-rw-r--r--0004-Cygwin-MinGW-skip-test.patch (renamed from 0013-skip-test-for-cygwin-mingw.patch)8
-rw-r--r--0005-Cygwin-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENA.patch29
-rw-r--r--0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch111
-rw-r--r--0007-Avoid-installing-libffi-V2.patch52
-rw-r--r--0007-Cygwin-__cxa-atexit.patch49
-rw-r--r--0008-Cygwin-libgomp-soname.patch84
-rw-r--r--0009-Cygwin-g-time.patch43
-rw-r--r--0010-Cygwin-newlib-ftm.patch25
-rw-r--r--0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch56
-rw-r--r--0011-Cygwin-define-STD_UNIX.patch34
-rw-r--r--0016-fix-some-implicit-declaration-warnings.patch58
-rw-r--r--0017-__cxa-atexit-for-Cygwin.patch28
-rw-r--r--0022-libgomp-soname-cygwin-mingw.patch53
-rw-r--r--0023-glibcxx-use-c99.patch85
-rw-r--r--0026-g++-gnu-source.patch40
-rw-r--r--0028-g++-time.patch28
-rw-r--r--0030-newlib-ftm.patch11
-rw-r--r--0031-define_std-unix.patch18
-rw-r--r--0032-libstdc-use-lt_host_flags-for-libstdc-.la.patch26
-rw-r--r--0033-libstdc-regenerate-src-Makefile.in-for-lt_host_flags.patch26
-rw-r--r--0034-libstdc-use-a-link-test-to-test-for-Wl-z-relro.patch38
-rw-r--r--0035-libstdc-regenerate-configure.patch455
-rw-r--r--0101-Cygwin-enable-libgccjit-not-just-for-MingW.patch183
-rw-r--r--0102-Cygwin-testsuite-fixes-for-libgccjit.patch123
-rw-r--r--cygwin-gcc.spec274
-rw-r--r--sources2
29 files changed, 944 insertions, 1136 deletions
diff --git a/0001-Cygwin-use-SysV-ABI-on-x86_64.patch b/0001-Cygwin-use-SysV-ABI-on-x86_64.patch
new file mode 100644
index 0000000..a622122
--- /dev/null
+++ b/0001-Cygwin-use-SysV-ABI-on-x86_64.patch
@@ -0,0 +1,92 @@
+From ac0fc2aa3e950e90b75254edb7f5ac73d3c8e440 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Tue, 8 Sep 2020 14:50:33 +0200
+Subject: [PATCH 01/11] Cygwin: use SysV ABI on x86_64
+
+# Conflicts:
+# libitm/libitm.h
+---
+ gcc/builtin-attrs.def | 3 +++
+ gcc/gtm-builtins.def | 2 +-
+ libitm/libitm.h | 3 ++-
+ libitm/libitm_i.h | 4 ++--
+ 4 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/gcc/builtin-attrs.def b/gcc/builtin-attrs.def
+index 11ce5a3d16c..a544fcf9afd 100644
+--- a/gcc/builtin-attrs.def
++++ b/gcc/builtin-attrs.def
+@@ -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")
++DEF_ATTR_IDENT (ATTR_SYSV_ABI, "sysv_abi")
+ DEF_ATTR_IDENT (ATTR_RETURNS_NONNULL, "returns_nonnull")
+ DEF_ATTR_IDENT (ATTR_WARN_UNUSED_RESULT, "warn_unused_result")
+
+@@ -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)
++DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_RT_SYSV_LIST,
++ ATTR_SYSV_ABI, ATTR_NULL, ATTR_TM_NOTHROW_RT_LIST)
+
+ /* Same attributes used for BUILT_IN_MALLOC except with TM_PURE thrown in. */
+ DEF_ATTR_TREE_LIST (ATTR_TMPURE_MALLOC_NOTHROW_LIST,
+diff --git a/gcc/gtm-builtins.def b/gcc/gtm-builtins.def
+index 6d5cfb9b406..1f47898a71a 100644
+--- a/gcc/gtm-builtins.def
++++ b/gcc/gtm-builtins.def
+@@ -1,5 +1,5 @@
+ DEF_TM_BUILTIN (BUILT_IN_TM_START, "_ITM_beginTransaction",
+- BT_FN_UINT32_UINT32_VAR, ATTR_TM_NOTHROW_RT_LIST)
++ BT_FN_UINT32_UINT32_VAR, ATTR_TM_NOTHROW_RT_SYSV_LIST)
+
+ 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 7ecf53a93e1..5b2bf7582f1 100644
+--- a/libitm/libitm.h
++++ b/libitm/libitm.h
+@@ -45,6 +45,7 @@ extern "C" {
+
+ #define ITM_NORETURN __attribute__((noreturn))
+ #define ITM_PURE __attribute__((transaction_pure))
++#define ITM_SYSV __attribute__((sysv_abi))
+ #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;
+
+-extern uint32_t _ITM_beginTransaction(uint32_t, ...) ITM_REGPARM;
++extern uint32_t _ITM_beginTransaction(uint32_t, ...) ITM_REGPARM ITM_SYSV;
+
+ extern void _ITM_abortTransaction(_ITM_abortReason) ITM_REGPARM ITM_NORETURN;
+
+diff --git a/libitm/libitm_i.h b/libitm/libitm_i.h
+index 4e415ef53a0..ff3ae90df76 100644
+--- a/libitm/libitm_i.h
++++ b/libitm/libitm_i.h
+@@ -294,7 +294,7 @@ struct gtm_thread
+ // Invoked from assembly language, thus the "asm" specifier on
+ // the name, avoiding complex name mangling.
+ static uint32_t begin_transaction(uint32_t, const gtm_jmpbuf *)
+- __asm__(UPFX "GTM_begin_transaction") ITM_REGPARM;
++ __asm__(UPFX "GTM_begin_transaction") ITM_REGPARM ITM_SYSV;
+ // In eh_cpp.cc
+ void init_cpp_exceptions ();
+ void revert_cpp_exceptions (gtm_transaction_cp *cp = 0);
+@@ -328,7 +328,7 @@ namespace GTM HIDDEN {
+ extern uint64_t gtm_spin_count_var;
+
+ extern "C" uint32_t GTM_longjmp (uint32_t, const gtm_jmpbuf *, uint32_t)
+- ITM_NORETURN ITM_REGPARM;
++ ITM_NORETURN ITM_REGPARM ITM_SYSV;
+
+ extern "C" void GTM_LB (const void *, size_t) ITM_REGPARM;
+
+--
+2.31.1
+
diff --git a/0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch b/0002-Cygwin-add-dummy-pthread-tsaware-and-large-address-a.patch
index 1f7eaed..bc6765e 100644
--- a/0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch
+++ b/0002-Cygwin-add-dummy-pthread-tsaware-and-large-address-a.patch
@@ -1,17 +1,17 @@
-From 66c7c94560b05fe572b282c08fe7d973681bb903 Mon Sep 17 00:00:00 2001
+From 6a9cba89d748b0d9b6faef736a86da89c1b1dcbd Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:44:48 +0800
-Subject: [PATCH 11/21] add dummy -pthread, -tsaware and --large-address-aware
- for executables only
+Subject: [PATCH 02/11] Cygwin: add dummy -pthread, -tsaware and
+ --large-address-aware for executables only
---
- gcc/config/i386/cygwin-w64.h | 1 +
- gcc/config/i386/cygwin.h | 2 ++
- gcc/config/i386/cygwin.opt | 3 +++
+ gcc/config/i386/cygwin-w64.h | 1 +
+ gcc/config/i386/cygwin.h | 2 ++
+ gcc/config/i386/cygwin.opt | 3 +++
3 files changed, 6 insertions(+)
diff --git a/gcc/config/i386/cygwin-w64.h b/gcc/config/i386/cygwin-w64.h
-index 586ce05..bb8ad4d 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 586ce05..bb8ad4d 100644
/* Cygwin64 will have a 64-bit long type. */
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
-index 803fb6c..2a2a0bf 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 803fb6c..2a2a0bf 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,18 +43,17 @@ index 803fb6c..2a2a0bf 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 569863b..14fa934 100644
+index fcec11db6ad..4062e41a780 100644
--- a/gcc/config/i386/cygwin.opt
+++ b/gcc/config/i386/cygwin.opt
-@@ -20,5 +20,8 @@
-
+@@ -21,4 +21,7 @@
pthread
Driver
-+
+
+rdynamic
+Driver
-
++
; Retain blank line above
--
-2.4.5
+2.31.1
diff --git a/0012-handle-dllimport-properly-in-medium-model-V2.patch b/0003-Cygwin-handle-dllimport-properly-in-medium-model-V2.patch
index 9e453d5..f2d98e7 100644
--- a/0012-handle-dllimport-properly-in-medium-model-V2.patch
+++ b/0003-Cygwin-handle-dllimport-properly-in-medium-model-V2.patch
@@ -1,8 +1,17 @@
+From 02b0d17cffc53ccc5f8a6d37d0023dea4698db88 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Tue, 8 Sep 2020 14:56:50 +0200
+Subject: [PATCH 03/11] 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 e4da309..33c6294 100644
+index b1df8548af6..ceb648b8f56 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
-@@ -169,6 +169,7 @@
+@@ -202,6 +202,7 @@
switch (XINT (XEXP (op, 0), 1))
{
case UNSPEC_GOTPCREL:
@@ -10,7 +19,7 @@ index e4da309..33c6294 100644
case UNSPEC_DTPOFF:
case UNSPEC_GOTNTPOFF:
case UNSPEC_NTPOFF:
-@@ -271,6 +272,10 @@
+@@ -307,6 +308,10 @@
if (ix86_force_load_from_GOT_p (op))
return false;
@@ -21,3 +30,6 @@ index e4da309..33c6294 100644
/* For certain code models, the symbolic references are known to fit. */
return (ix86_cmodel == CM_SMALL
|| (ix86_cmodel == CM_MEDIUM
+--
+2.31.1
+
diff --git a/0013-skip-test-for-cygwin-mingw.patch b/0004-Cygwin-MinGW-skip-test.patch
index d94fc14..15ffc4d 100644
--- a/0013-skip-test-for-cygwin-mingw.patch
+++ b/0004-Cygwin-MinGW-skip-test.patch
@@ -1,14 +1,14 @@
-From fb545617895ad517f57367b5b0366b066c28dc3b Mon Sep 17 00:00:00 2001
+From c19eebe317edbdc29924be1e58ba9db6fd1e020c Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:54:57 +0800
-Subject: [PATCH 13/21] skip test for cygwin/mingw
+Subject: [PATCH 04/11] Cygwin/MinGW: skip test
---
gcc/testsuite/gcc.target/i386/pr25993.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/i386/pr25993.c b/gcc/testsuite/gcc.target/i386/pr25993.c
-index b079e25..c30eaf5 100644
+index 1e7e933fb9a..2b12f97b1cc 100644
--- a/gcc/testsuite/gcc.target/i386/pr25993.c
+++ b/gcc/testsuite/gcc.target/i386/pr25993.c
@@ -1,5 +1,5 @@
@@ -19,5 +19,5 @@ index b079e25..c30eaf5 100644
#ifndef __ASSEMBLER__
--
-2.4.5
+2.31.1
diff --git a/0005-Cygwin-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENA.patch b/0005-Cygwin-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENA.patch
new file mode 100644
index 0000000..72e1b78
--- /dev/null
+++ b/0005-Cygwin-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENA.patch
@@ -0,0 +1,29 @@
+From 36da0aff82f9f7e03351ad757fd372866360c513 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Sat, 28 Jun 2014 10:05:50 +0800
+Subject: [PATCH 05/11] Cygwin: define RTS_CONTROL_ENABLE and
+ DTR_CONTROL_ENABLE
+
+---
+ gcc/ada/s-oscons-tmplt.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
+index 582c35ef7db..0832c6aed15 100644
+--- a/gcc/ada/s-oscons-tmplt.c
++++ b/gcc/ada/s-oscons-tmplt.c
+@@ -1044,6 +1044,11 @@ CND(VEOL2, "Alternative EOL")
+
+ #endif /* HAVE_TERMIOS */
+
++#if defined(__CYGWIN__)
++#define RTS_CONTROL_ENABLE 0x1
++#define DTR_CONTROL_ENABLE 0x1
++#endif
++
+ #if defined(__MINGW32__) || defined(__CYGWIN__)
+ CNU(DTR_CONTROL_ENABLE, "Enable DTR flow ctrl")
+ CNU(RTS_CONTROL_ENABLE, "Enable RTS flow ctrl")
+--
+2.31.1
+
diff --git a/0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch b/0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch
new file mode 100644
index 0000000..d3d7e09
--- /dev/null
+++ b/0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch
@@ -0,0 +1,111 @@
+From 81dd139464851507ecdc4da2a86d802e098998c3 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/11] 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>
+@@ -157,7 +159,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 2ea7c119809..bf899c3e463 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]
+@@ -6722,6 +6734,8 @@ else
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
++
++#include <stdlib.h>
+ find_stack_direction ()
+ {
+ static char *addr = 0;
+@@ -7556,6 +7570,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.31.1
+
diff --git a/0007-Avoid-installing-libffi-V2.patch b/0007-Avoid-installing-libffi-V2.patch
deleted file mode 100644
index 441f2b0..0000000
--- a/0007-Avoid-installing-libffi-V2.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index b824e0a..c6b419b 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -1684,7 +1684,6 @@ install-info-target: maybe-install-info-target-libhsail-rt
- 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
-@@ -1770,7 +1769,6 @@ install-pdf-target: maybe-install-pdf-target-libhsail-rt
- 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
-@@ -1856,7 +1854,6 @@ install-html-target: maybe-install-html-target-libhsail-rt
- 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
-@@ -1942,7 +1939,6 @@ installcheck-target: maybe-installcheck-target-libhsail-rt
- 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
-@@ -2610,7 +2606,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 \
-@@ -2716,7 +2711,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 \
diff --git a/0007-Cygwin-__cxa-atexit.patch b/0007-Cygwin-__cxa-atexit.patch
new file mode 100644
index 0000000..6933294
--- /dev/null
+++ b/0007-Cygwin-__cxa-atexit.patch
@@ -0,0 +1,49 @@
+From e83f365cde50e5566b270efd9b69ddc6eb900979 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Thu, 30 Oct 2014 17:15:02 +0800
+Subject: [PATCH 07/11] Cygwin: __cxa-atexit
+
+---
+ gcc/config.gcc | 2 ++
+ libgcc/config/i386/cygming-crtbegin.c | 4 ++++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 357b0bed067..d67edad6df3 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2130,6 +2130,7 @@ i[34567]86-*-cygwin*)
+ fi
+ default_use_cxa_atexit=yes
+ use_gcc_stdint=wrap
++ default_use_cxa_atexit=yes
+ ;;
+ x86_64-*-cygwin*)
+ need_64bit_isa=yes
+@@ -2744,6 +2745,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 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)
+ /* If we use the __cxa_atexit method to register C++ dtors
+ at object construction, also use atexit to register eh frame
+ info cleanup. */
++#ifdef __CYGWIN__
++ __cxa_atexit(__gcc_deregister_frame, NULL, (void *)&__dso_handle);
++#else
+ atexit(__gcc_deregister_frame);
++#endif /* __CYGWIN__ */
+ #endif /* DEFAULT_USE_CXA_ATEXIT */
+ }
+
+--
+2.31.1
+
diff --git a/0008-Cygwin-libgomp-soname.patch b/0008-Cygwin-libgomp-soname.patch
new file mode 100644
index 0000000..c071b2c
--- /dev/null
+++ b/0008-Cygwin-libgomp-soname.patch
@@ -0,0 +1,84 @@
+From dd48146333726ea442a0f8faab3a76480723142f Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Tue, 8 Sep 2020 15:05:44 +0200
+Subject: [PATCH 08/11] Cygwin: libgomp soname
+
+---
+ libgomp/config/cygwin/plugin-suffix.h | 2 ++
+ libgomp/config/darwin/plugin-suffix.h | 1 +
+ libgomp/config/hpux/plugin-suffix.h | 1 +
+ libgomp/config/posix/plugin-suffix.h | 1 +
+ libgomp/configure.tgt | 4 ++++
+ libgomp/target.c | 2 +-
+ 6 files changed, 10 insertions(+), 1 deletion(-)
+ create mode 100644 libgomp/config/cygwin/plugin-suffix.h
+
+diff --git a/libgomp/config/cygwin/plugin-suffix.h b/libgomp/config/cygwin/plugin-suffix.h
+new file mode 100644
+index 00000000000..7ea6e7241d9
+--- /dev/null
++++ b/libgomp/config/cygwin/plugin-suffix.h
+@@ -0,0 +1,2 @@
++#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 af06b7ab87d..d8d172b3a45 100644
+--- a/libgomp/config/darwin/plugin-suffix.h
++++ b/libgomp/config/darwin/plugin-suffix.h
+@@ -23,4 +23,5 @@
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
++#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 3bd094898f9..9f594f3a6a9 100644
+--- a/libgomp/config/hpux/plugin-suffix.h
++++ b/libgomp/config/hpux/plugin-suffix.h
+@@ -23,4 +23,5 @@
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
++#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 3232fb65e01..707f42cce62 100644
+--- a/libgomp/config/posix/plugin-suffix.h
++++ b/libgomp/config/posix/plugin-suffix.h
+@@ -23,4 +23,5 @@
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
++#define SONAME_PREFIX "lib"
+ #define SONAME_SUFFIX(n) (".so." #n)
+diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
+index fe2bf1dac51..f539a6b9302 100644
+--- a/libgomp/configure.tgt
++++ b/libgomp/configure.tgt
+@@ -137,6 +137,10 @@ case "${target}" in
+ esac
+ ;;
+
++ *-*-cygwin*)
++ config_path="cygwin posix"
++ ;;
++
+ *-*-mingw32*)
+ config_path="mingw32 posix"
+ ;;
+diff --git a/libgomp/target.c b/libgomp/target.c
+index 4a4e1f80745..05264438992 100644
+--- a/libgomp/target.c
++++ b/libgomp/target.c
+@@ -3299,7 +3299,7 @@ gomp_target_fini (void)
+ static void
+ gomp_target_init (void)
+ {
+- const char *prefix ="libgomp-plugin-";
++ const char *prefix = SONAME_PREFIX "gomp-plugin-";
+ const char *suffix = SONAME_SUFFIX (1);
+ const char *cur, *next;
+ char *plugin_name;
+--
+2.31.1
+
diff --git a/0009-Cygwin-g-time.patch b/0009-Cygwin-g-time.patch
new file mode 100644
index 0000000..6c7fccf
--- /dev/null
+++ b/0009-Cygwin-g-time.patch
@@ -0,0 +1,43 @@
+From dea21ec4ce182bc5061bbc82e2f3ac59b4423412 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Tue, 8 Sep 2020 15:21:56 +0200
+Subject: [PATCH 09/11] Cygwin: g++ time
+
+---
+ libstdc++-v3/acinclude.m4 | 3 +++
+ libstdc++-v3/configure | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
+index 1c0a4c13052..2f348df1986 100644
+--- a/libstdc++-v3/acinclude.m4
++++ b/libstdc++-v3/acinclude.m4
+@@ -1418,7 +1418,10 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
+
+ case "${target_os}" in
+ cygwin*)
++ ac_has_clock_monotonic=yes
++ ac_has_clock_realtime=yes
+ ac_has_nanosleep=yes
++ ac_has_sched_yield=yes
+ ;;
+ darwin*)
+ ac_has_nanosleep=yes
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 326a279c54f..7a461b53c88 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -20519,7 +20519,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ case "${target_os}" in
+ cygwin*)
++ ac_has_clock_monotonic=yes
++ ac_has_clock_realtime=yes
+ ac_has_nanosleep=yes
++ ac_has_sched_yield=yes
+ ;;
+ darwin*)
+ ac_has_nanosleep=yes
+--
+2.31.1
+
diff --git a/0010-Cygwin-newlib-ftm.patch b/0010-Cygwin-newlib-ftm.patch
new file mode 100644
index 0000000..276d625
--- /dev/null
+++ b/0010-Cygwin-newlib-ftm.patch
@@ -0,0 +1,25 @@
+From 4720c7647c3e1a8c5cf29201ab3c715227649053 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Tue, 8 Sep 2020 15:24:34 +0200
+Subject: [PATCH 10/11] 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 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
+ # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+ #endif
+
+-#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
++#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : defined (__NEWLIB__) ? __GNU_VISIBLE : !defined (__STRICT_ANSI__)
+ /* Minimum and maximum values a `signed long long int' can hold. */
+ # undef LONG_LONG_MIN
+ # define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
+--
+2.31.1
+
diff --git a/0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch b/0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch
deleted file mode 100644
index 5049d2c..0000000
--- a/0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 0817191f16ba1318a84ea184887c1119f298bc45 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sat, 28 Jun 2014 09:35:02 +0800
-Subject: [PATCH 10/21] Do not version lto plugin on cygwin/mingw
-
-Conflicts:
- lto-plugin/Makefile.am
- lto-plugin/Makefile.in
----
- 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 8b7e16d..361de8e 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
-diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
-index a90a5da..1ebf155 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 06ef5f3..ec5b3e6 100644
---- a/lto-plugin/Makefile.in
-+++ b/lto-plugin/Makefile.in
-@@ -264,7 +264,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.4.5
-
diff --git a/0011-Cygwin-define-STD_UNIX.patch b/0011-Cygwin-define-STD_UNIX.patch
new file mode 100644
index 0000000..d22d5d3
--- /dev/null
+++ b/0011-Cygwin-define-STD_UNIX.patch
@@ -0,0 +1,34 @@
+From d765745e9fd657ba1b0661cb3dac997a091bcaf1 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Tue, 8 Sep 2020 15:26:02 +0200
+Subject: [PATCH 11/11] 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 c42224a7824..e4e668fbba9 100644
+--- a/gcc/config/i386/cygwin.h
++++ b/gcc/config/i386/cygwin.h
+@@ -24,8 +24,7 @@ along with GCC; see the file COPYING3. If not see
+ builtin_define ("__CYGWIN__"); \
+ if (!TARGET_64BIT) \
+ builtin_define ("__CYGWIN32__"); \
+- builtin_define ("__unix__"); \
+- builtin_define ("__unix"); \
++ builtin_define_std ("unix"); \
+ } \
+ 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} \
+ %{pthread:-D_REENTRANT} \
+ %{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
+ %{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
+--
+2.31.1
+
diff --git a/0016-fix-some-implicit-declaration-warnings.patch b/0016-fix-some-implicit-declaration-warnings.patch
deleted file mode 100644
index 0c0b4a2..0000000
--- a/0016-fix-some-implicit-declaration-warnings.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 9acb3806f55fe198543405988601fd90945f00ac Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sat, 28 Jun 2014 10:08:25 +0800
-Subject: [PATCH 16/21] 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 bf8a907..6b5e66c 100644
---- a/libiberty/aclocal.m4
-+++ b/libiberty/aclocal.m4
-@@ -15,6 +15,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>
-@@ -147,7 +149,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 da2df4e..f8bb482 100755
---- a/libiberty/configure
-+++ b/libiberty/configure
-@@ -6390,6 +6390,7 @@ else
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-+#include <stdlib.h>
- find_stack_direction ()
- {
- static char *addr = 0;
-@@ -7200,6 +7201,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.4.5
-
diff --git a/0017-__cxa-atexit-for-Cygwin.patch b/0017-__cxa-atexit-for-Cygwin.patch
deleted file mode 100644
index e119f1f..0000000
--- a/0017-__cxa-atexit-for-Cygwin.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 2de5743add75ae90442e9ff47061a67ff65e76d1 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Thu, 30 Oct 2014 17:15:02 +0800
-Subject: [PATCH 17/21] __cxa-atexit for Cygwin
-
----
- libgcc/config/i386/cygming-crtbegin.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libgcc/config/i386/cygming-crtbegin.c b/libgcc/config/i386/cygming-crtbegin.c
-index 87928e5..90904cd 100644
---- a/libgcc/config/i386/cygming-crtbegin.c
-+++ b/libgcc/config/i386/cygming-crtbegin.c
-@@ -183,7 +183,11 @@ __gcc_register_frame (void)
- /* If we use the __cxa_atexit method to register C++ dtors
- at object construction, also use atexit to register eh frame
- info cleanup. */
-+#ifdef __CYGWIN__
-+ __cxa_atexit(__gcc_deregister_frame, NULL, (void *)&__dso_handle);
-+#else
- atexit(__gcc_deregister_frame);
-+#endif /* __CYGWIN__ */
- #endif /* DEFAULT_USE_CXA_ATEXIT */
- }
-
---
-2.4.5
-
diff --git a/0022-libgomp-soname-cygwin-mingw.patch b/0022-libgomp-soname-cygwin-mingw.patch
deleted file mode 100644
index 45f4e0f..0000000
--- a/0022-libgomp-soname-cygwin-mingw.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- a/libgomp/config/cygwin/plugin-suffix.h 1969-12-31 18:00:00.000000000 -0600
-+++ b/libgomp/config/cygwin/plugin-suffix.h 2016-01-31 17:06:42.166913600 -0600
-@@ -0,0 +1,2 @@
-+#define SONAME_PREFIX "cyg"
-+#define SONAME_SUFFIX(n) ("-" #n ".dll")
---- a/libgomp/config/darwin/plugin-suffix.h 2015-01-28 15:23:14.000000000 -0600
-+++ b/libgomp/config/darwin/plugin-suffix.h 2016-01-31 17:06:46.445956900 -0600
-@@ -23,4 +23,5 @@
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
-
-+#define SONAME_PREFIX "lib"
- #define SONAME_SUFFIX(n) ("." #n ".dylib")
---- a/libgomp/config/hpux/plugin-suffix.h 2015-01-28 15:23:14.000000000 -0600
-+++ b/libgomp/config/hpux/plugin-suffix.h 2016-01-31 17:06:52.059169700 -0600
-@@ -23,4 +23,5 @@
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
-
-+#define SONAME_PREFIX "lib"
- #define SONAME_SUFFIX(n) (".sl." #n)
---- a/libgomp/config/posix/plugin-suffix.h 2015-01-28 15:23:14.000000000 -0600
-+++ b/libgomp/config/posix/plugin-suffix.h 2016-01-31 17:06:58.481985300 -0600
-@@ -23,4 +23,5 @@
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
-
-+#define SONAME_PREFIX "lib"
- #define SONAME_SUFFIX(n) (".so." #n)
---- a/libgomp/configure.tgt 2015-03-13 05:57:07.000000000 -0500
-+++ b/libgomp/configure.tgt 2016-01-31 16:25:19.321132200 -0600
-@@ -132,6 +132,10 @@ case "${target}" in
- esac
- ;;
-
-+ *-*-cygwin*)
-+ config_path="cygwin posix"
-+ ;;
-+
- *-*-mingw32*)
- config_path="mingw32 posix"
- ;;
---- a/libgomp/target.c 2015-04-08 10:58:33.000000000 -0500
-+++ b/libgomp/target.c 2016-01-31 17:07:08.238724300 -0600
-@@ -1215,7 +1215,7 @@ gomp_load_plugin_for_device (struct gomp
- static void
- gomp_target_init (void)
- {
-- const char *prefix ="libgomp-plugin-";
-+ const char *prefix = SONAME_PREFIX "gomp-plugin-";
- const char *suffix = SONAME_SUFFIX (1);
- const char *cur, *next;
- char *plugin_name;
diff --git a/0023-glibcxx-use-c99.patch b/0023-glibcxx-use-c99.patch
deleted file mode 100644
index 3c546e0..0000000
--- a/0023-glibcxx-use-c99.patch
+++ /dev/null
@@ -1,85 +0,0 @@
---- origsrc/gcc-5.3.0/libstdc++-v3/acinclude.m4 2015-11-24 07:25:07.000000000 -0600
-+++ src/gcc-5.3.0/libstdc++-v3/acinclude.m4 2016-02-04 17:42:34.609707600 -0600
-@@ -925,7 +925,7 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
- # Long term, -std=c++0x could be even better, could manage to explicitly
- # request C99 facilities to the underlying C headers.
- ac_save_CXXFLAGS="$CXXFLAGS"
-- CXXFLAGS="$CXXFLAGS -std=c++98"
-+ CXXFLAGS="$CXXFLAGS -std=c++11"
- ac_save_LIBS="$LIBS"
- ac_save_gcc_no_link="$gcc_no_link"
-
-@@ -1128,7 +1128,6 @@
-
- # Option parsed, now set things appropriately.
- if test x"$glibcxx_cv_c99_math" = x"no" ||
-- test x"$glibcxx_cv_c99_complex" = x"no" ||
- test x"$glibcxx_cv_c99_stdio" = x"no" ||
- test x"$glibcxx_cv_c99_stdlib" = x"no" ||
- test x"$glibcxx_cv_c99_wchar" = x"no"; then
-@@ -1136,7 +1135,7 @@
- else
- AC_DEFINE(_GLIBCXX_USE_C99, 1,
- [Define if C99 functions or macros from <wchar.h>, <math.h>,
-- <complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.])
-+ <stdio.h>, and <stdlib.h> can be used or exposed.])
- fi
-
- gcc_no_link="$ac_save_gcc_no_link"
-@@ -1448,7 +1447,7 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
- # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
- # undefined and fake C99 facilities may be spuriously enabled.
- ac_save_CXXFLAGS="$CXXFLAGS"
-- CXXFLAGS="$CXXFLAGS -std=c++98"
-+ CXXFLAGS="$CXXFLAGS -std=c++11"
-
- # Check for the existence of <complex.h> complex math functions used
- # by tr1/complex.
---- origsrc/gcc-5.3.0/libstdc++-v3/linkage.m4 2013-02-11 11:50:13.000000000 -0600
-+++ src/gcc-5.3.0/libstdc++-v3/linkage.m4 2016-02-12 00:28:50.419067100 -0600
-@@ -333,7 +333,7 @@
- AC_DEFUN([GLIBCXX_CHECK_STDLIB_SUPPORT], [
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
-- CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
-+ CXXFLAGS='-std=gnu++11 -fno-builtin -D_GNU_SOURCE'
-
- GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_1(at_quick_exit)
- GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_1(quick_exit)
---- origsrc/gcc-5.3.0/libstdc++-v3/configure 2015-11-26 07:51:04.000000000 -0600
-+++ src/gcc-5.3.0/libstdc++-v3/configure 2016-02-04 17:43:03.473372800 -0600
-@@ -16646,7 +16646,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # Long term, -std=c++0x could be even better, could manage to explicitly
- # request C99 facilities to the underlying C headers.
- ac_save_CXXFLAGS="$CXXFLAGS"
-- CXXFLAGS="$CXXFLAGS -std=c++98"
-+ CXXFLAGS="$CXXFLAGS -std=c++11"
- ac_save_LIBS="$LIBS"
- ac_save_gcc_no_link="$gcc_no_link"
-
-@@ -17270,7 +17270,6 @@
-
- # Option parsed, now set things appropriately.
- if test x"$glibcxx_cv_c99_math" = x"no" ||
-- test x"$glibcxx_cv_c99_complex" = x"no" ||
- test x"$glibcxx_cv_c99_stdio" = x"no" ||
- test x"$glibcxx_cv_c99_stdlib" = x"no" ||
- test x"$glibcxx_cv_c99_wchar" = x"no"; then
-@@ -18887,7 +18886,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # Use -std=c++98 because the default (-std=gnu++98) leaves __STRICT_ANSI__
- # undefined and fake C99 facilities may be spuriously enabled.
- ac_save_CXXFLAGS="$CXXFLAGS"
-- CXXFLAGS="$CXXFLAGS -std=c++98"
-+ CXXFLAGS="$CXXFLAGS -std=c++11"
-
- # Check for the existence of <complex.h> complex math functions used
- # by tr1/complex.
-@@ -26704,7 +26704,7 @@
-
- ac_test_CXXFLAGS="${CXXFLAGS+set}"
- ac_save_CXXFLAGS="$CXXFLAGS"
-- CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
-+ CXXFLAGS='-std=gnu++11 -fno-builtin -D_GNU_SOURCE'
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at_quick_exit declaration" >&5
diff --git a/0026-g++-gnu-source.patch b/0026-g++-gnu-source.patch
deleted file mode 100644
index 2e11a66..0000000
--- a/0026-g++-gnu-source.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- origsrc/gcc-5.3.0/config/mt-cygwin 1969-12-31 18:00:00.000000000 -0600
-+++ src/gcc-5.3.0/config/mt-cygwin 2016-02-04 01:48:00.058340400 -0600
-@@ -0,0 +1 @@
-+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
---- origsrc/gcc-5.3.0/configure.ac 2015-05-03 12:29:57.000000000 -0500
-+++ src/gcc-5.3.0/configure.ac 2016-02-03 17:34:52.238164400 -0600
-@@ -2519,6 +2519,9 @@ case "${target}" in
- nios2-*-elf*)
- target_makefile_frag="config/mt-nios2-elf"
- ;;
-+ *-*-cygwin*)
-+ target_makefile_frag="config/mt-cygwin"
-+ ;;
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
- target_makefile_frag="config/mt-gnu"
- ;;
---- origsrc/gcc-5.3.0/configure 2015-05-03 12:29:57.000000000 -0500
-+++ src/gcc-5.3.0/configure 2016-02-04 02:06:24.917639700 -0600
-@@ -6873,6 +6873,9 @@ case "${target}" in
- nios2-*-elf*)
- target_makefile_frag="config/mt-nios2-elf"
- ;;
-+ *-*-cygwin*)
-+ target_makefile_frag="config/mt-cygwin"
-+ ;;
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
- target_makefile_frag="config/mt-gnu"
- ;;
---- origsrc/gcc-5.3.0/gcc/config/i386/cygwin.h 2016-02-03 16:49:24.261755400 -0600
-+++ src/gcc-5.3.0/gcc/config/i386/cygwin.h 2016-02-04 02:04:29.163940800 -0600
-@@ -105,6 +105,9 @@ along with GCC; see the file COPYING3.
- --wrap _ZdlPvRKSt9nothrow_t \
- --wrap _ZdaPvRKSt9nothrow_t \
- "
-+/* The GNU C++ standard library requires that these macros be defined. */
-+#undef CPLUSPLUS_CPP_SPEC
-+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
-
- #if defined (USE_CYGWIN_LIBSTDCXX_WRAPPERS)
-
diff --git a/0028-g++-time.patch b/0028-g++-time.patch
deleted file mode 100644
index 9dd3107..0000000
--- a/0028-g++-time.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-This was just a bit outdated...
-
---- a/libstdc++-v3/acinclude.m4 2015-11-24 07:25:07.000000000 -0600
-+++ b/libstdc++-v3/acinclude.m4 2016-04-01 00:21:40.077426000 -0500
-@@ -1196,7 +1196,10 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME]
-
- case "${target_os}" in
- cygwin*)
-+ ac_has_clock_monotonic=yes
-+ ac_has_clock_realtime=yes
- ac_has_nanosleep=yes
-+ ac_has_sched_yield=yes
- ;;
- darwin*)
- ac_has_nanosleep=yes
---- a/libstdc++-v3/configure 2016-03-31 21:24:38.558164300 -0500
-+++ b/libstdc++-v3/configure 2016-04-01 00:26:14.110723800 -0500
-@@ -19632,7 +19632,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- case "${target_os}" in
- cygwin*)
-+ ac_has_clock_monotonic=yes
-+ ac_has_clock_realtime=yes
- ac_has_nanosleep=yes
-+ ac_has_sched_yield=yes
- ;;
- darwin*)
- ac_has_nanosleep=yes
diff --git a/0030-newlib-ftm.patch b/0030-newlib-ftm.patch
deleted file mode 100644
index 804957a..0000000
--- a/0030-newlib-ftm.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/gcc/glimits.h 2016-01-04 08:30:50.652828000 -0600
-+++ b/gcc/glimits.h 2017-11-13 18:46:28.887539100 -0600
-@@ -111,7 +111,7 @@
- # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
- #endif
-
--#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
-+#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : defined (__NEWLIB__) ? __GNU_VISIBLE : !defined (__STRICT_ANSI__)
- /* Minimum and maximum values a `signed long long int' can hold. */
- # undef LONG_LONG_MIN
- # define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
diff --git a/0031-define_std-unix.patch b/0031-define_std-unix.patch
deleted file mode 100644
index 1d2c20f..0000000
--- a/0031-define_std-unix.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/gcc/config/i386/cygwin.h 2017-11-03 00:47:46.634665300 -0500
-+++ b/gcc/config/i386/cygwin.h 2018-01-15 16:36:17.677500200 -0600
-@@ -24,14 +24,12 @@
- builtin_define ("__CYGWIN__"); \
- if (!TARGET_64BIT) \
- builtin_define ("__CYGWIN32__"); \
-- builtin_define ("__unix__"); \
-- builtin_define ("__unix"); \
-+ builtin_define_std ("unix"); \
- } \
- while (0)
-
- #undef CPP_SPEC
- #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
-- %{!ansi:-Dunix} \
- %{pthread:-D_REENTRANT} \
- %{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
- %{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
diff --git a/0032-libstdc-use-lt_host_flags-for-libstdc-.la.patch b/0032-libstdc-use-lt_host_flags-for-libstdc-.la.patch
deleted file mode 100644
index 6884247..0000000
--- a/0032-libstdc-use-lt_host_flags-for-libstdc-.la.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 12c2962dd64b191bb3b6f335ca0e57fdfb003cc7 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sun, 22 Mar 2020 09:56:58 +0800
-Subject: [PATCH 32/35] 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 8511a30..fee5aaf 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.21.0
-
diff --git a/0033-libstdc-regenerate-src-Makefile.in-for-lt_host_flags.patch b/0033-libstdc-regenerate-src-Makefile.in-for-lt_host_flags.patch
deleted file mode 100644
index bb72e63..0000000
--- a/0033-libstdc-regenerate-src-Makefile.in-for-lt_host_flags.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 4a79d7008671991fc142b5fecffc32efbaf06728 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sun, 22 Mar 2020 09:57:42 +0800
-Subject: [PATCH 33/35] 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 d91f715..9115d97 100644
---- a/libstdc++-v3/src/Makefile.in
-+++ b/libstdc++-v3/src/Makefile.in
-@@ -515,7 +515,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.21.0
-
diff --git a/0034-libstdc-use-a-link-test-to-test-for-Wl-z-relro.patch b/0034-libstdc-use-a-link-test-to-test-for-Wl-z-relro.patch
deleted file mode 100644
index c81923c..0000000
--- a/0034-libstdc-use-a-link-test-to-test-for-Wl-z-relro.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5d7541c13423bfc7457400dd9b48c92ec46dac96 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sun, 22 Mar 2020 09:59:37 +0800
-Subject: [PATCH 34/35] 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 192ecab..d5e0e5e 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.21.0
-
diff --git a/0035-libstdc-regenerate-configure.patch b/0035-libstdc-regenerate-configure.patch
deleted file mode 100644
index 1d66bc3..0000000
--- a/0035-libstdc-regenerate-configure.patch
+++ /dev/null
@@ -1,455 +0,0 @@
-From 66212278341c9defdc4a194d706908fcb593d6b4 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sun, 22 Mar 2020 10:03:10 +0800
-Subject: [PATCH 35/35] libstdc++: regenerate configure
-
-Signed-off-by: Jonathan Yong <10walls@gmail.com>
----
- libstdc++-v3/configure | 263 +++++++++++++++++++++++++++++++++++++----
- 1 file changed, 242 insertions(+), 21 deletions(-)
-
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index b3ddad9..bb4f0ea 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -871,6 +871,7 @@ infodir
- docdir
- oldincludedir
- includedir
-+runstatedir
- localstatedir
- sharedstatedir
- sysconfdir
-@@ -996,6 +997,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}'
-@@ -1248,6 +1250,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=* \
-@@ -1385,7 +1396,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.
-@@ -1538,6 +1549,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]
-@@ -12048,7 +12060,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 12051 "configure"
-+#line 12063 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -12154,7 +12166,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 12157 "configure"
-+#line 12169 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -15840,7 +15852,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
- # Fake what AC_TRY_COMPILE does.
-
- cat > conftest.$ac_ext << EOF
--#line 15843 "configure"
-+#line 15855 "configure"
- int main()
- {
- typedef bool atomic_type;
-@@ -15875,7 +15887,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
- rm -f conftest*
-
- cat > conftest.$ac_ext << EOF
--#line 15878 "configure"
-+#line 15890 "configure"
- int main()
- {
- typedef short atomic_type;
-@@ -15910,7 +15922,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
- rm -f conftest*
-
- cat > conftest.$ac_ext << EOF
--#line 15913 "configure"
-+#line 15925 "configure"
- int main()
- {
- // NB: _Atomic_word not necessarily int.
-@@ -15946,7 +15958,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
- rm -f conftest*
-
- cat > conftest.$ac_ext << EOF
--#line 15949 "configure"
-+#line 15961 "configure"
- int main()
- {
- typedef long long atomic_type;
-@@ -16099,7 +16111,7 @@ $as_echo "mutex" >&6; }
- # unnecessary for this test.
-
- cat > conftest.$ac_ext << EOF
--#line 16102 "configure"
-+#line 16114 "configure"
- int main()
- {
- _Decimal32 d1;
-@@ -16141,7 +16153,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # unnecessary for this test.
-
- cat > conftest.$ac_ext << EOF
--#line 16144 "configure"
-+#line 16156 "configure"
- template<typename T1, typename T2>
- struct same
- { typedef T2 type; };
-@@ -16175,7 +16187,7 @@ $as_echo "$enable_int128" >&6; }
- rm -f conftest*
-
- cat > conftest.$ac_ext << EOF
--#line 16178 "configure"
-+#line 16190 "configure"
- template<typename T1, typename T2>
- struct same
- { typedef T2 type; };
-@@ -22611,7 +22623,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
-@@ -29778,7 +29809,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
-@@ -35756,7 +35806,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
-@@ -41868,7 +41937,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
-@@ -53775,7 +53863,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
-@@ -54040,7 +54147,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
-@@ -54507,7 +54633,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
-@@ -60875,7 +61020,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
-@@ -66806,7 +66970,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
-@@ -67007,7 +67190,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
-@@ -67227,7 +67429,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.21.0
-
diff --git a/0101-Cygwin-enable-libgccjit-not-just-for-MingW.patch b/0101-Cygwin-enable-libgccjit-not-just-for-MingW.patch
new file mode 100644
index 0000000..62cf0f7
--- /dev/null
+++ b/0101-Cygwin-enable-libgccjit-not-just-for-MingW.patch
@@ -0,0 +1,183 @@
+From 38fae7faa3405611b2cce41de639aa3351dbc048 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 1/2] 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 504f6410274..fc0dd15f3e9 100755
+--- a/configure
++++ b/configure
+@@ -756,6 +756,7 @@ infodir
+ docdir
+ oldincludedir
+ includedir
++runstatedir
+ localstatedir
+ sharedstatedir
+ sysconfdir
+@@ -922,6 +923,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}'
+@@ -1174,6 +1176,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=* \
+@@ -1311,7 +1322,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.
+@@ -1471,6 +1482,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]
+@@ -8492,6 +8504,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)
+@@ -8516,7 +8529,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 088e735c5db..7f452989b82 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2089,6 +2089,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)
+@@ -2112,7 +2113,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
+@@ -285,7 +285,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 663772aba63..98c4d521b1c 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) \
+@@ -105,7 +110,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
+@@ -129,7 +134,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)))
+ $(LIBGCCJIT_SONAME_SYMLINK): $(LIBGCCJIT_FILENAME)
+ ln -sf $(LIBGCCJIT_FILENAME) $(LIBGCCJIT_SONAME_SYMLINK)
+
+@@ -311,7 +316,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 a3f5948aaee..97b91b33afa 100644
+--- a/gcc/system.h
++++ b/gcc/system.h
+@@ -688,8 +688,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.31.1
+
diff --git a/0102-Cygwin-testsuite-fixes-for-libgccjit.patch b/0102-Cygwin-testsuite-fixes-for-libgccjit.patch
new file mode 100644
index 0000000..eb4607f
--- /dev/null
+++ b/0102-Cygwin-testsuite-fixes-for-libgccjit.patch
@@ -0,0 +1,123 @@
+From 068dd234b9c42fdb7b8a44c66c186a8f5059d43e Mon Sep 17 00:00:00 2001
+From: Achim Gratz <Achim.Gratz@Stromeko.DE>
+Date: Sun, 25 Apr 2021 11:57:09 +0200
+Subject: [PATCH 2/2] 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 | 12 ++++++------
+ gcc/testsuite/jit.dg/test-compile-to-assembler.c | 2 +-
+ .../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, 11 insertions(+), 11 deletions(-)
+
+diff --git a/gcc/testsuite/jit.dg/jit.exp b/gcc/testsuite/jit.dg/jit.exp
+index 9af87f9c6ad..f261a25d2f5 100644
+--- a/gcc/testsuite/jit.dg/jit.exp
++++ b/gcc/testsuite/jit.dg/jit.exp
+@@ -449,7 +449,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:
+@@ -590,7 +590,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
+@@ -764,7 +764,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
+@@ -812,7 +812,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
+@@ -864,7 +864,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
+@@ -916,7 +916,7 @@ proc jit-verify-executable { args } {
+
+ # We need to link with --export-dynamic for test-calling-external-function.c
+ # so that the JIT-built code can call into functions from the main program.
+-set DEFAULT_CFLAGS "-I$srcdir/../jit -lgccjit -g -Wall -Werror -Wl,--export-dynamic"
++set DEFAULT_CFLAGS "-I$srcdir/../jit -lgccjit -g -Wall -Werror"
+
+ # Main loop. This will invoke jig-dg-test on each test-*.c file.
+ dg-runtest $tests "" $DEFAULT_CFLAGS
+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.31.1
+
diff --git a/cygwin-gcc.spec b/cygwin-gcc.spec
index 3f0a253..39c8e24 100644
--- a/cygwin-gcc.spec
+++ b/cygwin-gcc.spec
@@ -1,12 +1,14 @@
%global __os_install_post /usr/lib/rpm/brp-compress %{nil}
-%global gcc_version 9.3.0
+%global gcc_major 11
+%global gcc_minor 2
+%global gcc_micro 0
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
%global gcc_release 1
Name: cygwin-gcc
-Version: %{gcc_version}
+Version: %{gcc_major}.%{gcc_minor}.%{gcc_micro}
Release: %{gcc_release}%{?dist}
Summary: Cygwin GCC cross-compiler
@@ -31,32 +33,24 @@ BuildRequires: mpfr-devel
BuildRequires: libmpc-devel
BuildRequires: libstdc++-static
%if 0%{?fedora} || 0%{?rhel} >= 8
-BuildRequires: isl-devel >= 0.14
+BuildRequires: isl-devel >= 0.15
%endif
BuildRequires: zlib-devel
BuildRequires: flex
BuildRequires: gettext
-Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.xz
+Source0: https://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.xz
# Cygwin patches
-Patch7: 0007-Avoid-installing-libffi-V2.patch
-Patch10: 0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch
-Patch11: 0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch
-Patch12: 0012-handle-dllimport-properly-in-medium-model-V2.patch
-Patch13: 0013-skip-test-for-cygwin-mingw.patch
-Patch16: 0016-fix-some-implicit-declaration-warnings.patch
-Patch17: 0017-__cxa-atexit-for-Cygwin.patch
-Patch22: 0022-libgomp-soname-cygwin-mingw.patch
-#Patch23: 0023-glibcxx-use-c99.patch
-#Patch26: 0026-g++-gnu-source.patch
-Patch28: 0028-g++-time.patch
-Patch30: 0030-newlib-ftm.patch
-Patch31: 0031-define_std-unix.patch
-Patch32: 0032-libstdc-use-lt_host_flags-for-libstdc-.la.patch
-Patch33: 0033-libstdc-regenerate-src-Makefile.in-for-lt_host_flags.patch
-Patch34: 0034-libstdc-use-a-link-test-to-test-for-Wl-z-relro.patch
-Patch35: 0035-libstdc-regenerate-configure.patch
+Patch2: 0002-Cygwin-add-dummy-pthread-tsaware-and-large-address-a.patch
+Patch3: 0003-Cygwin-handle-dllimport-properly-in-medium-model-V2.patch
+Patch4: 0004-Cygwin-MinGW-skip-test.patch
+Patch6: 0006-Cygwin-fix-some-implicit-declaration-warnings-and-re.patch
+Patch7: 0007-Cygwin-__cxa-atexit.patch
+Patch8: 0008-Cygwin-libgomp-soname.patch
+Patch9: 0009-Cygwin-g-time.patch
+Patch10: 0010-Cygwin-newlib-ftm.patch
+Patch11: 0011-Cygwin-define-STD_UNIX.patch
# Fedora-specific patches
Patch1001: 1001-textdomain.patch
@@ -195,10 +189,9 @@ Cygwin x86_64 cross-compiler for FORTRAN.
%prep
-%autosetup -n gcc-%{gcc_version} -p1
+%autosetup -n gcc-%{version} -p1
-echo %{gcc_version} > gcc/BASE-VER
-echo 'Fedora Cygwin %{gcc_version}-%{gcc_release}' > gcc/DEV-PHASE
+echo 'Fedora Cygwin %{version}-%{gcc_release}' > gcc/DEV-PHASE
%build
@@ -229,10 +222,11 @@ CC="%{__cc} ${RPM_OPT_FLAGS}" \
--disable-win32-registry \
--enable-threads=posix \
--enable-version-specific-runtime-libs \
+ --with-gcc-major-version-only \
--with-sysroot=%{cygwin32_sysroot} \
--enable-shared --enable-shared-libgcc --enable-__cxa_atexit \
--with-dwarf2 --disable-sjlj-exceptions \
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} >= 8
--enable-graphite \
%endif
--enable-languages="c,c++,fortran,lto" \
@@ -245,8 +239,8 @@ CC="%{__cc} ${RPM_OPT_FLAGS}" \
--enable-libquadmath --enable-libquadmath-support \
--enable-libstdcxx-filesystem-ts \
--with-default-libstdcxx-abi=gcc4-compatible \
- --with-python-dir=/share/gcc-%{gcc_version}/%{cygwin32_target}/python \
- --with-bugurl=http://cygwinports.org
+ --with-python-dir=/share/gcc-%{gcc_major}/%{cygwin32_target}/python \
+ --with-bugurl=https://copr.fedorainfracloud.org/coprs/yselkowitz/cygwin/
popd
mkdir -p build_64bit
@@ -269,10 +263,11 @@ CC="%{__cc} ${RPM_OPT_FLAGS}" \
--disable-win32-registry \
--enable-threads=posix \
--enable-version-specific-runtime-libs \
+ --with-gcc-major-version-only \
--with-sysroot=%{cygwin64_sysroot} \
--enable-shared --enable-shared-libgcc --enable-__cxa_atexit \
--with-dwarf2 \
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} >= 8
--enable-graphite \
%endif
--enable-languages="c,c++,fortran,lto" \
@@ -285,8 +280,8 @@ CC="%{__cc} ${RPM_OPT_FLAGS}" \
--enable-libquadmath --enable-libquadmath-support \
--enable-libstdcxx-filesystem-ts \
--with-default-libstdcxx-abi=gcc4-compatible \
- --with-python-dir=/share/gcc-%{gcc_version}/%{cygwin64_target}/python \
- --with-bugurl=http://cygwinports.org
+ --with-python-dir=/share/gcc-%{gcc_major}/%{cygwin64_target}/python \
+ --with-bugurl=https://copr.fedorainfracloud.org/coprs/yselkowitz/cygwin/
popd
@@ -313,28 +308,28 @@ ln -sf ..%{_prefix}/bin/%{cygwin64_target}-cpp \
# installation bug on multilib platforms
mv $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/lib/libgcc_s.dll.a \
- $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_version}/
+ $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/
# clean-up include-fixed
-mv $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_version}/include-fixed/*limits.h \
- $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_version}/include/
-mv $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_version}/include-fixed/*limits.h \
- $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_version}/include/
-rm -fr $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_version}/include-fixed/
-rm -fr $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_version}/include-fixed/
+mv $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/include-fixed/*limits.h \
+ $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/include/
+mv $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/include-fixed/*limits.h \
+ $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/include/
+rm -fr $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/include-fixed/
+rm -fr $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/include-fixed/
# This is a runtime plugin of libgomp, not a link library
-rm -f $RPM_BUILD_ROOT%{_prefix}/lib/gcc/*/%{version}/libgomp-plugin-host_nonshm.dll.a
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/gcc/*/%{gcc_major}/libgomp-plugin-host_nonshm.dll.a
# libtool installs DLL files of runtime libraries into $(libdir)/../bin,
# but we need them in cygwin*_bindir.
mkdir -p $RPM_BUILD_ROOT%{cygwin32_bindir}
mv $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin32_target}/*.dll \
- $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_version}/*.dll \
+ $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/*.dll \
$RPM_BUILD_ROOT%{cygwin32_bindir}
mkdir -p $RPM_BUILD_ROOT%{cygwin64_bindir}
mv $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/*.dll \
- $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_version}/*.dll \
+ $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/*.dll \
$RPM_BUILD_ROOT%{cygwin64_bindir}
# Don't want the *.la files.
@@ -353,45 +348,47 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%files -n cygwin32-gcc
%{_bindir}/%{cygwin32_target}-gcc
-%{_bindir}/%{cygwin32_target}-gcc-%{version}
+%{_bindir}/%{cygwin32_target}-gcc-%{gcc_major}
%{_bindir}/%{cygwin32_target}-gcc-ar
%{_bindir}/%{cygwin32_target}-gcc-nm
%{_bindir}/%{cygwin32_target}-gcc-ranlib
%{_bindir}/%{cygwin32_target}-gcov
%{_bindir}/%{cygwin32_target}-gcov-dump
%{_bindir}/%{cygwin32_target}-gcov-tool
+%{_bindir}/%{cygwin32_target}-lto-dump
%{_mandir}/man1/%{cygwin32_target}-gcc.1*
%{_mandir}/man1/%{cygwin32_target}-gcov.1*
%{_mandir}/man1/%{cygwin32_target}-gcov-dump.1*
%{_mandir}/man1/%{cygwin32_target}-gcov-tool.1*
+%{_mandir}/man1/%{cygwin32_target}-lto-dump.1*
%dir %{_prefix}/lib/gcc/%{cygwin32_target}
-%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/crtbegin.o
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/crtbeginS.o
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/crtend.o
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/crtfastmath.o
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libatomic.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libatomic.dll.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgcc.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgcc_eh.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgcc_s.dll.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgcov.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgomp.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgomp.dll.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgomp.spec
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libquadmath.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libquadmath.dll.a
-%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include/*.h
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/install-tools/
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/plugin/
-%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/install-tools/
-%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/liblto_plugin.so
-%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/lto1
-%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/lto-wrapper
-%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/plugin/
-%dir %{_datadir}/gcc-%{gcc_version}
-%dir %{_datadir}/gcc-%{gcc_version}/%{cygwin32_target}
+%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/crtbegin.o
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/crtbeginS.o
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/crtend.o
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/crtfastmath.o
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libatomic.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libatomic.dll.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgcc.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgcc_eh.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgcc_s.dll.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgcov.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgomp.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgomp.dll.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgomp.spec
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libquadmath.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libquadmath.dll.a
+%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/include
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/include/*.h
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/install-tools/
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/plugin/
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/install-tools/
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/liblto_plugin.so
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/lto1
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/lto-wrapper
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/plugin/
+%dir %{_datadir}/gcc-%{gcc_major}
+%dir %{_datadir}/gcc-%{gcc_major}/%{cygwin32_target}
%{cygwin32_bindir}/cygatomic-1.dll
%{cygwin32_bindir}/cyggcc_s-1.dll
%{cygwin32_bindir}/cyggomp-1.dll
@@ -403,83 +400,83 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_bindir}/%{cygwin32_target}-cpp
%{_mandir}/man1/%{cygwin32_target}-cpp.1*
%dir %{_prefix}/lib/gcc/%{cygwin32_target}
-%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}
-%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/cc1
+%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/cc1
%files -n cygwin32-gcc-c++
%{_bindir}/%{cygwin32_target}-g++
%{_bindir}/%{cygwin32_target}-c++
%{_mandir}/man1/%{cygwin32_target}-g++.1*
-%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/cc1plus
-%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/collect2
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include/c++/
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libstdc++.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libstdc++.dll.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libstdc++.dll.a-gdb.py
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libstdc++fs.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libsupc++.a
-%dir %{_datadir}/gcc-%{gcc_version}/%{cygwin32_target}/python
-%{_datadir}/gcc-%{gcc_version}/%{cygwin32_target}/python/libstdcxx/
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/cc1plus
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/collect2
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/g++-mapper-server
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/include/c++/
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libstdc++.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libstdc++.dll.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libstdc++.dll.a-gdb.py
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libstdc++fs.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libsupc++.a
+%dir %{_datadir}/gcc-%{gcc_major}/%{cygwin32_target}/python
+%{_datadir}/gcc-%{gcc_major}/%{cygwin32_target}/python/libstdcxx/
%{cygwin32_bindir}/cygstdc++-6.dll
%files -n cygwin32-gcc-gfortran
%{_bindir}/%{cygwin32_target}-gfortran
%{_mandir}/man1/%{cygwin32_target}-gfortran.1*
-%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/f951
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libcaf_single.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgfortran.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgfortran.dll.a
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgfortran.spec
-%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/finclude
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/finclude/ieee_*
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/finclude/omp_lib*
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/finclude/openacc*
+%{_libexecdir}/gcc/%{cygwin32_target}/%{gcc_major}/f951
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libcaf_single.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgfortran.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgfortran.dll.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/libgfortran.spec
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{gcc_major}/finclude/
%{cygwin32_bindir}/cyggfortran-5.dll
%files -n cygwin64-gcc
%{_bindir}/%{cygwin64_target}-gcc
-%{_bindir}/%{cygwin64_target}-gcc-%{version}
+%{_bindir}/%{cygwin64_target}-gcc-%{gcc_major}
%{_bindir}/%{cygwin64_target}-gcc-ar
%{_bindir}/%{cygwin64_target}-gcc-nm
%{_bindir}/%{cygwin64_target}-gcc-ranlib
%{_bindir}/%{cygwin64_target}-gcov
%{_bindir}/%{cygwin64_target}-gcov-dump
%{_bindir}/%{cygwin64_target}-gcov-tool
+%{_bindir}/%{cygwin64_target}-lto-dump
%{_mandir}/man1/%{cygwin64_target}-gcc.1*
%{_mandir}/man1/%{cygwin64_target}-gcov.1*
%{_mandir}/man1/%{cygwin64_target}-gcov-dump.1*
%{_mandir}/man1/%{cygwin64_target}-gcov-tool.1*
+%{_mandir}/man1/%{cygwin64_target}-lto-dump.1*
%dir %{_prefix}/lib/gcc/%{cygwin64_target}
-%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/crtbegin.o
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/crtbeginS.o
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/crtend.o
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/crtfastmath.o
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libatomic.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libatomic.dll.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgcc.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgcc_eh.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgcc_s.dll.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgcov.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgomp.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgomp.dll.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgomp.spec
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libquadmath.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libquadmath.dll.a
-%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include/*.h
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/install-tools/
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/plugin/
-%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/install-tools/
-%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/liblto_plugin.so
-%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/lto1
-%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/lto-wrapper
-%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/plugin/
-%dir %{_datadir}/gcc-%{gcc_version}
-%dir %{_datadir}/gcc-%{gcc_version}/%{cygwin64_target}
+%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/crtbegin.o
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/crtbeginS.o
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/crtend.o
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/crtfastmath.o
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libatomic.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libatomic.dll.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgcc.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgcc_eh.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgcc_s.dll.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgcov.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgomp.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgomp.dll.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgomp.spec
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libquadmath.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libquadmath.dll.a
+%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/include
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/include/*.h
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/install-tools/
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/plugin/
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/install-tools/
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/liblto_plugin.so
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/lto1
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/lto-wrapper
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/plugin/
+%dir %{_datadir}/gcc-%{gcc_major}
+%dir %{_datadir}/gcc-%{gcc_major}/%{cygwin64_target}
%{cygwin64_bindir}/cygatomic-1.dll
%{cygwin64_bindir}/cyggcc_s-seh-1.dll
%{cygwin64_bindir}/cyggomp-1.dll
@@ -491,43 +488,44 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_bindir}/%{cygwin64_target}-cpp
%{_mandir}/man1/%{cygwin64_target}-cpp.1*
%dir %{_prefix}/lib/gcc/%{cygwin64_target}
-%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}
-%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/cc1
+%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/cc1
%files -n cygwin64-gcc-c++
%{_bindir}/%{cygwin64_target}-g++
%{_bindir}/%{cygwin64_target}-c++
%{_mandir}/man1/%{cygwin64_target}-g++.1*
-%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/cc1plus
-%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/collect2
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include/c++/
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libstdc++.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libstdc++.dll.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libstdc++.dll.a-gdb.py
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libstdc++fs.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libsupc++.a
-%dir %{_datadir}/gcc-%{gcc_version}/%{cygwin64_target}/python
-%{_datadir}/gcc-%{gcc_version}/%{cygwin64_target}/python/libstdcxx/
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/cc1plus
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/collect2
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/g++-mapper-server
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/include/c++/
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libstdc++.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libstdc++.dll.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libstdc++.dll.a-gdb.py
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libstdc++fs.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libsupc++.a
+%dir %{_datadir}/gcc-%{gcc_major}/%{cygwin64_target}/python
+%{_datadir}/gcc-%{gcc_major}/%{cygwin64_target}/python/libstdcxx/
%{cygwin64_bindir}/cygstdc++-6.dll
%files -n cygwin64-gcc-gfortran
%{_bindir}/%{cygwin64_target}-gfortran
%{_mandir}/man1/%{cygwin64_target}-gfortran.1*
-%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/f951
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libcaf_single.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgfortran.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgfortran.dll.a
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgfortran.spec
-%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/finclude
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/finclude/ieee_*
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/finclude/omp_lib*
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/finclude/openacc*
+%{_libexecdir}/gcc/%{cygwin64_target}/%{gcc_major}/f951
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libcaf_single.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgfortran.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgfortran.dll.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/libgfortran.spec
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_major}/finclude/
%{cygwin64_bindir}/cyggfortran-5.dll
%changelog
+* Thu Sep 02 2021 Yaakov Selkowitz <yselkowi@redhat.com> - 11.2.0-1
+- new version
+
* Wed Apr 01 2020 Yaakov Selkowitz <yselkowi@redhat.com> - 9.3.0-1
- new version
diff --git a/sources b/sources
index 611c3fe..2f87eab 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (gcc-9.3.0.tar.xz) = 4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de
+SHA512 (gcc-11.2.0.tar.xz) = d53a0a966230895c54f01aea38696f818817b505f1e2bfa65e508753fcd01b2aedb4a61434f41f3a2ddbbd9f41384b96153c684ded3f0fa97c82758d9de5c7cf