summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2016-02-21 18:56:00 -0600
committerYaakov Selkowitz <yselkowi@redhat.com>2016-02-21 18:56:00 -0600
commit2426323bbdcaf8d5904f1f243bb2a5066dd21c8a (patch)
tree21ab325f116ab50e84ac20a77bbaf569eb56a469
parentd9caede9a622bfa41c984c4685a7b185421c96d7 (diff)
downloadcygwin-gcc-2426323bbdcaf8d5904f1f243bb2a5066dd21c8a.tar.gz
cygwin-gcc-2426323bbdcaf8d5904f1f243bb2a5066dd21c8a.tar.xz
cygwin-gcc-2426323bbdcaf8d5904f1f243bb2a5066dd21c8a.zip
cygwin-gcc 5.3.0
-rw-r--r--.gitignore2
-rw-r--r--0001-share-mingw-fset-stack-executable-with-cygwin.patch20
-rw-r--r--0002-boehm-gc-for-cygwin.patch10
-rw-r--r--0003-AWT-Font-fix-for-Cygwin.patch6
-rw-r--r--0004-Cygwin-ioctl-may-emit-EINVAL.patch6
-rw-r--r--0005-use-avoid-version-if-not-tracking-SO-version.patch12
-rw-r--r--0006-cygwin-uses-cyg-library-prefix.patch6
-rw-r--r--0007-Avoid-installing-libffi.patch (renamed from 0010-Avoid-installing-libffi.patch)20
-rw-r--r--0007-bump-libgcj-version.patch22
-rw-r--r--0008-libatomic-libtool-fixes-for-Cygwin.patch147
-rw-r--r--0008-libitm-libtool-fixes-for-Cygwin.patch (renamed from 0011-libitm-libtool-fixes-for-Cygwin.patch)22
-rw-r--r--0009-Cygwin-uses-sysv-ABI-on-x86_64.patch (renamed from 0012-Cygwin-uses-sysv-ABI-on-x86_64.patch)47
-rw-r--r--0009-support-64bit-cygwin-too.patch25
-rw-r--r--0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch (renamed from 0013-Do-not-version-lto-plugin-on-cygwin-mingw.patch)53
-rw-r--r--0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch60
-rw-r--r--0012-handle-dllimport-properly-in-medium-model.patch (renamed from 0015-handle-dllimport-properly-in-medium-model.patch)12
-rw-r--r--0013-skip-test-for-cygwin-mingw.patch (renamed from 0016-skip-test-for-cygwin-mingw.patch)6
-rw-r--r--0014-64bit-Cygwin-uses-SEH.patch (renamed from 0017-64bit-Cygwin-uses-SEH.patch)51
-rw-r--r--0014-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch115
-rw-r--r--0015-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENABLE-for.patch (renamed from 0018-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENABLE-for.patch)22
-rw-r--r--0016-fix-some-implicit-declaration-warnings.patch (renamed from 0019-fix-some-implicit-declaration-warnings.patch)12
-rw-r--r--0017-__cxa-atexit-for-Cygwin.patch49
-rw-r--r--0018-prevent-modules-from-being-unloaded-before-their-dto.patch27
-rw-r--r--0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch37
-rw-r--r--0020-cygwin-uses-cyg-lib-prefix.patch (renamed from 0020-fix-gnat-DLL-prefix-for-Cygwin.patch)175
-rw-r--r--0021-__cxa-atexit-for-Cygwin.patch152
-rw-r--r--0021-search-usr-lib-w32api-explicitly.patch24
-rw-r--r--0022-libgomp-soname-cygwin-mingw.patch53
-rw-r--r--0022-prevent-modules-from-being-unloaded-before-their-dto.patch98
-rw-r--r--0023-Attempt-to-fix-dw2-unwinder-for-Cygwin.patch64
-rw-r--r--0023-glibcxx-use-c99.patch85
-rw-r--r--0024-Restore-compile-mode-pthread.patch27
-rw-r--r--0024-libitm-weak-symbols.patch166
-rw-r--r--0025-enable-libcilkrts.patch136
-rw-r--r--0025-fix-cygwin-stdint.patch86
-rw-r--r--0026-g++-gnu-source.patch40
-rw-r--r--cygwin-gcc.spec178
-rw-r--r--sources2
38 files changed, 1015 insertions, 1060 deletions
diff --git a/.gitignore b/.gitignore
index bdb1e31..919fa99 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/gcc-4.9.3.tar.bz2
+/gcc-5.3.0.tar.bz2
diff --git a/0001-share-mingw-fset-stack-executable-with-cygwin.patch b/0001-share-mingw-fset-stack-executable-with-cygwin.patch
index 2607f5b..05d288d 100644
--- a/0001-share-mingw-fset-stack-executable-with-cygwin.patch
+++ b/0001-share-mingw-fset-stack-executable-with-cygwin.patch
@@ -1,7 +1,7 @@
-From 6435fa425aaed23dc46a50a66772b6b19a6e478a Mon Sep 17 00:00:00 2001
+From bb571d27350ba5e38ae1f2025dc32d826e21e48c Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Wed, 28 May 2014 22:05:17 +0800
-Subject: [PATCH 01/24] share mingw fset-stack-executable with cygwin
+Subject: [PATCH 01/21] share mingw fset-stack-executable with cygwin
---
gcc/config/i386/cygming.opt | 4 ++++
@@ -11,7 +11,7 @@ Subject: [PATCH 01/24] share mingw fset-stack-executable with cygwin
4 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt
-index 3437123..833fccc 100644
+index c7e398f..ff63140 100644
--- a/gcc/config/i386/cygming.opt
+++ b/gcc/config/i386/cygming.opt
@@ -50,6 +50,10 @@ muse-libstdc-wrappers
@@ -26,19 +26,19 @@ index 3437123..833fccc 100644
Driver
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
-index 165d3aa..145e3cc 100644
+index 2186937..803fb6c 100644
--- a/gcc/config/i386/cygwin.h
+++ b/gcc/config/i386/cygwin.h
-@@ -145,3 +145,7 @@ along with GCC; see the file COPYING3. If not see
+@@ -156,3 +156,7 @@ along with GCC; see the file COPYING3. If not see
/* We should find a way to not have to update this manually. */
- #define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-15.dll"
+ #define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-16.dll"
+/* Make stack executable to avoid DEP problems with trampolines. */
+#define HAVE_ENABLE_EXECUTE_STACK
+#undef CHECK_EXECUTE_STACK_ENABLED
+#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable
diff --git a/gcc/config/i386/mingw.opt b/gcc/config/i386/mingw.opt
-index 44fecb0..dc0f53d 100644
+index 322b66c..a0065a6 100644
--- a/gcc/config/i386/mingw.opt
+++ b/gcc/config/i386/mingw.opt
@@ -28,8 +28,4 @@ Wpedantic-ms-format
@@ -51,10 +51,10 @@ index 44fecb0..dc0f53d 100644
-
; Need to retain blank line above.
diff --git a/libgcc/config.host b/libgcc/config.host
-index f4a7428..f196680 100644
+index 140aa22..ecaabc1 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
-@@ -308,6 +308,9 @@ case ${host} in
+@@ -313,6 +313,9 @@ case ${host} in
i[34567]86-*-mingw* | x86_64-*-mingw*)
enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
;;
@@ -65,5 +65,5 @@ index f4a7428..f196680 100644
enable_execute_stack=enable-execute-stack-empty.c;
;;
--
-2.1.1
+2.4.5
diff --git a/0002-boehm-gc-for-cygwin.patch b/0002-boehm-gc-for-cygwin.patch
index 002d410..8614803 100644
--- a/0002-boehm-gc-for-cygwin.patch
+++ b/0002-boehm-gc-for-cygwin.patch
@@ -1,17 +1,17 @@
-From 28e07034d97f5f8eb38f78d8e45e2d47de5c0040 Mon Sep 17 00:00:00 2001
+From 350df6c8caa021f3237486ea6b5145ee559f4d00 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Wed, 28 May 2014 22:11:01 +0800
-Subject: [PATCH 02/24] boehm-gc for cygwin
+Subject: [PATCH 02/21] boehm-gc for cygwin
---
boehm-gc/win32_threads.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/boehm-gc/win32_threads.c b/boehm-gc/win32_threads.c
-index ffb34e0..186bc39 100644
+index 2de1c69..07ecde0 100644
--- a/boehm-gc/win32_threads.c
+++ b/boehm-gc/win32_threads.c
-@@ -707,6 +707,54 @@ void * GC_start_routine(void * arg)
+@@ -711,6 +711,54 @@ void * GC_start_routine(void * arg)
return(result);
}
@@ -67,5 +67,5 @@ index ffb34e0..186bc39 100644
{
GC_thread me = (GC_thread)arg;
--
-2.1.1
+2.4.5
diff --git a/0003-AWT-Font-fix-for-Cygwin.patch b/0003-AWT-Font-fix-for-Cygwin.patch
index 842fc09..e286d87 100644
--- a/0003-AWT-Font-fix-for-Cygwin.patch
+++ b/0003-AWT-Font-fix-for-Cygwin.patch
@@ -1,7 +1,7 @@
-From f4176d1e246a755de7a181169d94cd9676ebb86a Mon Sep 17 00:00:00 2001
+From d586c363d6a880f816e77fe4970da29a417f7d45 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Thu, 29 May 2014 18:06:00 +0800
-Subject: [PATCH 03/24] AWT Font fix for Cygwin
+Subject: [PATCH 03/21] AWT Font fix for Cygwin
---
.../gnu/classpath/examples/awt/HintingDemo.java | 2 +-
@@ -95,5 +95,5 @@ index 4fc0b10..1370469 100644
# List of aliases.
Dialog/a=FreeSans
--
-2.1.1
+2.4.5
diff --git a/0004-Cygwin-ioctl-may-emit-EINVAL.patch b/0004-Cygwin-ioctl-may-emit-EINVAL.patch
index ff14e3f..e46d4aa 100644
--- a/0004-Cygwin-ioctl-may-emit-EINVAL.patch
+++ b/0004-Cygwin-ioctl-may-emit-EINVAL.patch
@@ -1,7 +1,7 @@
-From 4c3499c1009f7051d76ba8b603fdeaa510e5c650 Mon Sep 17 00:00:00 2001
+From f590da14fcd201f8f2a1538523a6cfc279861842 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 08:37:16 +0800
-Subject: [PATCH 04/24] Cygwin ioctl may emit EINVAL
+Subject: [PATCH 04/21] Cygwin ioctl may emit EINVAL
On Cygwin (on X86) ioctl on FIONREAD returns EINVAL on the errno variable instead of ENOTTY
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35536
@@ -23,5 +23,5 @@ index e05904c..0a2569c 100644
// If the ioctl doesn't work, we don't care.
r = 0;
--
-2.1.1
+2.4.5
diff --git a/0005-use-avoid-version-if-not-tracking-SO-version.patch b/0005-use-avoid-version-if-not-tracking-SO-version.patch
index 3dcd84d..32edb2d 100644
--- a/0005-use-avoid-version-if-not-tracking-SO-version.patch
+++ b/0005-use-avoid-version-if-not-tracking-SO-version.patch
@@ -1,7 +1,7 @@
-From 3dc7b3621f887de9ed4993af86f512f028c71975 Mon Sep 17 00:00:00 2001
+From 562f01f9f740937c28d59ce37770a07716039d52 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 08:45:53 +0800
-Subject: [PATCH 05/24] use -avoid-version if not tracking SO version
+Subject: [PATCH 05/21] use -avoid-version if not tracking SO version
---
libjava/classpath/configure | 2 +-
@@ -9,10 +9,10 @@ Subject: [PATCH 05/24] use -avoid-version if not tracking SO version
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libjava/classpath/configure b/libjava/classpath/configure
-index bcb5bff..ac49367 100755
+index 6d46403..801f6ec 100755
--- a/libjava/classpath/configure
+++ b/libjava/classpath/configure
-@@ -3180,7 +3180,7 @@ case "$host_os" in
+@@ -3181,7 +3181,7 @@ case "$host_os" in
cp_module=""
;;
*)
@@ -22,7 +22,7 @@ index bcb5bff..ac49367 100755
esac
diff --git a/libjava/classpath/configure.ac b/libjava/classpath/configure.ac
-index d120b5b..f59e599 100644
+index 245e1df..5c6f229 100644
--- a/libjava/classpath/configure.ac
+++ b/libjava/classpath/configure.ac
@@ -64,7 +64,7 @@ case "$host_os" in
@@ -35,5 +35,5 @@ index d120b5b..f59e599 100644
esac
--
-2.1.1
+2.4.5
diff --git a/0006-cygwin-uses-cyg-library-prefix.patch b/0006-cygwin-uses-cyg-library-prefix.patch
index 5d5e92a..2914347 100644
--- a/0006-cygwin-uses-cyg-library-prefix.patch
+++ b/0006-cygwin-uses-cyg-library-prefix.patch
@@ -1,7 +1,7 @@
-From 3a9e0759c78e3ce788c446b1fc68efa9e84c900a Mon Sep 17 00:00:00 2001
+From aa3bb322bfa366fee3cfd83646bd0c049957ff05 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 08:48:56 +0800
-Subject: [PATCH 06/24] cygwin uses cyg library prefix
+Subject: [PATCH 06/21] cygwin uses cyg library prefix
---
libjava/include/posix.h | 6 ++++++
@@ -47,5 +47,5 @@ index 0a30a21..810e045 100644
return;
--
-2.1.1
+2.4.5
diff --git a/0010-Avoid-installing-libffi.patch b/0007-Avoid-installing-libffi.patch
index 91c3d65..4af4cfe 100644
--- a/0010-Avoid-installing-libffi.patch
+++ b/0007-Avoid-installing-libffi.patch
@@ -1,7 +1,7 @@
-From 2531e7511954dda8b211be38e37919a4cc0a9dd4 Mon Sep 17 00:00:00 2001
+From c6176a7c4154802d213ca2e7f41c12ff6618f244 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:16:44 +0800
-Subject: [PATCH 10/24] Avoid installing libffi
+Subject: [PATCH 07/21] Avoid installing libffi
Only the convenience library is used in libjava, and the bundled version
is usually a few releases behind the standalone version.
@@ -10,10 +10,10 @@ is usually a few releases behind the standalone version.
1 file changed, 6 deletions(-)
diff --git a/Makefile.in b/Makefile.in
-index 6dd5802..920f5ac 100644
+index bc2bae6..c4bd73b 100644
--- a/Makefile.in
+++ b/Makefile.in
-@@ -1606,7 +1606,6 @@ install-info-target: maybe-install-info-target-libgo
+@@ -1661,7 +1661,6 @@ install-info-target: maybe-install-info-target-libgo
install-info-target: maybe-install-info-target-libtermcap
install-info-target: maybe-install-info-target-winsup
install-info-target: maybe-install-info-target-libgloss
@@ -21,7 +21,7 @@ index 6dd5802..920f5ac 100644
install-info-target: maybe-install-info-target-libjava
install-info-target: maybe-install-info-target-zlib
install-info-target: maybe-install-info-target-boehm-gc
-@@ -1689,7 +1688,6 @@ install-pdf-target: maybe-install-pdf-target-libgo
+@@ -1748,7 +1747,6 @@ install-pdf-target: maybe-install-pdf-target-libgo
install-pdf-target: maybe-install-pdf-target-libtermcap
install-pdf-target: maybe-install-pdf-target-winsup
install-pdf-target: maybe-install-pdf-target-libgloss
@@ -29,7 +29,7 @@ index 6dd5802..920f5ac 100644
install-pdf-target: maybe-install-pdf-target-libjava
install-pdf-target: maybe-install-pdf-target-zlib
install-pdf-target: maybe-install-pdf-target-boehm-gc
-@@ -1772,7 +1770,6 @@ install-html-target: maybe-install-html-target-libgo
+@@ -1835,7 +1833,6 @@ install-html-target: maybe-install-html-target-libgo
install-html-target: maybe-install-html-target-libtermcap
install-html-target: maybe-install-html-target-winsup
install-html-target: maybe-install-html-target-libgloss
@@ -37,7 +37,7 @@ index 6dd5802..920f5ac 100644
install-html-target: maybe-install-html-target-libjava
install-html-target: maybe-install-html-target-zlib
install-html-target: maybe-install-html-target-boehm-gc
-@@ -1855,7 +1852,6 @@ installcheck-target: maybe-installcheck-target-libgo
+@@ -1922,7 +1919,6 @@ installcheck-target: maybe-installcheck-target-libgo
installcheck-target: maybe-installcheck-target-libtermcap
installcheck-target: maybe-installcheck-target-winsup
installcheck-target: maybe-installcheck-target-libgloss
@@ -45,7 +45,7 @@ index 6dd5802..920f5ac 100644
installcheck-target: maybe-installcheck-target-libjava
installcheck-target: maybe-installcheck-target-zlib
installcheck-target: maybe-installcheck-target-boehm-gc
-@@ -2481,7 +2477,6 @@ install-target: \
+@@ -2586,7 +2582,6 @@ install-target: \
maybe-install-target-libtermcap \
maybe-install-target-winsup \
maybe-install-target-libgloss \
@@ -53,7 +53,7 @@ index 6dd5802..920f5ac 100644
maybe-install-target-libjava \
maybe-install-target-zlib \
maybe-install-target-boehm-gc \
-@@ -2584,7 +2579,6 @@ install-strip-target: \
+@@ -2693,7 +2688,6 @@ install-strip-target: \
maybe-install-strip-target-libtermcap \
maybe-install-strip-target-winsup \
maybe-install-strip-target-libgloss \
@@ -62,5 +62,5 @@ index 6dd5802..920f5ac 100644
maybe-install-strip-target-zlib \
maybe-install-strip-target-boehm-gc \
--
-2.1.1
+2.4.5
diff --git a/0007-bump-libgcj-version.patch b/0007-bump-libgcj-version.patch
deleted file mode 100644
index 5b1bbe6..0000000
--- a/0007-bump-libgcj-version.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 35fe0f717d2e2c4c95eb65ce6e1e7373bf798afc Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sat, 28 Jun 2014 08:59:12 +0800
-Subject: [PATCH 07/24] bump libgcj version
-
----
- gcc/config/i386/mingw32.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
-index 4cfd5f0..820cf50 100644
---- a/gcc/config/i386/mingw32.h
-+++ b/gcc/config/i386/mingw32.h
-@@ -246,4 +246,4 @@ do { \
- #define LIBGCC_SONAME "libgcc_s" LIBGCC_EH_EXTN "-1.dll"
-
- /* We should find a way to not have to update this manually. */
--#define LIBGCJ_SONAME "libgcj" /*LIBGCC_EH_EXTN*/ "-13.dll"
-+#define LIBGCJ_SONAME "libgcj" /*LIBGCC_EH_EXTN*/ "-15.dll"
---
-2.1.1
-
diff --git a/0008-libatomic-libtool-fixes-for-Cygwin.patch b/0008-libatomic-libtool-fixes-for-Cygwin.patch
deleted file mode 100644
index 2300af3..0000000
--- a/0008-libatomic-libtool-fixes-for-Cygwin.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From ea6218eb8afa21b0b4dcf90a2f0eab7c024242e9 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sat, 28 Jun 2014 09:08:37 +0800
-Subject: [PATCH 08/24] libatomic libtool fixes for Cygwin
-
----
- libatomic/Makefile.am | 2 +-
- libatomic/Makefile.in | 3 ++-
- libatomic/aclocal.m4 | 1 +
- libatomic/configure | 27 +++++++++++++++++++++++++--
- libatomic/configure.ac | 1 +
- libatomic/configure.tgt | 2 +-
- 6 files changed, 31 insertions(+), 5 deletions(-)
-
-diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index 47f25df..56e1c34 100644
---- a/libatomic/Makefile.am
-+++ b/libatomic/Makefile.am
-@@ -66,7 +66,7 @@ libatomic_version_dep =
- endif
- libatomic_version_info = -version-info $(libtool_VERSION)
-
--libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
-+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
- libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
- fenv.c
-
-diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index 22c384b..9c510db 100644
---- a/libatomic/Makefile.in
-+++ b/libatomic/Makefile.in
-@@ -244,6 +244,7 @@ libexecdir = @libexecdir@
- libtool_VERSION = @libtool_VERSION@
- localedir = @localedir@
- localstatedir = @localstatedir@
-+lt_host_flags = @lt_host_flags@
- mandir = @mandir@
- mkdir_p = @mkdir_p@
- multi_basedir = @multi_basedir@
-@@ -285,7 +286,7 @@ noinst_LTLIBRARIES = libatomic_convenience.la
- @LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = $(top_srcdir)/libatomic.map
- @LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = libatomic.map-sun
- libatomic_version_info = -version-info $(libtool_VERSION)
--libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
-+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
- libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
- fenv.c
-
-diff --git a/libatomic/aclocal.m4 b/libatomic/aclocal.m4
-index 48f5ef5..26dd3f4 100644
---- a/libatomic/aclocal.m4
-+++ b/libatomic/aclocal.m4
-@@ -994,6 +994,7 @@ m4_include([../config/acx.m4])
- m4_include([../config/depstand.m4])
- m4_include([../config/lead-dot.m4])
- m4_include([../config/multi.m4])
-+m4_include([../config/lthostflags.m4])
- m4_include([../config/override.m4])
- m4_include([../config/stdint.m4])
- m4_include([../ltoptions.m4])
-diff --git a/libatomic/configure b/libatomic/configure
-index d707b09..58e1338 100755
---- a/libatomic/configure
-+++ b/libatomic/configure
-@@ -627,6 +627,7 @@ MAINTAINER_MODE_FALSE
- MAINTAINER_MODE_TRUE
- enable_static
- enable_shared
-+lt_host_flags
- CPP
- OTOOL64
- OTOOL
-@@ -11106,7 +11107,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11109 "configure"
-+#line 11110 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11212,7 +11213,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11215 "configure"
-+#line 11216 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11452,6 +11453,28 @@ CC="$lt_save_CC"
-
-
-
-+case $host in
-+ *-cygwin* | *-mingw*)
-+ # 'host' will be top-level target in the case of a target lib,
-+ # we must compare to with_cross_host to decide if this is a native
-+ # or cross-compiler and select where to install dlls appropriately.
-+ if test -n "$with_cross_host" &&
-+ test x"$with_cross_host" != x"no"; then
-+ lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"';
-+ else
-+ lt_host_flags='-no-undefined -bindir "$(bindir)"';
-+ fi
-+ ;;
-+ *)
-+ lt_host_flags=
-+ ;;
-+esac
-+
-+
-+
-+
-+
-+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
- $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
- # Check whether --enable-maintainer-mode was given.
-diff --git a/libatomic/configure.ac b/libatomic/configure.ac
-index 9e8678d..f5db090 100644
---- a/libatomic/configure.ac
-+++ b/libatomic/configure.ac
-@@ -143,6 +143,7 @@ AC_PROG_INSTALL
-
- # Configure libtool
- AM_PROG_LIBTOOL
-+ACX_LT_HOST_FLAGS
- AC_SUBST(enable_shared)
- AC_SUBST(enable_static)
- AM_MAINTAINER_MODE
-diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
-index a3757ef..63db8ca 100644
---- a/libatomic/configure.tgt
-+++ b/libatomic/configure.tgt
-@@ -103,7 +103,7 @@ case "${target}" in
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
- | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
- | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
-- | *-*-darwin* | *-*-aix*)
-+ | *-*-darwin* | *-*-aix* | *-*-cygwin* )
- # POSIX system. The OS is supported.
- config_path="${config_path} posix"
- ;;
---
-2.1.1
-
diff --git a/0011-libitm-libtool-fixes-for-Cygwin.patch b/0008-libitm-libtool-fixes-for-Cygwin.patch
index aa8a6e3..aab1b5b 100644
--- a/0011-libitm-libtool-fixes-for-Cygwin.patch
+++ b/0008-libitm-libtool-fixes-for-Cygwin.patch
@@ -1,7 +1,7 @@
-From d20aa5cbede139c08faa87f1942dfcd5348b62df Mon Sep 17 00:00:00 2001
+From 0e3b5257a3703bd2867c329a8fd60ec4994655ab Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:22:03 +0800
-Subject: [PATCH 11/24] libitm libtool fixes for Cygwin
+Subject: [PATCH 08/21] libitm libtool fixes for Cygwin
---
libitm/Makefile.am | 2 +-
@@ -25,10 +25,10 @@ index 1dce82d..0ea39f2 100644
libitm_la_SOURCES = \
aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc barrier.cc beginend.cc \
diff --git a/libitm/Makefile.in b/libitm/Makefile.in
-index 6c4d253..5898bd8 100644
+index 138eeb1..a25c6d2 100644
--- a/libitm/Makefile.in
+++ b/libitm/Makefile.in
-@@ -279,6 +279,7 @@ libtool_VERSION = @libtool_VERSION@
+@@ -307,6 +307,7 @@ libtool_VERSION = @libtool_VERSION@
link_itm = @link_itm@
localedir = @localedir@
localstatedir = @localstatedir@
@@ -36,7 +36,7 @@ index 6c4d253..5898bd8 100644
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@
-@@ -329,7 +330,7 @@ libitm_version_info = -version-info $(libtool_VERSION)
+@@ -357,7 +358,7 @@ libitm_version_info = -version-info $(libtool_VERSION)
# want or need libstdc++.
libitm_la_DEPENDENCIES = $(libitm_version_dep)
libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS)
@@ -46,10 +46,10 @@ index 6c4d253..5898bd8 100644
barrier.cc beginend.cc clone.cc eh_cpp.cc local.cc query.cc \
retry.cc rwlock.cc useraction.cc util.cc sjlj.S tls.cc \
diff --git a/libitm/aclocal.m4 b/libitm/aclocal.m4
-index 625404e..4be0d43 100644
+index aeab414..15be307 100644
--- a/libitm/aclocal.m4
+++ b/libitm/aclocal.m4
-@@ -996,6 +996,7 @@ m4_include([../config/depstand.m4])
+@@ -1016,6 +1016,7 @@ m4_include([../config/depstand.m4])
m4_include([../config/enable.m4])
m4_include([../config/futex.m4])
m4_include([../config/lead-dot.m4])
@@ -58,7 +58,7 @@ index 625404e..4be0d43 100644
m4_include([../config/multi.m4])
m4_include([../config/override.m4])
diff --git a/libitm/configure b/libitm/configure
-index ce6d50a..fe5c8ae 100644
+index 55332bb..2696e86 100644
--- a/libitm/configure
+++ b/libitm/configure
@@ -630,6 +630,7 @@ MAINTAINER_MODE_FALSE
@@ -69,7 +69,7 @@ index ce6d50a..fe5c8ae 100644
CXXCPP
CPP
OTOOL64
-@@ -15147,6 +15148,28 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+@@ -15152,6 +15153,28 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
@@ -99,7 +99,7 @@ index ce6d50a..fe5c8ae 100644
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
diff --git a/libitm/configure.ac b/libitm/configure.ac
-index 70feff2..17a13ba 100644
+index 2d99b11..6b8ad09 100644
--- a/libitm/configure.ac
+++ b/libitm/configure.ac
@@ -147,6 +147,7 @@ AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
@@ -111,5 +111,5 @@ index 70feff2..17a13ba 100644
AC_SUBST(enable_static)
--
-2.1.1
+2.4.5
diff --git a/0012-Cygwin-uses-sysv-ABI-on-x86_64.patch b/0009-Cygwin-uses-sysv-ABI-on-x86_64.patch
index 7bb9928..1467381 100644
--- a/0012-Cygwin-uses-sysv-ABI-on-x86_64.patch
+++ b/0009-Cygwin-uses-sysv-ABI-on-x86_64.patch
@@ -1,18 +1,17 @@
-From 45d9322ca504239a11f49b3a9d58916cc3fb1d6d Mon Sep 17 00:00:00 2001
+From e1a6bd5a0f166c0677e0272bec0e7e3f26003fbd Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:31:06 +0800
-Subject: [PATCH 12/24] Cygwin uses sysv ABI on x86_64
+Subject: [PATCH 09/21] Cygwin uses sysv ABI on x86_64
---
gcc/builtin-attrs.def | 3 +++
gcc/gtm-builtins.def | 2 +-
- libitm/configure.tgt | 2 +-
libitm/libitm.h | 3 ++-
- libitm/libitm_i.h | 6 ++++--
- 5 files changed, 11 insertions(+), 5 deletions(-)
+ 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 593df2d..a707d0a 100644
+index 1338644..59bdc72 100644
--- a/gcc/builtin-attrs.def
+++ b/gcc/builtin-attrs.def
@@ -108,6 +108,7 @@ DEF_ATTR_IDENT (ATTR_TYPEGENERIC, "type generic")
@@ -23,7 +22,7 @@ index 593df2d..a707d0a 100644
DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LIST, ATTR_NOVOPS, ATTR_NULL, ATTR_NULL)
-@@ -259,6 +260,8 @@ DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHROW_LIST,
+@@ -264,6 +265,8 @@ DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHROW_LIST,
ATTR_TM_REGPARM, ATTR_NULL, ATTR_CONST_NOTHROW_LIST)
DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_RT_LIST,
ATTR_RETURNS_TWICE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
@@ -43,21 +42,8 @@ index e2bc081..08cf597 100644
DEF_TM_BUILTIN (BUILT_IN_TM_COMMIT, "_ITM_commitTransaction",
BT_FN_VOID, ATTR_TM_NOTHROW_LIST)
-diff --git a/libitm/configure.tgt b/libitm/configure.tgt
-index bd95509..8bb9bdc 100644
---- a/libitm/configure.tgt
-+++ b/libitm/configure.tgt
-@@ -141,7 +141,7 @@ case "${target}" in
- *-*-gnu* | *-*-k*bsd*-gnu \
- | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
- | *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
-- | *-*-darwin* | *-*-aix*)
-+ | *-*-darwin* | *-*-aix* | *-*-cygwin*)
- # POSIX system. The OS is supported.
- ;;
-
diff --git a/libitm/libitm.h b/libitm/libitm.h
-index b15b68c..0ee9db5 100644
+index 651896b..6f7a84b 100644
--- a/libitm/libitm.h
+++ b/libitm/libitm.h
@@ -45,6 +45,7 @@ extern "C" {
@@ -78,21 +64,10 @@ index b15b68c..0ee9db5 100644
extern void _ITM_abortTransaction(_ITM_abortReason) ITM_REGPARM ITM_NORETURN;
diff --git a/libitm/libitm_i.h b/libitm/libitm_i.h
-index 7c24493..81f30e9 100644
+index 0eda01b..87f793d 100644
--- a/libitm/libitm_i.h
+++ b/libitm/libitm_i.h
-@@ -39,8 +39,10 @@
- #include "local_type_traits"
- #include "local_atomic"
-
-+#ifndef __CYGWIN__
- /* Don't require libgcc_s.so for exceptions. */
- extern void _Unwind_DeleteException (_Unwind_Exception*) __attribute__((weak));
-+#endif
-
-
- #include "common.h"
-@@ -289,7 +291,7 @@ struct gtm_thread
+@@ -289,7 +289,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 *)
@@ -101,7 +76,7 @@ index 7c24493..81f30e9 100644
// In eh_cpp.cc
void revert_cpp_exceptions (gtm_transaction_cp *cp = 0);
-@@ -322,7 +324,7 @@ namespace GTM HIDDEN {
+@@ -322,7 +322,7 @@ namespace GTM HIDDEN {
extern uint64_t gtm_spin_count_var;
extern "C" uint32_t GTM_longjmp (uint32_t, const gtm_jmpbuf *, uint32_t)
@@ -111,5 +86,5 @@ index 7c24493..81f30e9 100644
extern "C" void GTM_LB (const void *, size_t) ITM_REGPARM;
--
-2.1.1
+2.4.5
diff --git a/0009-support-64bit-cygwin-too.patch b/0009-support-64bit-cygwin-too.patch
deleted file mode 100644
index 6f0aa29..0000000
--- a/0009-support-64bit-cygwin-too.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 93c59a2316a00efed4a10554774a37105d1e8fd1 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sat, 28 Jun 2014 09:11:25 +0800
-Subject: [PATCH 09/24] support 64bit cygwin too
-
----
- libffi/src/x86/ffi.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libffi/src/x86/ffi.c b/libffi/src/x86/ffi.c
-index 611e221..6338de2 100644
---- a/libffi/src/x86/ffi.c
-+++ b/libffi/src/x86/ffi.c
-@@ -28,7 +28,7 @@
- DEALINGS IN THE SOFTWARE.
- ----------------------------------------------------------------------- */
-
--#if !defined(__x86_64__) || defined(_WIN64)
-+#if !defined(__x86_64__) || defined(_WIN64) || defined(__CYGWIN__)
-
- #ifdef _WIN64
- #include <windows.h>
---
-2.1.1
-
diff --git a/0013-Do-not-version-lto-plugin-on-cygwin-mingw.patch b/0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch
index 32672d6..dac123c 100644
--- a/0013-Do-not-version-lto-plugin-on-cygwin-mingw.patch
+++ b/0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch
@@ -1,8 +1,11 @@
-From 260400b3f81d536910460b3e4f7d96bbe23c6040 Mon Sep 17 00:00:00 2001
+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 13/24] Do not version lto plugin on cygwin/mingw
+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 +-
@@ -10,10 +13,10 @@ Subject: [PATCH 13/24] Do not version lto plugin on cygwin/mingw
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/config.host b/gcc/config.host
-index bea17bc..a85d8b2 100644
+index 8b7e16d..361de8e 100644
--- a/gcc/config.host
+++ b/gcc/config.host
-@@ -219,14 +219,14 @@ case ${host} in
+@@ -232,14 +232,14 @@ case ${host} in
out_host_hook_obj=host-cygwin.o
host_xmake_file="${host_xmake_file} i386/x-cygwin"
host_exeext=.exe
@@ -30,7 +33,7 @@ index bea17bc..a85d8b2 100644
;;
x86_64-*-mingw*)
use_long_long_for_widest_fast_int=yes
-@@ -234,7 +234,7 @@ case ${host} in
+@@ -247,7 +247,7 @@ case ${host} in
host_xmake_file="${host_xmake_file} i386/x-mingw32"
host_exeext=.exe
out_host_hook_obj=host-mingw32.o
@@ -40,31 +43,31 @@ index bea17bc..a85d8b2 100644
i[34567]86-*-uwin*)
echo "*** UWIN may not be used as a host platform because"
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
-index e3391bc..2c5c738 100644
+index a90a5da..1ebf155 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
-@@ -24,7 +24,7 @@ liblto_plugin_la_LIBADD = \
- $(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
- # Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
+@@ -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) \
- $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
- liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
- ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
+- $(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 a70de62..a571877 100644
+index 06ef5f3..ec5b3e6 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
-@@ -245,7 +245,7 @@ liblto_plugin_la_LIBADD = \
-
- # 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) \
- $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
-
- liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
+@@ -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.1.1
+2.4.5
diff --git a/0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch b/0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch
new file mode 100644
index 0000000..1f7eaed
--- /dev/null
+++ b/0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch
@@ -0,0 +1,60 @@
+From 66c7c94560b05fe572b282c08fe7d973681bb903 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
+
+---
+ 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
+--- 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
+ %{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \
+ %(shared_libgcc_undefs) \
+ --dll-search-prefix=cyg \
++ %{rdynamic: --export-all-symbols} \
+ %{!shared: %{!mdll: %{" SPEC_32 ":--large-address-aware} --tsaware}}"
+
+ /* 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
+--- 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
+
+ /* To implement C++ function replacement we always wrap the cxx
+ malloc-like operators. See N2800 #17.6.4.6 [replacement.functions] */
++#undef CXX_WRAP_SPEC_LIST
+ #define CXX_WRAP_SPEC_LIST " \
+ --wrap _Znwj \
+ --wrap _Znaj \
+@@ -131,6 +132,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 \
++ %{rdynamic: --export-all-symbols} \
+ %{!shared: %{!mdll: --large-address-aware --tsaware}}"
+
+ /* 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
+--- a/gcc/config/i386/cygwin.opt
++++ b/gcc/config/i386/cygwin.opt
+@@ -20,5 +20,8 @@
+
+ pthread
+ Driver
++
++rdynamic
++Driver
+
+ ; Retain blank line above
+--
+2.4.5
+
diff --git a/0015-handle-dllimport-properly-in-medium-model.patch b/0012-handle-dllimport-properly-in-medium-model.patch
index 4de830e..6520bb0 100644
--- a/0015-handle-dllimport-properly-in-medium-model.patch
+++ b/0012-handle-dllimport-properly-in-medium-model.patch
@@ -1,17 +1,17 @@
-From 508940bebe9d116a1452c1c0b515201929d0738f Mon Sep 17 00:00:00 2001
+From 8d351787bfcd1db7a5661dd9fccd0a1fa0fa04fc Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:52:21 +0800
-Subject: [PATCH 15/24] handle dllimport properly in medium model
+Subject: [PATCH 12/21] handle dllimport properly in medium model
---
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 2ef1384..3fc6104 100644
+index bc76a5b..e886af2 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
-@@ -164,6 +164,7 @@
+@@ -168,6 +168,7 @@
switch (XINT (XEXP (op, 0), 1))
{
case UNSPEC_GOTPCREL:
@@ -19,7 +19,7 @@ index 2ef1384..3fc6104 100644
case UNSPEC_DTPOFF:
case UNSPEC_GOTNTPOFF:
case UNSPEC_NTPOFF:
-@@ -268,6 +269,10 @@
+@@ -263,6 +264,10 @@
/* TLS symbols are not constant. */
if (SYMBOL_REF_TLS_MODEL (op))
return false;
@@ -31,5 +31,5 @@ index 2ef1384..3fc6104 100644
|| (ix86_cmodel == CM_MEDIUM
&& !SYMBOL_REF_FAR_ADDR_P (op)));
--
-2.1.1
+2.4.5
diff --git a/0016-skip-test-for-cygwin-mingw.patch b/0013-skip-test-for-cygwin-mingw.patch
index 309283c..6c6968c 100644
--- a/0016-skip-test-for-cygwin-mingw.patch
+++ b/0013-skip-test-for-cygwin-mingw.patch
@@ -1,7 +1,7 @@
-From 50ab7461ea28b3958a805965374d43f5c945d2c5 Mon Sep 17 00:00:00 2001
+From fb545617895ad517f57367b5b0366b066c28dc3b Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:54:57 +0800
-Subject: [PATCH 16/24] skip test for cygwin/mingw
+Subject: [PATCH 13/21] skip test for cygwin/mingw
---
gcc/testsuite/gcc.target/i386/pr25993.c | 2 +-
@@ -19,5 +19,5 @@ index b079e25..c30eaf5 100644
#ifndef __ASSEMBLER__
--
-2.1.1
+2.4.5
diff --git a/0017-64bit-Cygwin-uses-SEH.patch b/0014-64bit-Cygwin-uses-SEH.patch
index 1f36fae..1d68485 100644
--- a/0017-64bit-Cygwin-uses-SEH.patch
+++ b/0014-64bit-Cygwin-uses-SEH.patch
@@ -1,20 +1,22 @@
-From 99bbc5fbd35295bcf8f7f2d316b2b084fd24f691 Mon Sep 17 00:00:00 2001
+From 1a3122f89dd16478d913ad09735c26754eb789ae Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 10:01:33 +0800
-Subject: [PATCH 17/24] 64bit Cygwin uses SEH
+Subject: [PATCH 14/21] 64bit Cygwin uses SEH
+Conflicts:
+ gcc/ada/seh_init.c
---
- gcc/ada/seh_init.c | 15 +--
+ gcc/ada/seh_init.c | 16 ++--
gcc/ada/system-cygwin-x86_64.ads | 198 +++++++++++++++++++++++++++++++++++++++
gcc/ada/tracebak.c | 2 +-
- 3 files changed, 207 insertions(+), 8 deletions(-)
+ 3 files changed, 209 insertions(+), 7 deletions(-)
create mode 100644 gcc/ada/system-cygwin-x86_64.ads
diff --git a/gcc/ada/seh_init.c b/gcc/ada/seh_init.c
-index 0d04b50..3c3d4a2 100644
+index c8e6512..73e8928 100644
--- a/gcc/ada/seh_init.c
+++ b/gcc/ada/seh_init.c
-@@ -40,6 +40,7 @@
+@@ -46,6 +46,7 @@
#define xmalloc(S) malloc (S)
#else
@@ -22,16 +24,17 @@ index 0d04b50..3c3d4a2 100644
#include "config.h"
#include "system.h"
#endif
-@@ -64,7 +65,7 @@ extern void Raise_From_Signal_Handler (struct Exception_Data *, const char *)
- ATTRIBUTE_NORETURN;
+@@ -72,6 +73,9 @@ extern void Raise_From_Signal_Handler (struct Exception_Data *, const char *)
+ #if defined (_WIN32) || (defined (__CYGWIN__) && defined (__SEH__))
--#if defined (_WIN32)
-+#if defined (_WIN32) || defined(__CYGWIN__)
++#include <windows.h>
++#include <excpt.h>
++
+ /* Prototypes. */
+ extern void _global_unwind2 (void *);
- #include <windows.h>
- #include <excpt.h>
-@@ -170,7 +171,7 @@ __gnat_map_SEH (EXCEPTION_RECORD* ExceptionRecord, const char **msg)
+@@ -173,7 +177,7 @@ __gnat_map_SEH (EXCEPTION_RECORD* ExceptionRecord, const char **msg)
}
}
@@ -40,7 +43,7 @@ index 0d04b50..3c3d4a2 100644
EXCEPTION_DISPOSITION
__gnat_SEH_error_handler (struct _EXCEPTION_RECORD* ExceptionRecord,
-@@ -189,7 +190,7 @@ __gnat_SEH_error_handler (struct _EXCEPTION_RECORD* ExceptionRecord,
+@@ -192,7 +196,7 @@ __gnat_SEH_error_handler (struct _EXCEPTION_RECORD* ExceptionRecord,
msg = "unhandled signal";
}
@@ -49,7 +52,7 @@ index 0d04b50..3c3d4a2 100644
/* This call is important as it avoids locking the second time we catch a
signal. Note that this routine is documented as internal to Windows and
should not be used. */
-@@ -200,9 +201,9 @@ __gnat_SEH_error_handler (struct _EXCEPTION_RECORD* ExceptionRecord,
+@@ -203,9 +207,9 @@ __gnat_SEH_error_handler (struct _EXCEPTION_RECORD* ExceptionRecord,
Raise_From_Signal_Handler (exception, msg);
}
@@ -61,7 +64,7 @@ index 0d04b50..3c3d4a2 100644
/* On x86_64 windows exception mechanism is no more based on a chained list
of handlers addresses on the stack. Instead unwinding information is used
to retrieve the exception handler (similar to ZCX GCC mechanism). So in
-@@ -255,7 +256,7 @@ void __gnat_install_SEH_handler (void *eh ATTRIBUTE_UNUSED)
+@@ -258,7 +262,7 @@ void __gnat_install_SEH_handler (void *eh ATTRIBUTE_UNUSED)
just above. */
}
@@ -70,7 +73,7 @@ index 0d04b50..3c3d4a2 100644
/* Install the Win32 SEH exception handler. Note that the caller must have
allocated 8 bytes on the stack and pass the pointer to this stack
space. This is needed as the SEH exception handler must be on the stack of
-@@ -288,7 +289,7 @@ __gnat_install_SEH_handler (void *ER)
+@@ -291,7 +295,7 @@ __gnat_install_SEH_handler (void *ER)
}
#endif
@@ -284,18 +287,18 @@ index 0000000..9305ec1
+
+end System;
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
-index 4efb75e..1964c4f 100644
+index 1e53ab5..2096f1a 100644
--- a/gcc/ada/tracebak.c
+++ b/gcc/ada/tracebak.c
-@@ -107,7 +107,7 @@ extern void (*Unlock_Task) (void);
-
- #include "tb-ivms.c"
+@@ -95,7 +95,7 @@ extern void (*Unlock_Task) (void);
+ *-- Target specific implementations --*
+ *-------------------------------------*/
--#elif defined (_WIN64) && defined (__SEH__)
-+#elif (defined (_WIN64) || defined(__CYGWIN__)) && defined (__SEH__)
+-#if defined (_WIN64) && defined (__SEH__)
++#if (defined (_WIN64) || defined(__CYGWIN__)) && defined (__SEH__)
#include <windows.h>
--
-2.1.1
+2.4.5
diff --git a/0014-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch b/0014-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch
deleted file mode 100644
index 3cdeefc..0000000
--- a/0014-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From dc7a7ec03f889efe7fc10a3071c20527272f7564 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sat, 28 Jun 2014 09:44:48 +0800
-Subject: [PATCH 14/24] add dummy -pthread, -tsaware and --large-address-aware
- for executables only
-
----
- gcc/config.gcc | 4 ++--
- gcc/config/i386/cygwin.h | 6 +++++-
- gcc/config/i386/cygwin-w64.h | 4 +++-
- gcc/config/i386/cygwin.opt | 28 ++++++++++++++++++++++++++++
- 4 files changed, 38 insertions(+), 4 deletions(-)
- create mode 100644 gcc/config/i386/cygwin.opt
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
---- a/gcc/config.gcc 2015-02-16 15:56:43.460029500 -0600
-+++ b/gcc/config.gcc 2015-02-16 15:57:04.754233500 -0600
-@@ -1586,7 +1586,7 @@
- xm_file=i386/xm-cygwin.h
- tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
- target_gtfiles="\$(srcdir)/config/i386/winnt.c"
-- extra_options="${extra_options} i386/cygming.opt"
-+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
- extra_objs="winnt.o winnt-stubs.o"
- c_target_objs="${c_target_objs} msformat-c.o"
- cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
-@@ -1602,7 +1602,7 @@
- xm_file=i386/xm-cygwin.h
- tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
- target_gtfiles="\$(srcdir)/config/i386/winnt.c"
-- extra_options="${extra_options} i386/cygming.opt"
-+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
- extra_objs="winnt.o winnt-stubs.o"
- c_target_objs="${c_target_objs} msformat-c.o"
- cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
-diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
-index 145e3cc..4e15ab0 100644
---- a/gcc/config/i386/cygwin.h
-+++ b/gcc/config/i386/cygwin.h
-@@ -77,12 +77,14 @@ along with GCC; see the file COPYING3. If not see
- #undef LIB_SPEC
- #define LIB_SPEC "\
- %{pg:-lgmon} \
-+ %{pthread: } \
- -lcygwin \
- %{mwindows:-lgdi32 -lcomdlg32} \
- -ladvapi32 -lshell32 -luser32 -lkernel32"
-
- /* To implement C++ function replacement we always wrap the cxx
- malloc-like operators. See N2800 #17.6.4.6 [replacement.functions] */
-+#undef CXX_WRAP_SPEC_LIST
- #define CXX_WRAP_SPEC_LIST " \
- --wrap _Znwj \
- --wrap _Znaj \
-@@ -120,7 +122,9 @@ along with GCC; see the file COPYING3. If not see
- %{shared: --shared} %{mdll:--dll} \
- %{static:-Bstatic} %{!static:-Bdynamic} \
- %{shared|mdll: --enable-auto-image-base -e __cygwin_dll_entry@12} \
-- --dll-search-prefix=cyg -tsaware"
-+ --dll-search-prefix=cyg \
-+ %{rdynamic: --export-all-symbols} \
-+ %{!shared: %{!mdll: --large-address-aware --tsaware}}"
-
- /* Binutils does not handle weak symbols from dlls correctly. For now,
- do not use them unnecessarily in gthr-posix.h. */
-diff --git a/gcc/config/i386/cygwin-w64.h b/gcc/config/i386/cygwin-w64.h
---- a/gcc/config/i386/cygwin-w64.h 2014-01-02 16:23:26.000000000 -0600
-+++ b/gcc/config/i386/cygwin-w64.h 2015-02-22 11:46:46.871384100 -0600
-@@ -66,7 +66,9 @@ along with GCC; see the file COPYING3.
- %{static:-Bstatic} %{!static:-Bdynamic} \
- %{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \
- %(shared_libgcc_undefs) \
-- --dll-search-prefix=cyg -tsaware"
-+ --dll-search-prefix=cyg \
-+ %{rdynamic: --export-all-symbols} \
-+ %{!shared: %{!mdll: %{" SPEC_32 ":--large-address-aware} --tsaware}}"
-
- /* Cygwin64 will have a 64-bit long type. */
- #undef LONG_TYPE_SIZE
-diff --git a/gcc/config/i386/cygwin.opt b/gcc/config/i386/cygwin.opt
-new file mode 100644
-index 0000000..93458f0
---- /dev/null
-+++ b/gcc/config/i386/cygwin.opt
-@@ -0,0 +1,28 @@
-+; Cygwin-specific options.
-+
-+; Copyright (C) 2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
-+;
-+; This file is part of GCC.
-+;
-+; GCC is free software; you can redistribute it and/or modify it under
-+; the terms of the GNU General Public License as published by the Free
-+; Software Foundation; either version 3, or (at your option) any later
-+; version.
-+;
-+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+; for more details.
-+;
-+; You should have received a copy of the GNU General Public License
-+; along with GCC; see the file COPYING3. If not see
-+; <http://www.gnu.org/licenses/>.
-+
-+pthread
-+Driver
-+
-+rdynamic
-+Driver
-+
-+; Retain blank line above
-+
---
-2.1.1
diff --git a/0018-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENABLE-for.patch b/0015-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENABLE-for.patch
index 65445ac..a8fc3df 100644
--- a/0018-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENABLE-for.patch
+++ b/0015-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENABLE-for.patch
@@ -1,31 +1,31 @@
-From 1c62a1c941ba6c700d8a01f3797946e629cdc340 Mon Sep 17 00:00:00 2001
+From c7bb06877773f0a0c3b1192c68e726b7f61191f3 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 10:05:50 +0800
-Subject: [PATCH 18/24] define RTS_CONTROL_ENABLE and DTR_CONTROL_ENABLE for
+Subject: [PATCH 15/21] define RTS_CONTROL_ENABLE and DTR_CONTROL_ENABLE for
Cygwin
+Conflicts:
+ gcc/ada/s-oscons-tmplt.c
---
- gcc/ada/s-oscons-tmplt.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
+ 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 5a034d5..6f678bd 100644
+index 56da9f8..de6d3cd 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
-@@ -986,7 +986,12 @@ CND(VEOL2, "Alternative EOL")
+@@ -1001,6 +1001,11 @@ CND(VEOL2, "Alternative EOL")
#endif /* HAVE_TERMIOS */
--#ifdef __MINGW32__
-+#ifdef __CYGWIN__
++#if defined(__CYGWIN__)
+#define RTS_CONTROL_ENABLE 0x1
+#define DTR_CONTROL_ENABLE 0x1
+#endif
+
-+#if defined (__CYGWIN__) || defined (__MINGW32__)
+ #if defined(__MINGW32__) || defined(__CYGWIN__)
CNU(DTR_CONTROL_ENABLE, "Enable DTR flow ctrl")
CNU(RTS_CONTROL_ENABLE, "Enable RTS flow ctrl")
- #endif
--
-2.1.1
+2.4.5
diff --git a/0019-fix-some-implicit-declaration-warnings.patch b/0016-fix-some-implicit-declaration-warnings.patch
index 678fdc6..0c0b4a2 100644
--- a/0019-fix-some-implicit-declaration-warnings.patch
+++ b/0016-fix-some-implicit-declaration-warnings.patch
@@ -1,7 +1,7 @@
-From 9d2689cee7e62d9f996d4cfdbb1dcb728455702a Mon Sep 17 00:00:00 2001
+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 19/24] fix some implicit declaration warnings
+Subject: [PATCH 16/21] fix some implicit declaration warnings
---
libiberty/aclocal.m4 | 6 +++++-
@@ -33,10 +33,10 @@ index bf8a907..6b5e66c 100644
static char *addr = 0;
auto char dummy;
diff --git a/libiberty/configure b/libiberty/configure
-index 7bde9b3..1b9f1ec 100755
+index da2df4e..f8bb482 100755
--- a/libiberty/configure
+++ b/libiberty/configure
-@@ -6077,6 +6077,7 @@ else
+@@ -6390,6 +6390,7 @@ else
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -44,7 +44,7 @@ index 7bde9b3..1b9f1ec 100755
find_stack_direction ()
{
static char *addr = 0;
-@@ -6846,6 +6847,8 @@ else
+@@ -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>
@@ -54,5 +54,5 @@ index 7bde9b3..1b9f1ec 100755
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
--
-2.1.1
+2.4.5
diff --git a/0017-__cxa-atexit-for-Cygwin.patch b/0017-__cxa-atexit-for-Cygwin.patch
new file mode 100644
index 0000000..c0a740e
--- /dev/null
+++ b/0017-__cxa-atexit-for-Cygwin.patch
@@ -0,0 +1,49 @@
+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
+
+---
+ 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 75807f5..aa5c032 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1655,6 +1655,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
+@@ -1964,6 +1965,7 @@ mep-*-*)
+ with_headers=yes
+ fi
+ use_gcc_stdint=wrap
++ default_use_cxa_atexit=yes
+ ;;
+ microblaze*-linux*)
+ case $target in
+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/0018-prevent-modules-from-being-unloaded-before-their-dto.patch b/0018-prevent-modules-from-being-unloaded-before-their-dto.patch
new file mode 100644
index 0000000..898d023
--- /dev/null
+++ b/0018-prevent-modules-from-being-unloaded-before-their-dto.patch
@@ -0,0 +1,27 @@
+From c1d40554910707ad87f9bcef43b537b5d6ca2f78 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Fri, 31 Oct 2014 06:46:02 +0800
+Subject: [PATCH 18/21] prevent modules from being unloaded before their dtors
+ are called
+
+---
+ libstdc++-v3/config/os/mingw32-w64/os_defines.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libstdc++-v3/config/os/mingw32-w64/os_defines.h b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
+index 976355c..b1d048d 100644
+--- a/libstdc++-v3/config/os/mingw32-w64/os_defines.h
++++ b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
+@@ -86,4 +86,9 @@
+ // See libstdc++/59807
+ #define _GTHREAD_USE_MUTEX_INIT_FUNC 1
+
++// Enable use of GetModuleHandleEx (requires Windows XP/2003) in
++// __cxa_thread_atexit to prevent modules from being unloaded before
++// their dtors are called
++#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
++
+ #endif
+--
+2.4.5
+
diff --git a/0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch b/0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
new file mode 100644
index 0000000..0b63c22
--- /dev/null
+++ b/0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
@@ -0,0 +1,37 @@
+From 418028350ff9fc086f45e628423f7d0519ad6b60 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Wed, 16 Sep 2015 06:57:22 +0800
+Subject: [PATCH 19/21] Cygwin doesn't do text mode translations for file
+ handles
+
+Remove UTF-16/UTF-8 mode translations.
+---
+ gcc/ada/sysdep.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c
+index 01dae2b..fd4abbb 100644
+--- a/gcc/ada/sysdep.c
++++ b/gcc/ada/sysdep.c
+@@ -163,12 +163,16 @@ __gnat_set_mode (int handle, int mode)
+ U16text = 5 */
+
+ switch (mode) {
+- case 0 : WIN_SETMODE (handle, _O_BINARY); break;
++ case 0 : WIN_SETMODE (handle, O_BINARY); break;
+ case 1 : WIN_SETMODE (handle, CurrentCCSEncoding); break;
+- case 2 : WIN_SETMODE (handle, _O_TEXT); break;
++ case 2 : WIN_SETMODE (handle, O_TEXT); break;
++#if defined (__CYGWIN__)
++ default: WIN_SETMODE (handle, O_BINARY); break;
++#else
+ case 3 : WIN_SETMODE (handle, _O_U8TEXT); break;
+ case 4 : WIN_SETMODE (handle, _O_WTEXT); break;
+ case 5 : WIN_SETMODE (handle, _O_U16TEXT); break;
++#endif
+ }
+ }
+
+--
+2.4.5
+
diff --git a/0020-fix-gnat-DLL-prefix-for-Cygwin.patch b/0020-cygwin-uses-cyg-lib-prefix.patch
index 3545efb..62bcd84 100644
--- a/0020-fix-gnat-DLL-prefix-for-Cygwin.patch
+++ b/0020-cygwin-uses-cyg-lib-prefix.patch
@@ -1,187 +1,184 @@
-From 0b06ec18e73dff59d5c5f84b27aa5a09e8b0914b Mon Sep 17 00:00:00 2001
+From f15f1f7dacc3c41265ff4a89b44ef96cf87f09d2 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
-Date: Sat, 28 Jun 2014 10:16:07 +0800
-Subject: [PATCH 20/24] fix gnat DLL prefix for Cygwin
+Date: Sat, 19 Sep 2015 14:28:13 +0800
+Subject: [PATCH 20/21] cygwin uses cyg lib prefix
---
- gcc/ada/gcc-interface/Makefile.in | 100 ++++++++++++++++++++------------------
- 1 file changed, 52 insertions(+), 48 deletions(-)
+ gcc/ada/gcc-interface/Makefile.in | 82 ++++++++++++++++++++-------------------
+ 1 file changed, 43 insertions(+), 39 deletions(-)
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
-index e2cc4a9..6deebdf 100644
+index 1d03f86..048a87d 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
-@@ -124,12 +124,13 @@ GMEM_LIB =
- MISCLIB =
- OUTPUT_OPTION = -o $@
-
--objext = .o
--exeext =
--arext = .a
--soext = .so
--shext =
--hyphen = -
-+objext = .o
-+exeext =
-+arext = .a
-+soext = .so
-+shext =
-+hyphen = -
+@@ -131,6 +131,7 @@ arext = .a
+ soext = .so
+ shext =
+ hyphen = -
+soprefix = lib
# Define this as & to perform parallel make on a Sequent.
# Note that this has some bugs, and it seems currently necessary
-@@ -1771,6 +1772,9 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
+@@ -388,7 +389,7 @@ EH_MECHANISM=
+
+ # Default shared object option. Note that we rely on the fact that the "soname"
+ # option will always be present and last in this flag, so that we can have
+-# $(SO_OPTS)libgnat-x.xx
++# $(SO_OPTS)$(soprefix)gnat-x.xx
+
+ SO_OPTS = -Wl,-soname,
+
+@@ -1766,6 +1767,9 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
+ GMEM_LIB = gmemlib
+ EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
- soext = .dll
- LIBRARY_VERSION := $(LIB_VERSION)
+ ifeq ($(strip $(filter-out cygwin%,$(target_os))),)
-+ soprefix = cyg
++ soprefix = cyg
+ endif
+ soext = .dll
+ LIBRARY_VERSION := $(LIB_VERSION)
endif
-
- # Mips Linux
-@@ -2675,16 +2679,16 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
+@@ -2667,16 +2671,16 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs
# Also install the .dSYM directories if they exist (these directories
# contain the debug information for the shared libraries on darwin)
for file in gnat gnarl; do \
- if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
- $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ if [ -f $(RTSDIR)/cyg$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
-+ $(INSTALL) $(RTSDIR)/${soprefix}$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ if [ -f $(RTSDIR)/$(soprefix)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
++ $(INSTALL) $(RTSDIR)/$(soprefix)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(DESTDIR)$(ADA_RTL_OBJ_DIR); \
fi; \
- if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
- $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
- $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
-+ if [ -f $(RTSDIR)/${soprefix}$${file}$(soext) ]; then \
-+ $(LN_S) ${soprefix}$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ $(DESTDIR)$(ADA_RTL_OBJ_DIR)/${soprefix}$${file}$(soext); \
++ if [ -f $(RTSDIR)/$(soprefix)$${file}$(soext) ]; then \
++ $(LN_S) $(soprefix)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$(soprefix)$${file}$(soext); \
fi; \
- if [ -d $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM ]; then \
- $(CP) -r $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \
-+ if [ -d $(RTSDIR)/${soprefix}$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM ]; then \
-+ $(CP) -r $(RTSDIR)/${soprefix}$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \
++ if [ -d $(RTSDIR)/$(soprefix)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM ]; then \
++ $(CP) -r $(RTSDIR)/$(soprefix)$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \
$(DESTDIR)$(ADA_RTL_OBJ_DIR); \
fi; \
done
-@@ -2816,25 +2820,25 @@ gnatlib-shared-default:
+@@ -2809,25 +2813,25 @@ gnatlib-shared-default:
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \
gnatlib
- $(RM) $(RTSDIR)/libgna*$(soext)
-+ $(RM) $(RTSDIR)/${soprefix}gna*$(soext)
++ $(RM) $(RTSDIR)/$(soprefix)gna*$(soext)
cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
| sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \
$(PICFLAG_FOR_TARGET) \
- -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ -o ${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ -o $(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
- $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ $(SO_OPTS)${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ $(SO_OPTS)$(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(MISCLIB) -lm
cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
| sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \
$(PICFLAG_FOR_TARGET) \
- -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ -o ${soprefix}gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ -o $(soprefix)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \
- $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ $(SO_OPTS)cyggnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ $(SO_OPTS)$(soprefix)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(THREADSLIB)
- cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
- libgnat$(soext)
- cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
- libgnarl$(soext)
-+ cd $(RTSDIR); $(LN_S) ${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ ${soprefix}gnat$(soext)
-+ cd $(RTSDIR); $(LN_S) cyggnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ ${soprefix}gnarl$(soext)
++ cd $(RTSDIR); $(LN_S) $(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ $(soprefix)gnat$(soext)
++ cd $(RTSDIR); $(LN_S) $(soprefix)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ $(soprefix)gnarl$(soext)
gnatlib-shared-dual:
$(MAKE) $(FLAGS_TO_PASS) \
-@@ -2844,7 +2848,7 @@ gnatlib-shared-dual:
+@@ -2837,7 +2841,7 @@ gnatlib-shared-dual:
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \
gnatlib-shared-default
- $(MV) $(RTSDIR)/libgna*$(soext) .
-+ $(MV) $(RTSDIR)/${soprefix}gna*$(soext) .
++ $(MV) $(RTSDIR)/$(soprefix)gna*$(soext) .
$(RM) ../stamp-gnatlib2-$(RTSDIR)
$(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \
-@@ -2853,7 +2857,7 @@ gnatlib-shared-dual:
+@@ -2846,7 +2850,7 @@ gnatlib-shared-dual:
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \
gnatlib
- $(MV) libgna*$(soext) $(RTSDIR)
-+ $(MV) ${soprefix}gna*$(soext) $(RTSDIR)
++ $(MV) $(soprefix)gna*$(soext) $(RTSDIR)
gnatlib-shared-dual-win32:
$(MAKE) $(FLAGS_TO_PASS) \
-@@ -2864,7 +2868,7 @@ gnatlib-shared-dual-win32:
+@@ -2857,7 +2861,7 @@ gnatlib-shared-dual-win32:
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \
gnatlib-shared-win32
- $(MV) $(RTSDIR)/libgna*$(soext) .
-+ $(MV) $(RTSDIR)/${soprefix}gna*$(soext) .
++ $(MV) $(RTSDIR)/$(soprefix)gna*$(soext) .
$(RM) ../stamp-gnatlib2-$(RTSDIR)
$(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \
-@@ -2873,7 +2877,7 @@ gnatlib-shared-dual-win32:
+@@ -2866,7 +2870,7 @@ gnatlib-shared-dual-win32:
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \
gnatlib
- $(MV) libgna*$(soext) $(RTSDIR)
-+ $(MV) ${soprefix}gna*$(soext) $(RTSDIR)
++ $(MV) $(soprefix)gna*$(soext) $(RTSDIR)
# ??? we need to add the option to support auto-import of arrays/records to
# the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
-@@ -2887,20 +2891,20 @@ gnatlib-shared-win32:
+@@ -2880,20 +2884,20 @@ gnatlib-shared-win32:
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \
gnatlib
- $(RM) $(RTSDIR)/libgna*$(soext)
-+ $(RM) $(RTSDIR)/${soprefix}gna*$(soext)
++ $(RM) $(RTSDIR)/$(soprefix)gna*$(soext)
cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
| sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \
$(PICFLAG_FOR_TARGET) \
- -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ -o ${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ -o $(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
- $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
-+ $(SO_OPTS)${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
++ $(SO_OPTS)$(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
| sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \
$(PICFLAG_FOR_TARGET) \
- -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ -o ${soprefix}gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ -o $(soprefix)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \
- $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
- $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
-+ $(SO_OPTS)${soprefix}gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ $(THREADSLIB) -Wl,${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext)
++ $(SO_OPTS)$(soprefix)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ $(THREADSLIB) -Wl,$(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext)
gnatlib-shared-darwin:
$(MAKE) $(FLAGS_TO_PASS) \
-@@ -2910,27 +2914,27 @@ gnatlib-shared-darwin:
+@@ -2903,27 +2907,27 @@ gnatlib-shared-darwin:
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \
gnatlib
- $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
-+ $(RM) $(RTSDIR)/${soprefix}gnat$(soext) $(RTSDIR)/${soprefix}gnarl$(soext)
++ $(RM) $(RTSDIR)/$(soprefix)gnat$(soext) $(RTSDIR)/$(soprefix)gnarl$(soext)
cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
| sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \
- -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ -o ${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ -o $(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
$(SO_OPTS) \
- -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ -Wl,-install_name,@rpath/${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ -Wl,-install_name,@rpath/$(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(MISCLIB)
cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
| sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \
- -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ -o ${soprefix}gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ -o $(soprefix)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \
$(SO_OPTS) \
- -Wl,-install_name,@rpath/libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
@@ -192,43 +189,17 @@ index e2cc4a9..6deebdf 100644
- libgnarl$(soext)
- cd $(RTSDIR); dsymutil libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
- cd $(RTSDIR); dsymutil libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext)
-+ -Wl,-install_name,@rpath/${soprefix}gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ $(THREADSLIB) -Wl,${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext)
-+ cd $(RTSDIR); $(LN_S) ${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ ${soprefix}gnat$(soext)
-+ cd $(RTSDIR); $(LN_S) ${soprefix}gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ ${soprefix}gnarl$(soext)
-+ cd $(RTSDIR); dsymutil ${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext)
-+ cd $(RTSDIR); dsymutil ${soprefix}gnarl$(hyphen)$(LIBRARY_VERSION)$(soext)
++ -Wl,-install_name,@rpath/$(soprefix)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ $(THREADSLIB) -Wl,$(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext)
++ cd $(RTSDIR); $(LN_S) $(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ $(soprefix)gnat$(soext)
++ cd $(RTSDIR); $(LN_S) $(soprefix)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
++ $(soprefix)gnarl$(soext)
++ cd $(RTSDIR); dsymutil $(soprefix)gnat$(hyphen)$(LIBRARY_VERSION)$(soext)
++ cd $(RTSDIR); dsymutil $(soprefix)gnarl$(hyphen)$(LIBRARY_VERSION)$(soext)
- gnatlib-shared-vms:
+ gnatlib-shared:
$(MAKE) $(FLAGS_TO_PASS) \
-@@ -2940,12 +2944,12 @@ gnatlib-shared-vms:
- MULTISUBDIR="$(MULTISUBDIR)" \
- THREAD_KIND="$(THREAD_KIND)" \
- gnatlib
-- $(RM) $(RTSDIR)/libgna*$(soext)
-+ $(RM) $(RTSDIR)/${soprefix}gna*$(soext)
- cd $(RTSDIR) && \
- ../../gnatsym -s SYMVEC_$$$$.opt \
- $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
- ../../xgcc -g -B../../ -shared -shared-libgcc \
-- -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
-+ -o ${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) libgnat.a \
- sys\$$library:trace.exe \
- --for-linker=/noinform \
- --for-linker=SYMVEC_$$$$.opt \
-@@ -2954,8 +2958,8 @@ gnatlib-shared-vms:
- ../../gnatsym -s SYMVEC_$$$$.opt \
- $(GNATRTL_TASKING_OBJS) && \
- ../../xgcc -g -B../../ -shared -shared-libgcc \
-- -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-- libgnarl.a libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ -o ${soprefix}gnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-+ libgnarl.a ${soprefix}gnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
- sys\$$library:trace.exe \
- --for-linker=/noinform \
- --for-linker=SYMVEC_$$$$.opt \
--
-2.1.1
+2.4.5
diff --git a/0021-__cxa-atexit-for-Cygwin.patch b/0021-__cxa-atexit-for-Cygwin.patch
deleted file mode 100644
index 58a58f8..0000000
--- a/0021-__cxa-atexit-for-Cygwin.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 4250ae25a96ddf8c48b978e1c4427d19c7279908 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Thu, 30 Oct 2014 17:15:02 +0800
-Subject: [PATCH 21/24] __cxa-atexit for Cygwin
-
-Using __cxa_atexit(__gcc_deregister_frame, NULL, __dso_handle)
-instead of atexit(__gcc_deregister_frame) directly to prevent an
-optimization bug.
----
- gcc/config.gcc | 2 ++
- gcc/config/i386/cygwin.h | 2 +-
- libgcc/config.host | 4 ++--
- libgcc/config/i386/cygming-crtbegin.c | 28 ++++++++++++++++++++++++++++
- libgcc/config/i386/cygming-crtend.c | 6 ------
- libgcc/config/i386/t-cygming | 3 +++
- 6 files changed, 36 insertions(+), 9 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 90d4f71..2a432e6 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -1594,6 +1594,7 @@ i[34567]86-*-cygwin*)
- thread_file='posix'
- fi
- use_gcc_stdint=wrap
-+ default_use_cxa_atexit=yes
- ;;
- x86_64-*-cygwin*)
- need_64bit_isa=yes
-@@ -1902,6 +1903,7 @@ mep-*-*)
- with_headers=yes
- fi
- use_gcc_stdint=wrap
-+ default_use_cxa_atexit=yes
- ;;
- microblaze*-linux*)
- case $target in
-diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
-index 4e15ab0..19e6b7e 100644
---- a/gcc/config/i386/cygwin.h
-+++ b/gcc/config/i386/cygwin.h
-@@ -40,7 +40,7 @@ along with GCC; see the file COPYING3. If not see
- #define STARTFILE_SPEC "\
- %{!shared: %{!mdll: crt0%O%s \
- %{pg:gcrt0%O%s}}}\
-- crtbegin.o%s"
-+ %{shared:crtbeginS.o%s;:crtbegin.o%s}"
-
- #undef ENDFILE_SPEC
- #define ENDFILE_SPEC \
-diff --git a/libgcc/config.host b/libgcc/config.host
-index f196680..08cac3f 100644
---- a/libgcc/config.host
-+++ b/libgcc/config.host
-@@ -603,7 +603,7 @@ i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
- i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
- ;;
- i[34567]86-*-cygwin*)
-- extra_parts="crtbegin.o crtend.o crtfastmath.o"
-+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
- # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
- if test x$enable_sjlj_exceptions = xyes; then
- tmake_eh_file="i386/t-sjlj-eh"
-@@ -619,7 +619,7 @@ i[34567]86-*-cygwin*)
- tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin i386/t-crtfm i386/t-chkstk t-dfprules"
- ;;
- x86_64-*-cygwin*)
-- extra_parts="crtbegin.o crtend.o crtfastmath.o"
-+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
- # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
- if test x$enable_sjlj_exceptions = xyes; then
- tmake_eh_file="i386/t-sjlj-eh"
-diff --git a/libgcc/config/i386/cygming-crtbegin.c b/libgcc/config/i386/cygming-crtbegin.c
-index 195b463..aece23c 100644
---- a/libgcc/config/i386/cygming-crtbegin.c
-+++ b/libgcc/config/i386/cygming-crtbegin.c
-@@ -110,6 +110,23 @@ static void *__JCR_LIST__[]
- = { };
- #endif
-
-+#ifdef __CYGWIN__
-+/* Declare the __dso_handle variable. It should have a unique value
-+ in every shared-object; in a main program its value is zero. The
-+ object should in any case be protected. This means the instance
-+ in one DSO or the main program is not used in another object. The
-+ dynamic linker takes care of this. */
-+
-+#ifdef CRTSTUFFS_O
-+extern void *__ImageBase;
-+void *__dso_handle = &__ImageBase;
-+#else
-+void *__dso_handle = 0;
-+#endif
-+
-+#endif /* __CYGWIN__ */
-+
-+
- /* Pull in references from libgcc.a(unwind-dw2-fde.o) in the
- startfile. These are referenced by a ctor and dtor in crtend.o. */
- extern void __gcc_register_frame (void);
-@@ -155,6 +172,17 @@ __gcc_register_frame (void)
- register_class_fn (__JCR_LIST__);
- }
- #endif
-+
-+#if DEFAULT_USE_CXA_ATEXIT
-+ /* 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 */
- }
-
- void
-diff --git a/libgcc/config/i386/cygming-crtend.c b/libgcc/config/i386/cygming-crtend.c
-index de0d61f..d3beaf9 100644
---- a/libgcc/config/i386/cygming-crtend.c
-+++ b/libgcc/config/i386/cygming-crtend.c
-@@ -70,12 +70,6 @@ static void
- register_frame_ctor (void)
- {
- __gcc_register_frame ();
--#if DEFAULT_USE_CXA_ATEXIT
-- /* If we use the __cxa_atexit method to register C++ dtors
-- at object construction, also use atexit to register eh frame
-- info cleanup. */
-- atexit (__gcc_deregister_frame);
--#endif
- }
-
- #if !DEFAULT_USE_CXA_ATEXIT
-diff --git a/libgcc/config/i386/t-cygming b/libgcc/config/i386/t-cygming
-index d76004c..4713b7f 100644
---- a/libgcc/config/i386/t-cygming
-+++ b/libgcc/config/i386/t-cygming
-@@ -8,6 +8,9 @@ CUSTOM_CRTSTUFF = yes
- crtbegin.o: $(srcdir)/config/i386/cygming-crtbegin.c
- $(crt_compile) -fno-omit-frame-pointer -c $<
-
-+crtbeginS.o: $(srcdir)/config/i386/cygming-crtbegin.c
-+ $(crt_compile) -fno-omit-frame-pointer -c $< -DCRTSTUFFS_O
-+
- # We intentionally use a implementation-reserved init priority of 0,
- # so allow the warning.
- crtend.o: $(srcdir)/config/i386/cygming-crtend.c
---
-2.1.1
-
diff --git a/0021-search-usr-lib-w32api-explicitly.patch b/0021-search-usr-lib-w32api-explicitly.patch
new file mode 100644
index 0000000..33df116
--- /dev/null
+++ b/0021-search-usr-lib-w32api-explicitly.patch
@@ -0,0 +1,24 @@
+From cc937b29a9b772240a9cfbb41428a08db66a91af Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Sat, 19 Sep 2015 15:41:44 +0800
+Subject: [PATCH 21/21] search /usr/lib/w32api explicitly
+
+---
+ gcc/config/i386/cygwin.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
+index 2a2a0bf..fd3bc0a 100644
+--- a/gcc/config/i386/cygwin.h
++++ b/gcc/config/i386/cygwin.h
+@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see
+
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC "\
++ -L%R/usr/lib/w32api \
+ %{!shared: %{!mdll: crt0%O%s \
+ %{pg:gcrt0%O%s}}}\
+ %{shared:crtbeginS.o%s;:crtbegin.o%s} \
+--
+2.4.5
+
diff --git a/0022-libgomp-soname-cygwin-mingw.patch b/0022-libgomp-soname-cygwin-mingw.patch
new file mode 100644
index 0000000..45f4e0f
--- /dev/null
+++ b/0022-libgomp-soname-cygwin-mingw.patch
@@ -0,0 +1,53 @@
+--- 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/0022-prevent-modules-from-being-unloaded-before-their-dto.patch b/0022-prevent-modules-from-being-unloaded-before-their-dto.patch
deleted file mode 100644
index 950a26c..0000000
--- a/0022-prevent-modules-from-being-unloaded-before-their-dto.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 4f45f5abe77525389e0a4d9885c5bf63e2f54bc8 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Fri, 31 Oct 2014 06:46:02 +0800
-Subject: [PATCH 22/24] prevent modules from being unloaded before their dtors
- are called
-
----
- libstdc++-v3/config/os/mingw32-w64/os_defines.h | 5 +++++
- libstdc++-v3/config/os/newlib/os_defines.h | 6 ++++++
- libstdc++-v3/libsupc++/atexit_thread.cc | 20 ++++++++++++++++++++
- 3 files changed, 31 insertions(+)
-
-diff --git a/libstdc++-v3/config/os/mingw32-w64/os_defines.h b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
-index fd5ad9e..41d59be 100644
---- a/libstdc++-v3/config/os/mingw32-w64/os_defines.h
-+++ b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
-@@ -81,4 +81,9 @@
- // See libstdc++/59807
- #define _GTHREAD_USE_MUTEX_INIT_FUNC 1
-
-+// Enable use of GetModuleHandleEx (requires Windows XP/2003) in
-+// __cxa_thread_atexit to prevent modules from being unloaded before
-+// their dtors are called
-+#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
-+
- #endif
-diff --git a/libstdc++-v3/config/os/newlib/os_defines.h b/libstdc++-v3/config/os/newlib/os_defines.h
-index 92748da..2e01d3b 100644
---- a/libstdc++-v3/config/os/newlib/os_defines.h
-+++ b/libstdc++-v3/config/os/newlib/os_defines.h
-@@ -47,6 +47,12 @@
-
- // See libstdc++/20806.
- #define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1
-+
-+// Enable use of GetModuleHandleEx (requires Windows XP/2003) in
-+// __cxa_thread_atexit to prevent modules from being unloaded before
-+// their dtors are called
-+#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
-+
- #endif
-
- #endif
-diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc
-index dff08e9..d7d84d2 100644
---- a/libstdc++-v3/libsupc++/atexit_thread.cc
-+++ b/libstdc++-v3/libsupc++/atexit_thread.cc
-@@ -25,6 +25,10 @@
- #include <cstdlib>
- #include <new>
- #include "bits/gthr.h"
-+#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
-+#define WIN32_LEAN_AND_MEAN
-+#include <windows.h>
-+#endif
-
- #if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
-
-@@ -47,6 +51,9 @@ namespace {
- void (*destructor)(void *);
- void *object;
- elt *next;
-+#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
-+ HMODULE dll;
-+#endif
- };
-
- // Keep a per-thread list of cleanups in gthread_key storage.
-@@ -62,6 +69,11 @@ namespace {
- {
- elt *old_e = e;
- e->destructor (e->object);
-+#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
-+ /* Decrement DLL count */
-+ if (e->dll)
-+ FreeLibrary (e->dll);
-+#endif
- e = e->next;
- delete (old_e);
- }
-@@ -133,6 +145,14 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha
- new_elt->destructor = dtor;
- new_elt->object = obj;
- new_elt->next = first;
-+#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
-+ /* Store the DLL address for a later call to FreeLibrary in new_elt and
-+ increment DLL load count. This blocks the unloading of the DLL
-+ before the thread-local dtors have been called. This does NOT help
-+ if FreeLibrary/dlclose is called in excess. */
-+ GetModuleHandleExW (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
-+ (LPCWSTR) dtor, &new_elt->dll);
-+#endif
-
- if (__gthread_active_p ())
- __gthread_setspecific (key, new_elt);
---
-2.1.1
-
diff --git a/0023-Attempt-to-fix-dw2-unwinder-for-Cygwin.patch b/0023-Attempt-to-fix-dw2-unwinder-for-Cygwin.patch
deleted file mode 100644
index 2c1952b..0000000
--- a/0023-Attempt-to-fix-dw2-unwinder-for-Cygwin.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 3d30fe549f54d5399a41ead2fd2c8c5d5ed56b85 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Sat, 8 Nov 2014 14:29:45 +0800
-Subject: [PATCH 23/24] Attempt to fix dw2 unwinder for Cygwin
-
----
- libgcc/config/i386/cygming-crtbegin.c | 23 ++++++++---------------
- 1 file changed, 8 insertions(+), 15 deletions(-)
-
-diff --git a/libgcc/config/i386/cygming-crtbegin.c b/libgcc/config/i386/cygming-crtbegin.c
-index aece23c..3651afa 100644
---- a/libgcc/config/i386/cygming-crtbegin.c
-+++ b/libgcc/config/i386/cygming-crtbegin.c
-@@ -100,8 +100,7 @@ static EH_FRAME_SECTION_CONST char __EH_FRAME_BEGIN__[]
-
- static struct object obj;
-
--/* Handle of libgcc's DLL reference. */
--HANDLE hmod_libgcc;
-+static void * (*deregister_frame_fn) (const void *) = NULL;
- #endif
-
- #if TARGET_USE_JCR_SECTION
-@@ -146,13 +145,16 @@ __gcc_register_frame (void)
-
- if (h)
- {
-- /* Increasing the load-count of LIBGCC_SONAME DLL. */
-- hmod_libgcc = LoadLibrary (LIBGCC_SONAME);
- register_frame_fn = (void (*) (const void *, struct object *))
- GetProcAddress (h, "__register_frame_info");
-+ deregister_frame_fn = (void* (*) (const void *))
-+ GetProcAddress (h, "__deregister_frame_info");
-+ }
-+ else
-+ {
-+ register_frame_fn = __register_frame_info;
-+ deregister_frame_fn = __deregister_frame_info;
- }
-- else
-- register_frame_fn = __register_frame_info;
- if (register_frame_fn)
- register_frame_fn (__EH_FRAME_BEGIN__, &obj);
- #endif
-@@ -189,16 +191,7 @@ void
- __gcc_deregister_frame (void)
- {
- #if DWARF2_UNWIND_INFO
-- void * (*deregister_frame_fn) (const void *);
-- HANDLE h = GetModuleHandle (LIBGCC_SONAME);
-- if (h)
-- deregister_frame_fn = (void* (*) (const void *))
-- GetProcAddress (h, "__deregister_frame_info");
-- else
-- deregister_frame_fn = __deregister_frame_info;
- if (deregister_frame_fn)
- deregister_frame_fn (__EH_FRAME_BEGIN__);
-- if (hmod_libgcc)
-- FreeLibrary (hmod_libgcc);
- #endif
- }
---
-2.1.1
-
diff --git a/0023-glibcxx-use-c99.patch b/0023-glibcxx-use-c99.patch
new file mode 100644
index 0000000..3c546e0
--- /dev/null
+++ b/0023-glibcxx-use-c99.patch
@@ -0,0 +1,85 @@
+--- 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/0024-Restore-compile-mode-pthread.patch b/0024-Restore-compile-mode-pthread.patch
deleted file mode 100644
index 9a65b64..0000000
--- a/0024-Restore-compile-mode-pthread.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 21a2eef50ded41f94e82004c7da113c3b1314fb0 Mon Sep 17 00:00:00 2001
-From: Jonathan Yong <10walls@gmail.com>
-Date: Wed, 28 Jan 2015 06:30:37 +0800
-Subject: [PATCH 24/24] Restore compile mode -pthread
-
-This feature was accidentally dropped from 4.8, currently does
-not do anything.
----
- gcc/config/i386/cygwin.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
-index 19e6b7e..f8cbe4c 100644
---- a/gcc/config/i386/cygwin.h
-+++ b/gcc/config/i386/cygwin.h
-@@ -31,7 +31,7 @@ along with GCC; see the file COPYING3. If not see
-
- #undef CPP_SPEC
- #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
-- %{!ansi:-Dunix} \
-+ %{!ansi:-Dunix} %{pthread: } \
- %{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
- %{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
- "
---
-2.1.1
-
diff --git a/0024-libitm-weak-symbols.patch b/0024-libitm-weak-symbols.patch
new file mode 100644
index 0000000..87f58f3
--- /dev/null
+++ b/0024-libitm-weak-symbols.patch
@@ -0,0 +1,166 @@
+--- a/libitm/Makefile.am 2016-02-01 23:54:24.805099900 -0600
++++ b/libitm/Makefile.am 2016-02-02 00:06:11.466834500 -0600
+@@ -53,7 +53,6 @@
+ # Force link with C, not C++. For now, while we're using C++ we don't
+ # want or need libstdc++.
+ libitm_la_DEPENDENCIES = $(libitm_version_dep)
+-libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS)
+ libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
+
+ libitm_la_SOURCES = \
+--- a/libitm/Makefile.in 2016-02-01 23:54:24.813600900 -0600
++++ b/libitm/Makefile.in 2016-02-02 00:07:01.109638300 -0600
+@@ -328,7 +328,6 @@
+ # Force link with C, not C++. For now, while we're using C++ we don't
+ # want or need libstdc++.
+ libitm_la_DEPENDENCIES = $(libitm_version_dep)
+-libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS)
+ libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
+ libitm_la_SOURCES = aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc \
+ barrier.cc beginend.cc clone.cc eh_cpp.cc local.cc query.cc \
+@@ -446,7 +445,7 @@
+ rm -f "$${dir}/so_locations"; \
+ done
+ libitm.la: $(libitm_la_OBJECTS) $(libitm_la_DEPENDENCIES)
+- $(libitm_la_LINK) -rpath $(toolexeclibdir) $(libitm_la_OBJECTS) $(libitm_la_LIBADD) $(LIBS)
++ $(CXXLINK) $(libitm_la_LDFLAGS) -rpath $(toolexeclibdir) $(libitm_la_OBJECTS) $(libitm_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+--- a/libitm/alloc_cpp.cc 2015-01-05 06:33:28.000000000 -0600
++++ b/libitm/alloc_cpp.cc 2016-02-01 23:52:40.097803700 -0600
+@@ -46,21 +46,27 @@
+ /* Everything from libstdc++ is weak, to avoid requiring that library
+ to be linked into plain C applications using libitm.so. */
+
++#if defined(__CYGWIN__) && defined(PIC)
++#define WEAK
++#else
++#define WEAK __attribute__((weak))
++#endif
++
+ extern "C" {
+
+-extern void *_ZnwX (size_t) __attribute__((weak));
+-extern void _ZdlPv (void *) __attribute__((weak));
+-extern void *_ZnaX (size_t) __attribute__((weak));
+-extern void _ZdaPv (void *) __attribute__((weak));
++extern void *_ZnwX (size_t) WEAK;
++extern void _ZdlPv (void *) WEAK;
++extern void *_ZnaX (size_t) WEAK;
++extern void _ZdaPv (void *) WEAK;
+
+ typedef const struct nothrow_t { } *c_nothrow_p;
+
+-extern void *_ZnwXRKSt9nothrow_t (size_t, c_nothrow_p) __attribute__((weak));
+-extern void _ZdlPvRKSt9nothrow_t (void *, c_nothrow_p) __attribute__((weak));
+-extern void *_ZnaXRKSt9nothrow_t (size_t, c_nothrow_p) __attribute__((weak));
+-extern void _ZdaPvRKSt9nothrow_t (void *, c_nothrow_p) __attribute__((weak));
++extern void *_ZnwXRKSt9nothrow_t (size_t, c_nothrow_p) WEAK;
++extern void _ZdlPvRKSt9nothrow_t (void *, c_nothrow_p) WEAK;
++extern void *_ZnaXRKSt9nothrow_t (size_t, c_nothrow_p) WEAK;
++extern void _ZdaPvRKSt9nothrow_t (void *, c_nothrow_p) WEAK;
+
+-#if !defined (HAVE_ELF_STYLE_WEAKREF)
++#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined(PIC)
+ void *_ZnwX (size_t) { return NULL; }
+ void _ZdlPv (void *) { return; }
+ void *_ZnaX (size_t) { return NULL; }
+--- a/libitm/beginend.cc 2015-01-05 06:33:28.000000000 -0600
++++ b/libitm/beginend.cc 2016-02-01 23:52:40.106804900 -0600
+@@ -25,6 +25,24 @@
+ #include "libitm_i.h"
+ #include <pthread.h>
+
++#if defined(__CYGWIN__) && defined(PIC)
++#define WEAK
++#else
++#define WEAK __attribute__((weak))
++#endif
++
++/* Everything from libgcc_s is weak, to avoid requiring that library
++ to be linked into plain C applications using libitm.so. */
++
++extern "C" {
++
++extern void _Unwind_DeleteException (_Unwind_Exception*) WEAK;
++
++#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined(PIC)
++void _Unwind_DeleteException (_Unwind_Exception *) { return; }
++#endif /* HAVE_ELF_STYLE_WEAKREF */
++
++}
+
+ using namespace GTM;
+
+--- a/libitm/configure.tgt 2016-02-01 22:05:27.064912300 -0600
++++ b/libitm/configure.tgt 2016-02-01 22:10:06.233362200 -0600
+@@ -141,7 +141,7 @@
+ *-*-gnu* | *-*-k*bsd*-gnu \
+ | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
+ | *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
+- | *-*-darwin* | *-*-aix* | *-*-dragonfly*)
++ | *-*-darwin* | *-*-aix* | *-*-dragonfly* | *-*-cygwin*)
+ # POSIX system. The OS is supported.
+ ;;
+
+--- a/libitm/eh_cpp.cc 2015-01-05 06:33:28.000000000 -0600
++++ b/libitm/eh_cpp.cc 2016-02-01 23:52:40.110305300 -0600
+@@ -29,7 +29,11 @@
+ /* Everything from libstdc++ is weak, to avoid requiring that library
+ to be linked into plain C applications using libitm.so. */
+
++#if defined(__CYGWIN__) && defined(PIC)
++#define WEAK
++#else
+ #define WEAK __attribute__((weak))
++#endif
+
+ extern "C" {
+
+@@ -39,13 +43,12 @@
+ extern void __cxa_end_catch (void) WEAK;
+ extern void __cxa_tm_cleanup (void *, void *, unsigned int) WEAK;
+
+-#if !defined (HAVE_ELF_STYLE_WEAKREF)
++#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined(PIC)
+ void *__cxa_allocate_exception (size_t) { return NULL; }
+ void __cxa_throw (void *, void *, void *) { return; }
+ void *__cxa_begin_catch (void *) { return NULL; }
+ void __cxa_end_catch (void) { return; }
+ void __cxa_tm_cleanup (void *, void *, unsigned int) { return; }
+-void _Unwind_DeleteException (_Unwind_Exception *) { return; }
+ #endif /* HAVE_ELF_STYLE_WEAKREF */
+
+ }
+--- a/libitm/libitm_i.h 2016-02-01 23:31:51.815292000 -0600
++++ b/libitm/libitm_i.h 2016-02-01 23:52:40.115305900 -0600
+@@ -38,11 +38,6 @@
+ #include <unwind.h>
+ #include "local_type_traits"
+ #include "local_atomic"
+-
+-/* Don't require libgcc_s.so for exceptions. */
+-extern void _Unwind_DeleteException (_Unwind_Exception*) __attribute__((weak));
+-
+-
+ #include "common.h"
+
+ namespace GTM HIDDEN {
+--- a/libitm/method-serial.cc 2015-01-05 06:33:28.000000000 -0600
++++ b/libitm/method-serial.cc 2016-02-01 23:52:40.120306600 -0600
+@@ -24,12 +24,14 @@
+
+ #include "libitm_i.h"
+
++#if 0 // !defined(__CYGWIN__) || !defined(PIC)
+ // Avoid a dependency on libstdc++ for the pure virtuals in abi_dispatch.
+ extern "C" void HIDDEN
+ __cxa_pure_virtual ()
+ {
+ abort ();
+ }
++#endif
+
+ using namespace GTM;
+
diff --git a/0025-enable-libcilkrts.patch b/0025-enable-libcilkrts.patch
new file mode 100644
index 0000000..5ae7c9d
--- /dev/null
+++ b/0025-enable-libcilkrts.patch
@@ -0,0 +1,136 @@
+--- origsrc/gcc-5.3.0/config/target-posix 2014-11-13 08:03:17.000000000 -0600
++++ src/gcc-5.3.0/config/target-posix 2016-02-02 01:03:56.491336700 -0600
+@@ -5,7 +5,7 @@
+ ;;
+ *-*-solaris2* | *-*-hpux11*)
+ ;;
+- *-*-darwin* | *-*-aix*)
++ *-*-darwin* | *-*-aix* | *-*-cygwin*)
+ ;;
+ *)
+ UNSUPPORTED=1 ;;
+--- origsrc/gcc-5.3.0/libcilkrts/Makefile.am 2014-08-12 06:06:44.000000000 -0500
++++ src/gcc-5.3.0/libcilkrts/Makefile.am 2016-02-02 01:35:16.332546200 -0600
+@@ -107,7 +107,7 @@
+
+
+ # Hack for Cygwin
+-libcilkrts_la_LDFLAGS += -no-undefined
++libcilkrts_la_LDFLAGS += $(lt_host_flags)
+
+ # C/C++ header files for Cilk.
+ # cilkincludedir = $(includedir)/cilk
+--- origsrc/gcc-5.3.0/libcilkrts/Makefile.in 2014-08-12 06:06:44.000000000 -0500
++++ src/gcc-5.3.0/libcilkrts/Makefile.in 2016-02-02 01:35:52.560646600 -0600
+@@ -312,6 +312,7 @@
+ localedir = @localedir@
+ localstatedir = @localstatedir@
+ lt_cv_dlopen_libs = @lt_cv_dlopen_libs@
++lt_host_flags = @lt_host_flags@
+ mandir = @mandir@
+ mkdir_p = @mkdir_p@
+ multi_basedir = @multi_basedir@
+@@ -396,7 +397,7 @@
+
+ # Hack for Cygwin
+ libcilkrts_la_LDFLAGS = -version-info 5:0:0 @lt_cv_dlopen_libs@ \
+- $(AM_LDFLAGS) $(am__append_1) $(am__append_2) -no-undefined
++ $(AM_LDFLAGS) $(am__append_1) $(am__append_2) $(lt_host_flags)
+
+ # C/C++ header files for Cilk.
+ # cilkincludedir = $(includedir)/cilk
+--- origsrc/gcc-5.3.0/libcilkrts/aclocal.m4 2015-12-04 04:47:53.000000000 -0600
++++ src/gcc-5.3.0/libcilkrts/aclocal.m4 2016-02-02 01:36:07.265013900 -0600
+@@ -970,6 +970,7 @@
+
+ m4_include([../config/depstand.m4])
+ m4_include([../config/lead-dot.m4])
++m4_include([../config/lthostflags.m4])
+ m4_include([../config/multi.m4])
+ m4_include([../config/override.m4])
+ m4_include([../libtool.m4])
+--- origsrc/gcc-5.3.0/libcilkrts/configure 2015-01-26 16:54:31.000000000 -0600
++++ src/gcc-5.3.0/libcilkrts/configure 2016-02-02 01:38:32.848000500 -0600
+@@ -610,6 +610,7 @@
+ lt_cv_dlopen_libs
+ toolexeclibdir
+ toolexecdir
++lt_host_flags
+ CXXCPP
+ OTOOL64
+ OTOOL
+@@ -9032,7 +9033,7 @@
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+@@ -11060,7 +11061,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11063 "configure"
++#line 11064 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11166,7 +11167,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 11169 "configure"
++#line 11170 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -13518,7 +13519,7 @@
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
++ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+@@ -14420,6 +14421,28 @@
+
+
+
++
++
++case $host in
++ *-cygwin* | *-mingw*)
++ # 'host' will be top-level target in the case of a target lib,
++ # we must compare to with_cross_host to decide if this is a native
++ # or cross-compiler and select where to install dlls appropriately.
++ if test -n "$with_cross_host" &&
++ test x"$with_cross_host" != x"no"; then
++ lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"';
++ else
++ lt_host_flags='-no-undefined -bindir "$(bindir)"';
++ fi
++ ;;
++ *)
++ lt_host_flags=
++ ;;
++esac
++
++
++
++
+
+
+
+--- origsrc/gcc-5.3.0/libcilkrts/configure.ac 2015-01-26 16:54:31.000000000 -0600
++++ src/gcc-5.3.0/libcilkrts/configure.ac 2016-02-02 01:36:52.100207200 -0600
+@@ -160,6 +160,7 @@
+
+ AC_LIBTOOL_DLOPEN
+ AM_PROG_LIBTOOL
++ACX_LT_HOST_FLAGS
+ AC_SUBST(toolexecdir)
+ AC_SUBST(toolexeclibdir)
+
diff --git a/0025-fix-cygwin-stdint.patch b/0025-fix-cygwin-stdint.patch
deleted file mode 100644
index a47664d..0000000
--- a/0025-fix-cygwin-stdint.patch
+++ /dev/null
@@ -1,86 +0,0 @@
---- a/gcc/config/i386/cygwin-stdint.h 2014-01-02 16:23:26.000000000 -0600
-+++ b/gcc/config/i386/cygwin-stdint.h 2015-02-22 11:44:04.261159700 -0600
-@@ -24,71 +24,38 @@ along with GCC; see the file COPYING3.
- #define INT8_TYPE "signed char"
- #define INT16_TYPE "short int"
- #define INT32_TYPE "int"
--#ifdef __x86_64__
--#define INT64_TYPE "long int"
--#else
--#define INT64_TYPE "long long int"
--#endif
-+#define INT64_TYPE (TARGET_64BIT ? "long int" : "long long int")
-
- #define UINT8_TYPE "unsigned char"
- #define UINT16_TYPE "short unsigned int"
- #define UINT32_TYPE "unsigned int"
--#ifdef __x86_64__
--#define UINT64_TYPE "long unsigned int"
--#else
--#define UINT64_TYPE "long long unsigned int"
--#endif
-+#define UINT64_TYPE (TARGET_64BIT ? "long unsigned int" : "long long unsigned int")
-
- /* Minimum-width integer types */
-
- #define INT_LEAST8_TYPE "signed char"
- #define INT_LEAST16_TYPE "short int"
- #define INT_LEAST32_TYPE "int"
--#ifdef __x86_64__
--#define INT_LEAST64_TYPE "long int"
--#else
--#define INT_LEAST64_TYPE "long long int"
--#endif
-+#define INT_LEAST64_TYPE (TARGET_64BIT ? "long int" : "long long int")
-
- #define UINT_LEAST8_TYPE "unsigned char"
- #define UINT_LEAST16_TYPE "short unsigned int"
- #define UINT_LEAST32_TYPE "unsigned int"
--#ifdef __x86_64__
--#define UINT_LEAST64_TYPE "long unsigned int"
--#else
--#define UINT_LEAST64_TYPE "long long unsigned int"
--#endif
-+#define UINT_LEAST64_TYPE (TARGET_64BIT ? "long unsigned int" : "long long unsigned int")
-
- /* Fastest minimum-width integer types */
-
- #define INT_FAST8_TYPE "signed char"
--#ifdef __x86_64__
--#define INT_FAST16_TYPE "long int"
--#define INT_FAST32_TYPE "long int"
--#define INT_FAST64_TYPE "long int"
--#else
--#define INT_FAST16_TYPE "int"
--#define INT_FAST32_TYPE "int"
--#define INT_FAST64_TYPE "long long int"
--#endif
-+#define INT_FAST16_TYPE (TARGET_64BIT ? "long int" : "int")
-+#define INT_FAST32_TYPE (TARGET_64BIT ? "long int" : "int")
-+#define INT_FAST64_TYPE (TARGET_64BIT ? "long int" : "long long int")
-
- #define UINT_FAST8_TYPE "unsigned char"
--#ifdef __x86_64__
--#define UINT_FAST16_TYPE "long unsigned int"
--#define UINT_FAST32_TYPE "long unsigned int"
--#define UINT_FAST64_TYPE "long unsigned int"
--#else
--#define UINT_FAST16_TYPE "unsigned int"
--#define UINT_FAST32_TYPE "unsigned int"
--#define UINT_FAST64_TYPE "long long unsigned int"
--#endif
-+#define UINT_FAST16_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
-+#define UINT_FAST32_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
-+#define UINT_FAST64_TYPE (TARGET_64BIT ? "long unsigned int" : "long long unsigned int")
-
- /* Integer types capable of holding object pointers */
-
--#ifdef __x86_64__
--#define INTPTR_TYPE "long int"
--#define UINTPTR_TYPE "long unsigned int"
--#else
--#define INTPTR_TYPE "int"
--#define UINTPTR_TYPE "unsigned int"
--#endif
-+#define INTPTR_TYPE (TARGET_64BIT ? "long int" : "int")
-+#define UINTPTR_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
diff --git a/0026-g++-gnu-source.patch b/0026-g++-gnu-source.patch
new file mode 100644
index 0000000..2e11a66
--- /dev/null
+++ b/0026-g++-gnu-source.patch
@@ -0,0 +1,40 @@
+--- 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/cygwin-gcc.spec b/cygwin-gcc.spec
index 2c73a26..1078e95 100644
--- a/cygwin-gcc.spec
+++ b/cygwin-gcc.spec
@@ -1,15 +1,11 @@
-%global gcc_major 4
-%global gcc_minor 9
-%global gcc_micro 3
-%global gcc_branch %{gcc_major}.%{gcc_minor}
-%global gcc_version %{gcc_major}.%{gcc_minor}.%{gcc_micro}
+%global gcc_version 5.3.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
%global build_ada 0
-# building cross-gnat requires matching X.Y version of native gnat
-%if 0%{?fedora} == 21
+# building cross-gnat requires matching major version of native gnat
+%if 0%{?fedora} >= 22 && 0%{?fedora} < 24
%ifarch %{ix86} x86_64 ia64 ppc ppc64 ppc64p7 alpha %{arm} aarch64
%global build_ada 1
%endif
@@ -29,12 +25,12 @@ URL: http://gcc.gnu.org
BuildRequires: texinfo
BuildRequires: cygwin32-filesystem
BuildRequires: cygwin32-binutils
-BuildRequires: cygwin32 >= 1.7.32
+BuildRequires: cygwin32 >= 2.4.1
BuildRequires: cygwin32-w32api-headers
BuildRequires: cygwin32-w32api-runtime
BuildRequires: cygwin64-filesystem
BuildRequires: cygwin64-binutils
-BuildRequires: cygwin64 >= 1.7.32
+BuildRequires: cygwin64 >= 2.4.1
BuildRequires: cygwin64-w32api-headers
BuildRequires: cygwin64-w32api-runtime
BuildRequires: gmp-devel
@@ -43,9 +39,8 @@ BuildRequires: libmpc-devel
%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: libstdc++-static
%endif
-%if 0%{?fedora} >= 20
-BuildRequires: isl-devel >= 0.11.1
-BuildRequires: cloog-devel >= 0.18.0
+%if 0%{?fedora}
+BuildRequires: isl-devel >= 0.14
%endif
BuildRequires: zlib-devel
BuildRequires: flex
@@ -63,25 +58,26 @@ Patch3: 0003-AWT-Font-fix-for-Cygwin.patch
Patch4: 0004-Cygwin-ioctl-may-emit-EINVAL.patch
Patch5: 0005-use-avoid-version-if-not-tracking-SO-version.patch
Patch6: 0006-cygwin-uses-cyg-library-prefix.patch
-Patch7: 0007-bump-libgcj-version.patch
-Patch8: 0008-libatomic-libtool-fixes-for-Cygwin.patch
-Patch9: 0009-support-64bit-cygwin-too.patch
-Patch10: 0010-Avoid-installing-libffi.patch
-Patch11: 0011-libitm-libtool-fixes-for-Cygwin.patch
-Patch12: 0012-Cygwin-uses-sysv-ABI-on-x86_64.patch
-Patch13: 0013-Do-not-version-lto-plugin-on-cygwin-mingw.patch
-Patch14: 0014-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch
-Patch15: 0015-handle-dllimport-properly-in-medium-model.patch
-Patch16: 0016-skip-test-for-cygwin-mingw.patch
-Patch17: 0017-64bit-Cygwin-uses-SEH.patch
-Patch18: 0018-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENABLE-for.patch
-Patch19: 0019-fix-some-implicit-declaration-warnings.patch
-Patch20: 0020-fix-gnat-DLL-prefix-for-Cygwin.patch
-Patch21: 0021-__cxa-atexit-for-Cygwin.patch
-Patch22: 0022-prevent-modules-from-being-unloaded-before-their-dto.patch
-Patch23: 0023-Attempt-to-fix-dw2-unwinder-for-Cygwin.patch
-Patch24: 0024-Restore-compile-mode-pthread.patch
-Patch25: 0025-fix-cygwin-stdint.patch
+Patch7: 0007-Avoid-installing-libffi.patch
+#Patch8: 0008-libitm-libtool-fixes-for-Cygwin.patch
+Patch9: 0009-Cygwin-uses-sysv-ABI-on-x86_64.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.patch
+Patch13: 0013-skip-test-for-cygwin-mingw.patch
+Patch14: 0014-64bit-Cygwin-uses-SEH.patch
+Patch15: 0015-define-RTS_CONTROL_ENABLE-and-DTR_CONTROL_ENABLE-for.patch
+Patch16: 0016-fix-some-implicit-declaration-warnings.patch
+Patch17: 0017-__cxa-atexit-for-Cygwin.patch
+Patch18: 0018-prevent-modules-from-being-unloaded-before-their-dto.patch
+Patch19: 0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
+Patch20: 0020-cygwin-uses-cyg-lib-prefix.patch
+Patch21: 0021-search-usr-lib-w32api-explicitly.patch
+Patch22: 0022-libgomp-soname-cygwin-mingw.patch
+Patch23: 0023-glibcxx-use-c99.patch
+Patch24: 0024-libitm-weak-symbols.patch
+Patch25: 0025-enable-libcilkrts.patch
+Patch26: 0026-g++-gnu-source.patch
# Fedora-specific patches
Patch1000: 1000-cross-exe-suffix.patch
@@ -104,17 +100,20 @@ Group: Development/Languages
# NB: Explicit cygwin32-filesystem dependency is REQUIRED here.
Requires: cygwin32-filesystem
Requires: cygwin32-binutils
-Requires: cygwin32 >= 1.7.32
+Requires: cygwin32 >= 2.4.1
Requires: cygwin32-default-manifest
Requires: cygwin32-w32api-runtime
Requires: cygwin32-cpp = %{version}-%{release}
# We don't run the automatic dependency scripts which would
# normally detect and provide the following DLL:
Provides: cygwin32(cygatomic-1.dll)
+Provides: cygwin32(cygcilkrts-5.dll)
Provides: cygwin32(cyggcc_s-1.dll)
Provides: cygwin32(cyggomp-1.dll)
Provides: cygwin32(cygquadmath-0.dll)
Provides: cygwin32(cygssp-0.dll)
+Provides: cygwin32(cygvtv-0.dll)
+Provides: cygwin32(cygvtv_stubs-0.dll)
# for backwards compatibility (libquadmath is new to 4.7)
Provides: cygwin(cyggcc_s-1.dll)
Provides: cygwin(cyggomp-1.dll)
@@ -211,8 +210,8 @@ Requires: cygwin32-gcc = %{version}-%{release}
# We don't run the automatic dependency scripts which would
# normally detect and provide the following DLL:
# (shared libgnat doesn't work quite right, nor does it cross-build
-#Provides: cygwin32(cyggnat-4.7.dll)
-#Provides: cygwin32(cyggnarl-4.7.dll)
+#Provides: cygwin32(cyggnat-5.dll)
+#Provides: cygwin32(cyggnarl-5.dll)
# for backwards compatibility
Provides: %{name}-gnat = %{version}-%{release}
Obsoletes: %{name}-gnat < 4.7
@@ -226,17 +225,20 @@ Group: Development/Languages
# NB: Explicit cygwin-filesystem dependency is REQUIRED here.
Requires: cygwin64-filesystem
Requires: cygwin64-binutils
-Requires: cygwin64 >= 1.7.32
+Requires: cygwin64 >= 2.4.1
Requires: cygwin64-default-manifest
Requires: cygwin64-w32api-runtime
Requires: cygwin64-cpp = %{version}-%{release}
# We don't run the automatic dependency scripts which would
# normally detect and provide the following DLLs:
Provides: cygwin64(cygatomic-1.dll)
+Provides: cygwin64(cygcilkrts-5.dll)
Provides: cygwin64(cyggcc_s-seh-1.dll)
Provides: cygwin64(cyggomp-1.dll)
Provides: cygwin64(cygquadmath-0.dll)
Provides: cygwin64(cygssp-0.dll)
+Provides: cygwin64(cygvtv-0.dll)
+Provides: cygwin64(cygvtv_stubs-0.dll)
# prevent update errors
%if ! %{build_ada}
Obsoletes: cygwin64-gcc-gnat < %{version}-%{release}
@@ -308,8 +310,8 @@ Requires: cygwin64-gcc = %{version}-%{release}
# We don't run the automatic dependency scripts which would
# normally detect and provide the following DLL:
# (shared libgnat doesn't work quite right, nor does it cross-build
-#Provides: cygwin64(cyggnat-4.7.dll)
-#Provides: cygwin64(cyggnarl-4.7.dll)
+#Provides: cygwin64(cyggnat-5.dll)
+#Provides: cygwin64(cyggnarl-5.dll)
%description -n cygwin64-gcc-gnat
Cygwin x86_64 cross-compiler for Ada.
@@ -324,7 +326,7 @@ Cygwin x86_64 cross-compiler for Ada.
%patch5 -p1
%patch6 -p1
%patch7 -p1
-%patch8 -p1
+#patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
@@ -339,9 +341,10 @@ Cygwin x86_64 cross-compiler for Ada.
%patch20 -p1
%patch21 -p1
%patch22 -p1
-%patch23 -p1
+%patch23 -p2
%patch24 -p1
-%patch25 -p1
+%patch25 -p2
+%patch26 -p2
%patch1000 -p1
%patch1001 -p1
@@ -351,6 +354,10 @@ echo 'Fedora Cygwin %{gcc_version}-%{gcc_release}' > gcc/DEV-PHASE
%build
+# configure tries to test SUSv4-compliant behaviour of
+# realpath(..., NULL) via _XOPEN_VERSION
+export glibcxx_cv_realpath=yes
+
mkdir -p build_cyg32
pushd build_cyg32
@@ -378,13 +385,19 @@ CC="%{__cc} ${RPM_OPT_FLAGS}" \
--with-sysroot=%{cygwin32_sysroot} \
--enable-shared --enable-shared-libgcc --enable-__cxa_atexit \
--with-dwarf2 --disable-sjlj-exceptions \
-%if 0%{?fedora} >= 20
+%if 0%{?fedora}
--enable-graphite \
%endif
--enable-languages="c,c++,objc,obj-c++,fortran${enablelada},lto" \
+ --disable-libcc1 \
--enable-lto --disable-symvers \
- --enable-libgomp --disable-libitm --enable-libssp \
+ --enable-libatomic \
+ --enable-libcilkrts \
+ --enable-libgomp \
+ --enable-libitm \
+ --enable-libssp \
--enable-libquadmath --enable-libquadmath-support \
+ --with-default-libstdcxx-abi=gcc4-compatible \
--with-python-dir=/share/gcc-%{gcc_version}/%{cygwin32_target}/python \
%if %{build_ada}
--enable-libada \
@@ -422,13 +435,19 @@ CC="%{__cc} ${RPM_OPT_FLAGS}" \
--with-sysroot=%{cygwin64_sysroot} \
--enable-shared --enable-shared-libgcc --enable-__cxa_atexit \
--with-dwarf2 \
-%if 0%{?fedora} >= 20
+%if 0%{?fedora}
--enable-graphite \
%endif
--enable-languages="c,c++,objc,obj-c++,fortran${enablelada},lto" \
+ --disable-libcc1 \
--enable-lto --disable-symvers \
- --enable-libgomp --disable-libitm --enable-libssp \
+ --enable-libatomic \
+ --enable-libcilkrts \
+ --enable-libgomp \
+ --enable-libitm \
+ --enable-libssp \
--enable-libquadmath --enable-libquadmath-support \
+ --with-default-libstdcxx-abi=gcc4-compatible \
--with-python-dir=/share/gcc-%{gcc_version}/%{cygwin64_target}/python \
%if %{build_ada}
--enable-libada \
@@ -467,6 +486,17 @@ ln -sf ..%{_prefix}/bin/%{cygwin64_target}-cpp \
mv $RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/lib/libgcc_s.dll.a \
$RPM_BUILD_ROOT%{_prefix}/lib/gcc/%{cygwin64_target}/%{gcc_version}/
+# 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/
+
+# 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
+
# libtool installs DLL files of runtime libraries into $(libdir)/../bin,
# but we need them in cygwin*_bindir.
mkdir -p $RPM_BUILD_ROOT%{cygwin32_bindir}
@@ -499,6 +529,7 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_bindir}/%{cygwin32_target}-gcc-nm
%{_bindir}/%{cygwin32_target}-gcc-ranlib
%{_bindir}/%{cygwin32_target}-gcov
+%{_bindir}/%{cygwin32_target}-gcov-tool
%dir %{_prefix}/lib/gcc/%{cygwin32_target}
%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/crtbegin.o
@@ -507,6 +538,9 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_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}/libcilkrts.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libcilkrts.dll.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libcilkrts.spec
%{_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
@@ -514,16 +548,23 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_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}/libitm.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libitm.spec
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libquadmath.a
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libquadmath.dll.a
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libssp.a
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libssp_nonshared.a
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libssp.dll.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libvtv.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libvtv.dll.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libvtv_stubs.a
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libvtv_stubs.dll.a
%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include
+%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include/cilk
%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include/ssp
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include/[^j]*.h
+%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include/cilk/*.h
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include/ssp/*.h
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/include-fixed/
%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/install-tools
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/install-tools/*
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/plugin/
@@ -536,10 +577,14 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%dir %{_datadir}/gcc-%{gcc_version}
%dir %{_datadir}/gcc-%{gcc_version}/%{cygwin32_target}
%{cygwin32_bindir}/cygatomic-1.dll
+%{cygwin32_bindir}/cygcilkrts-5.dll
%{cygwin32_bindir}/cyggcc_s-1.dll
%{cygwin32_bindir}/cyggomp-1.dll
+%{cygwin32_bindir}/cyggomp-plugin-host_nonshm-1.dll
%{cygwin32_bindir}/cygquadmath-0.dll
%{cygwin32_bindir}/cygssp-0.dll
+%{cygwin32_bindir}/cygvtv-0.dll
+%{cygwin32_bindir}/cygvtv_stubs-0.dll
%{_mandir}/man1/%{cygwin32_target}-gcc.1*
%{_mandir}/man1/%{cygwin32_target}-gcov.1*
@@ -593,10 +638,9 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgfortran.spec
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/libgfortranbegin.a
%dir %{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/finclude
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/finclude/omp_lib.f90
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/finclude/omp_lib.h
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/finclude/omp_lib.mod
-%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/finclude/omp_lib_kinds.mod
+%{_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}/%{version}/f951
%{cygwin32_bindir}/cyggfortran-3.dll
@@ -608,8 +652,8 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/adainclude/
%{_prefix}/lib/gcc/%{cygwin32_target}/%{version}/adalib/
%{_libexecdir}/gcc/%{cygwin32_target}/%{version}/gnat1
-#%%{cygwin32_bindir}/cyggnarl-4.7.dll
-#%%{cygwin32_bindir}/cyggnat-4.7.dll
+#%%{cygwin32_bindir}/cyggnarl-5.dll
+#%%{cygwin32_bindir}/cyggnat-5.dll
%endif
%files -n cygwin64-gcc
@@ -619,6 +663,7 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_bindir}/%{cygwin64_target}-gcc-nm
%{_bindir}/%{cygwin64_target}-gcc-ranlib
%{_bindir}/%{cygwin64_target}-gcov
+%{_bindir}/%{cygwin64_target}-gcov-tool
%dir %{_prefix}/lib/gcc/%{cygwin64_target}
%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/crtbegin.o
@@ -627,6 +672,9 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_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}/libcilkrts.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libcilkrts.dll.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libcilkrts.spec
%{_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
@@ -634,16 +682,23 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_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}/libitm.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libitm.spec
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libquadmath.a
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libquadmath.dll.a
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libssp.a
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libssp_nonshared.a
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libssp.dll.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libvtv.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libvtv.dll.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libvtv_stubs.a
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libvtv_stubs.dll.a
%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include
+%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include/cilk
%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include/ssp
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include/[^j]*.h
+%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include/cilk/*.h
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include/ssp/*.h
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/include-fixed/
%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/install-tools
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/install-tools/*
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/plugin/
@@ -656,10 +711,14 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%dir %{_datadir}/gcc-%{gcc_version}
%dir %{_datadir}/gcc-%{gcc_version}/%{cygwin64_target}
%{cygwin64_bindir}/cygatomic-1.dll
+%{cygwin64_bindir}/cygcilkrts-5.dll
%{cygwin64_bindir}/cyggcc_s-seh-1.dll
%{cygwin64_bindir}/cyggomp-1.dll
+%{cygwin64_bindir}/cyggomp-plugin-host_nonshm-1.dll
%{cygwin64_bindir}/cygquadmath-0.dll
%{cygwin64_bindir}/cygssp-0.dll
+%{cygwin64_bindir}/cygvtv-0.dll
+%{cygwin64_bindir}/cygvtv_stubs-0.dll
%{_mandir}/man1/%{cygwin64_target}-gcc.1*
%{_mandir}/man1/%{cygwin64_target}-gcov.1*
@@ -713,10 +772,9 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgfortran.spec
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/libgfortranbegin.a
%dir %{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/finclude
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/finclude/omp_lib.f90
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/finclude/omp_lib.h
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/finclude/omp_lib.mod
-%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/finclude/omp_lib_kinds.mod
+%{_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}/%{version}/f951
%{cygwin64_bindir}/cyggfortran-3.dll
@@ -728,12 +786,16 @@ cat cygwin-cpplib.lang >> cygwin-gcc.lang
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/adainclude/
%{_prefix}/lib/gcc/%{cygwin64_target}/%{version}/adalib/
%{_libexecdir}/gcc/%{cygwin64_target}/%{version}/gnat1
-#%%{cygwin64_bindir}/cyggnarl-4.7.dll
-#%%{cygwin64_bindir}/cyggnat-4.7.dll
+#%%{cygwin64_bindir}/cyggnarl-5.dll
+#%%{cygwin64_bindir}/cyggnat-5.dll
%endif
%changelog
+* Sun Feb 21 2016 Yaakov Selkowitz <yselkowi@redhat.com> - 5.3.0-1
+- new version
+- Enable libcilkrts, libitm, libvtv
+
* Fri Aug 14 2015 Yaakov Selkowitz <yselkowi@redhat.com> - 4.9.3-1
- Update to 4.9.3
diff --git a/sources b/sources
index 2cd21ea..648b1f0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-6f831b4d251872736e8e9cc09746f327 gcc-4.9.3.tar.bz2
+c9616fd448f980259c31de613e575719 gcc-5.3.0.tar.bz2