mingw-w64-cross-gcc: Update to 6.3.0

This commit is contained in:
Alexey Pavlov 2017-01-24 21:04:07 +03:00
parent f3b96fdbf6
commit 8121fca5df
22 changed files with 4457 additions and 4697 deletions

View File

@ -3,15 +3,12 @@ From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:31:06 +0800 Date: Sat, 28 Jun 2014 09:31:06 +0800
Subject: [PATCH 09/21] Cygwin uses sysv ABI on x86_64 Subject: [PATCH 09/21] Cygwin uses sysv ABI on x86_64
Conflicts:
libitm/configure.tgt
--- ---
gcc/builtin-attrs.def | 3 +++ gcc/builtin-attrs.def | 3 +++
gcc/gtm-builtins.def | 2 +- gcc/gtm-builtins.def | 2 +-
libitm/configure.tgt | 2 +-
libitm/libitm.h | 3 ++- libitm/libitm.h | 3 ++-
libitm/libitm_i.h | 6 ++++-- libitm/libitm_i.h | 4 ++--
5 files changed, 11 insertions(+), 5 deletions(-) 4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/gcc/builtin-attrs.def b/gcc/builtin-attrs.def diff --git a/gcc/builtin-attrs.def b/gcc/builtin-attrs.def
index 1338644..59bdc72 100644 index 1338644..59bdc72 100644
@ -45,19 +42,6 @@ index e2bc081..08cf597 100644
DEF_TM_BUILTIN (BUILT_IN_TM_COMMIT, "_ITM_commitTransaction", DEF_TM_BUILTIN (BUILT_IN_TM_COMMIT, "_ITM_commitTransaction",
BT_FN_VOID, ATTR_TM_NOTHROW_LIST) BT_FN_VOID, ATTR_TM_NOTHROW_LIST)
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
index 99da73a..c879632 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* | *-*-dragonfly*)
+ | *-*-darwin* | *-*-aix* | *-*-dragonfly* | *-*-cygwin*)
# POSIX system. The OS is supported.
;;
diff --git a/libitm/libitm.h b/libitm/libitm.h diff --git a/libitm/libitm.h b/libitm/libitm.h
index 651896b..6f7a84b 100644 index 651896b..6f7a84b 100644
--- a/libitm/libitm.h --- a/libitm/libitm.h
@ -83,18 +67,7 @@ diff --git a/libitm/libitm_i.h b/libitm/libitm_i.h
index 0eda01b..87f793d 100644 index 0eda01b..87f793d 100644
--- a/libitm/libitm_i.h --- a/libitm/libitm_i.h
+++ b/libitm/libitm_i.h +++ b/libitm/libitm_i.h
@@ -39,8 +39,10 @@ @@ -289,7 +289,7 @@ struct gtm_thread
#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
// Invoked from assembly language, thus the "asm" specifier on // Invoked from assembly language, thus the "asm" specifier on
// the name, avoiding complex name mangling. // the name, avoiding complex name mangling.
static uint32_t begin_transaction(uint32_t, const gtm_jmpbuf *) static uint32_t begin_transaction(uint32_t, const gtm_jmpbuf *)
@ -103,7 +76,7 @@ index 0eda01b..87f793d 100644
// In eh_cpp.cc // In eh_cpp.cc
void revert_cpp_exceptions (gtm_transaction_cp *cp = 0); 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 uint64_t gtm_spin_count_var;
extern "C" uint32_t GTM_longjmp (uint32_t, const gtm_jmpbuf *, uint32_t) extern "C" uint32_t GTM_longjmp (uint32_t, const gtm_jmpbuf *, uint32_t)

View File

@ -40,8 +40,8 @@ index 8b7e16d..361de8e 100644
- host_lto_plugin_soname=liblto_plugin-0.dll - host_lto_plugin_soname=liblto_plugin-0.dll
+ host_lto_plugin_soname=liblto_plugin.dll + host_lto_plugin_soname=liblto_plugin.dll
;; ;;
i[34567]86-*-darwin* | x86_64-*-darwin*) i[34567]86-*-uwin*)
out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o" echo "*** UWIN may not be used as a host platform because"
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index a90a5da..1ebf155 100644 index a90a5da..1ebf155 100644
--- a/lto-plugin/Makefile.am --- a/lto-plugin/Makefile.am

View File

@ -1,24 +0,0 @@
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

View File

@ -1,85 +0,0 @@
--- gcc-5.3.0/libstdc++-v3/acinclude.m4 2015-11-24 07:25:07.000000000 -0600
+++ 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.
--- gcc-5.3.0/libstdc++-v3/linkage.m4 2013-02-11 11:50:13.000000000 -0600
+++ 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)
--- gcc-5.3.0/libstdc++-v3/configure 2015-11-26 07:51:04.000000000 -0600
+++ 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

View File

@ -1,6 +1,8 @@
--- a/libitm/Makefile.am 2016-02-01 23:54:24.805099900 -0600 diff --git a/libitm/Makefile.am b/libitm/Makefile.am
+++ b/libitm/Makefile.am 2016-02-02 00:06:11.466834500 -0600 index 1dce82d..8b133b3 100644
@@ -53,7 +53,6 @@ --- a/libitm/Makefile.am
+++ b/libitm/Makefile.am
@@ -53,7 +53,6 @@ libitm_version_info = -version-info $(libtool_VERSION)
# Force link with C, not C++. For now, while we're using C++ we don't # Force link with C, not C++. For now, while we're using C++ we don't
# want or need libstdc++. # want or need libstdc++.
libitm_la_DEPENDENCIES = $(libitm_version_dep) libitm_la_DEPENDENCIES = $(libitm_version_dep)
@ -8,9 +10,11 @@
libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
libitm_la_SOURCES = \ libitm_la_SOURCES = \
--- a/libitm/Makefile.in 2016-02-01 23:54:24.813600900 -0600 diff --git a/libitm/Makefile.in b/libitm/Makefile.in
+++ b/libitm/Makefile.in 2016-02-02 00:07:01.109638300 -0600 index 138eeb1..f688e84 100644
@@ -328,7 +328,6 @@ --- a/libitm/Makefile.in
+++ b/libitm/Makefile.in
@@ -356,7 +356,6 @@ libitm_version_info = -version-info $(libtool_VERSION)
# Force link with C, not C++. For now, while we're using C++ we don't # Force link with C, not C++. For now, while we're using C++ we don't
# want or need libstdc++. # want or need libstdc++.
libitm_la_DEPENDENCIES = $(libitm_version_dep) libitm_la_DEPENDENCIES = $(libitm_version_dep)
@ -18,18 +22,20 @@
libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
libitm_la_SOURCES = aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc \ 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 \ barrier.cc beginend.cc clone.cc eh_cpp.cc local.cc query.cc \
@@ -446,7 +445,7 @@ @@ -473,7 +472,7 @@ clean-toolexeclibLTLIBRARIES:
rm -f "$${dir}/so_locations"; \ rm -f "$${dir}/so_locations"; \
done done
libitm.la: $(libitm_la_OBJECTS) $(libitm_la_DEPENDENCIES) libitm.la: $(libitm_la_OBJECTS) $(libitm_la_DEPENDENCIES) $(EXTRA_libitm_la_DEPENDENCIES)
- $(libitm_la_LINK) -rpath $(toolexeclibdir) $(libitm_la_OBJECTS) $(libitm_la_LIBADD) $(LIBS) - $(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) + $(CXXLINK) $(libitm_la_LDFLAGS) -rpath $(toolexeclibdir) $(libitm_la_OBJECTS) $(libitm_la_LIBADD) $(LIBS)
mostlyclean-compile: mostlyclean-compile:
-rm -f *.$(OBJEXT) -rm -f *.$(OBJEXT)
--- a/libitm/alloc_cpp.cc 2015-01-05 06:33:28.000000000 -0600 diff --git a/libitm/alloc_cpp.cc b/libitm/alloc_cpp.cc
+++ b/libitm/alloc_cpp.cc 2016-02-01 23:52:40.097803700 -0600 index 1d52e89..9722a0b 100644
@@ -46,21 +46,27 @@ --- a/libitm/alloc_cpp.cc
+++ b/libitm/alloc_cpp.cc
@@ -50,24 +50,30 @@ using namespace GTM;
/* Everything from libstdc++ is weak, to avoid requiring that library /* Everything from libstdc++ is weak, to avoid requiring that library
to be linked into plain C applications using libitm.so. */ to be linked into plain C applications using libitm.so. */
@ -43,10 +49,12 @@
-extern void *_ZnwX (size_t) __attribute__((weak)); -extern void *_ZnwX (size_t) __attribute__((weak));
-extern void _ZdlPv (void *) __attribute__((weak)); -extern void _ZdlPv (void *) __attribute__((weak));
-extern void _ZdlPvX (void *, size_t) __attribute__((weak));
-extern void *_ZnaX (size_t) __attribute__((weak)); -extern void *_ZnaX (size_t) __attribute__((weak));
-extern void _ZdaPv (void *) __attribute__((weak)); -extern void _ZdaPv (void *) __attribute__((weak));
+extern void *_ZnwX (size_t) WEAK; +extern void *_ZnwX (size_t) WEAK;
+extern void _ZdlPv (void *) WEAK; +extern void _ZdlPv (void *) WEAK;
+extern void _ZdlPvX (void *, size_t) WEAK;
+extern void *_ZnaX (size_t) WEAK; +extern void *_ZnaX (size_t) WEAK;
+extern void _ZdaPv (void *) WEAK; +extern void _ZdaPv (void *) WEAK;
@ -54,10 +62,13 @@
-extern void *_ZnwXRKSt9nothrow_t (size_t, c_nothrow_p) __attribute__((weak)); -extern void *_ZnwXRKSt9nothrow_t (size_t, c_nothrow_p) __attribute__((weak));
-extern void _ZdlPvRKSt9nothrow_t (void *, 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 *_ZnwXRKSt9nothrow_t (size_t, c_nothrow_p) WEAK;
+extern void _ZdlPvRKSt9nothrow_t (void *, c_nothrow_p) WEAK; +extern void _ZdlPvRKSt9nothrow_t (void *, c_nothrow_p) WEAK;
extern void _ZdlPvXRKSt9nothrow_t
-(void *, size_t, 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));
+(void *, size_t, c_nothrow_p) WEAK;
+extern void *_ZnaXRKSt9nothrow_t (size_t, c_nothrow_p) WEAK; +extern void *_ZnaXRKSt9nothrow_t (size_t, c_nothrow_p) WEAK;
+extern void _ZdaPvRKSt9nothrow_t (void *, c_nothrow_p) WEAK; +extern void _ZdaPvRKSt9nothrow_t (void *, c_nothrow_p) WEAK;
@ -65,9 +76,11 @@
+#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined(PIC) +#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined(PIC)
void *_ZnwX (size_t) { return NULL; } void *_ZnwX (size_t) { return NULL; }
void _ZdlPv (void *) { return; } void _ZdlPv (void *) { return; }
void *_ZnaX (size_t) { return NULL; } void _ZdlPvX (void *, size_t) { return; }
--- a/libitm/beginend.cc 2015-01-05 06:33:28.000000000 -0600 diff --git a/libitm/beginend.cc b/libitm/beginend.cc
+++ b/libitm/beginend.cc 2016-02-01 23:52:40.106804900 -0600 index 20b5547..3e19441 100644
--- a/libitm/beginend.cc
+++ b/libitm/beginend.cc
@@ -25,6 +25,24 @@ @@ -25,6 +25,24 @@
#include "libitm_i.h" #include "libitm_i.h"
#include <pthread.h> #include <pthread.h>
@ -93,9 +106,24 @@
using namespace GTM; using namespace GTM;
--- a/libitm/eh_cpp.cc 2015-01-05 06:33:28.000000000 -0600 diff --git a/libitm/configure.tgt b/libitm/configure.tgt
+++ b/libitm/eh_cpp.cc 2016-02-01 23:52:40.110305300 -0600 index e84382f..8dbe036 100644
@@ -29,7 +29,11 @@ --- 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* | *-*-dragonfly*)
+ | *-*-darwin* | *-*-aix* | *-*-dragonfly* | *-*-cygwin*)
# POSIX system. The OS is supported.
;;
diff --git a/libitm/eh_cpp.cc b/libitm/eh_cpp.cc
index a6c06b5..a4ba223 100644
--- a/libitm/eh_cpp.cc
+++ b/libitm/eh_cpp.cc
@@ -77,7 +77,11 @@ using namespace GTM;
/* Everything from libstdc++ is weak, to avoid requiring that library /* Everything from libstdc++ is weak, to avoid requiring that library
to be linked into plain C applications using libitm.so. */ to be linked into plain C applications using libitm.so. */
@ -107,23 +135,54 @@
extern "C" { extern "C" {
@@ -39,13 +43,12 @@ @@ -95,14 +99,13 @@ extern void __cxa_end_catch (void) WEAK;
extern void __cxa_end_catch (void) WEAK;
extern void __cxa_tm_cleanup (void *, void *, unsigned int) WEAK; extern void __cxa_tm_cleanup (void *, void *, unsigned int) WEAK;
extern __cxa_eh_globals *__cxa_get_globals (void) WEAK;
-#if !defined (HAVE_ELF_STYLE_WEAKREF) -#if !defined (HAVE_ELF_STYLE_WEAKREF)
+#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined(PIC) +#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined(PIC)
void *__cxa_allocate_exception (size_t) { return NULL; } void *__cxa_allocate_exception (size_t) { return NULL; }
void __cxa_free_exception (void *) { return; }
void __cxa_throw (void *, void *, void *) { return; } void __cxa_throw (void *, void *, void *) { return; }
void *__cxa_begin_catch (void *) { return NULL; } void *__cxa_begin_catch (void *) { return NULL; }
void __cxa_end_catch (void) { return; } void __cxa_end_catch (void) { return; }
void __cxa_tm_cleanup (void *, void *, unsigned int) { return; } void __cxa_tm_cleanup (void *, void *, unsigned int) { return; }
-void _Unwind_DeleteException (_Unwind_Exception *) { return; } -void _Unwind_DeleteException (_Unwind_Exception *) { return; }
__cxa_eh_globals *__cxa_get_globals (void) { return NULL; }
#endif /* HAVE_ELF_STYLE_WEAKREF */ #endif /* HAVE_ELF_STYLE_WEAKREF */
} @@ -176,9 +179,10 @@ _ITM_cxa_end_catch (void)
--- a/libitm/method-serial.cc 2015-01-05 06:33:28.000000000 -0600 void
+++ b/libitm/method-serial.cc 2016-02-01 23:52:40.120306600 -0600 GTM::gtm_thread::init_cpp_exceptions ()
{
+ __cxa_eh_globals *(*__cxa_get_globals_ptr)() = &__cxa_get_globals;
// Only save and restore the number of uncaught exceptions if this is
// actually used in the program.
- if (__cxa_get_globals != NULL && __cxa_get_globals () != 0)
+ if (__cxa_get_globals_ptr != NULL && __cxa_get_globals () != 0)
cxa_uncaught_count_ptr = &__cxa_get_globals ()->uncaughtExceptions;
else
cxa_uncaught_count_ptr = 0;
diff --git a/libitm/libitm_i.h b/libitm/libitm_i.h
index a8cff57..52d2069 100644
--- a/libitm/libitm_i.h
+++ b/libitm/libitm_i.h
@@ -37,11 +37,6 @@
#include <string.h>
#include <unwind.h>
#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 {
diff --git a/libitm/method-serial.cc b/libitm/method-serial.cc
index a151b66..3f47f58 100644
--- a/libitm/method-serial.cc
+++ b/libitm/method-serial.cc
@@ -24,12 +24,14 @@ @@ -24,12 +24,14 @@
#include "libitm_i.h" #include "libitm_i.h"

View File

@ -1,6 +1,8 @@
--- gcc-5.3.0/config/target-posix 2014-11-13 08:03:17.000000000 -0600 diff --git a/config/target-posix b/config/target-posix
+++ gcc-5.3.0/config/target-posix 2016-02-02 01:03:56.491336700 -0600 index 2fba066..314d4c1 100644
@@ -5,7 +5,7 @@ --- a/config/target-posix
+++ b/config/target-posix
@@ -5,7 +5,7 @@ case "${target}" in
;; ;;
*-*-solaris2* | *-*-hpux11*) *-*-solaris2* | *-*-hpux11*)
;; ;;
@ -9,9 +11,11 @@
;; ;;
*) *)
UNSUPPORTED=1 ;; UNSUPPORTED=1 ;;
--- gcc-5.3.0/libcilkrts/Makefile.am 2014-08-12 06:06:44.000000000 -0500 diff --git a/libcilkrts/Makefile.am b/libcilkrts/Makefile.am
+++ gcc-5.3.0/libcilkrts/Makefile.am 2016-02-02 01:35:16.332546200 -0600 index 4f944dd..57256df 100644
@@ -107,7 +107,7 @@ --- a/libcilkrts/Makefile.am
+++ b/libcilkrts/Makefile.am
@@ -110,7 +110,7 @@ endif
# Hack for Cygwin # Hack for Cygwin
@ -20,9 +24,11 @@
# C/C++ header files for Cilk. # C/C++ header files for Cilk.
# cilkincludedir = $(includedir)/cilk # cilkincludedir = $(includedir)/cilk
--- gcc-5.3.0/libcilkrts/Makefile.in 2014-08-12 06:06:44.000000000 -0500 diff --git a/libcilkrts/Makefile.in b/libcilkrts/Makefile.in
+++ gcc-5.3.0/libcilkrts/Makefile.in 2016-02-02 01:35:52.560646600 -0600 index a25d1c6..cee2ee5 100644
@@ -312,6 +312,7 @@ --- a/libcilkrts/Makefile.in
+++ b/libcilkrts/Makefile.in
@@ -340,6 +340,7 @@ link_cilkrts = @link_cilkrts@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_cv_dlopen_libs = @lt_cv_dlopen_libs@ lt_cv_dlopen_libs = @lt_cv_dlopen_libs@
@ -30,7 +36,7 @@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@ multi_basedir = @multi_basedir@
@@ -396,7 +397,7 @@ @@ -426,7 +427,7 @@ CILK_REVISION = 3902
# Hack for Cygwin # Hack for Cygwin
libcilkrts_la_LDFLAGS = -version-info 5:0:0 @lt_cv_dlopen_libs@ \ libcilkrts_la_LDFLAGS = -version-info 5:0:0 @lt_cv_dlopen_libs@ \
@ -39,9 +45,11 @@
# C/C++ header files for Cilk. # C/C++ header files for Cilk.
# cilkincludedir = $(includedir)/cilk # cilkincludedir = $(includedir)/cilk
--- gcc-5.3.0/libcilkrts/aclocal.m4 2015-12-04 04:47:53.000000000 -0600 diff --git a/libcilkrts/aclocal.m4 b/libcilkrts/aclocal.m4
+++ gcc-5.3.0/libcilkrts/aclocal.m4 2016-02-02 01:36:07.265013900 -0600 index a468681..8a7ddf6 100644
@@ -970,6 +970,7 @@ --- a/libcilkrts/aclocal.m4
+++ b/libcilkrts/aclocal.m4
@@ -990,6 +990,7 @@ AC_SUBST([am__untar])
m4_include([../config/depstand.m4]) m4_include([../config/depstand.m4])
m4_include([../config/lead-dot.m4]) m4_include([../config/lead-dot.m4])
@ -49,9 +57,11 @@
m4_include([../config/multi.m4]) m4_include([../config/multi.m4])
m4_include([../config/override.m4]) m4_include([../config/override.m4])
m4_include([../libtool.m4]) m4_include([../libtool.m4])
--- gcc-5.3.0/libcilkrts/configure 2015-01-26 16:54:31.000000000 -0600 diff --git a/libcilkrts/configure b/libcilkrts/configure
+++ gcc-5.3.0/libcilkrts/configure 2016-02-02 01:38:32.848000500 -0600 index 4e1d459..c8a7e3e 100644
@@ -610,6 +610,7 @@ --- a/libcilkrts/configure
+++ b/libcilkrts/configure
@@ -610,6 +610,7 @@ XCFLAGS
lt_cv_dlopen_libs lt_cv_dlopen_libs
toolexeclibdir toolexeclibdir
toolexecdir toolexecdir
@ -59,7 +69,7 @@
CXXCPP CXXCPP
OTOOL64 OTOOL64
OTOOL OTOOL
@@ -9032,7 +9033,7 @@ @@ -9036,7 +9037,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 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' 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 else
@ -68,25 +78,7 @@
fi fi
aix_use_runtimelinking=no aix_use_runtimelinking=no
@@ -11060,7 +11061,7 @@ @@ -13522,7 +13523,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
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 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' 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 else
@ -95,12 +87,10 @@
fi fi
;; ;;
pw32*) pw32*)
@@ -14420,6 +14421,28 @@ @@ -14426,6 +14427,28 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+case $host in +case $host in
+ *-cygwin* | *-mingw*) + *-cygwin* | *-mingw*)
+ # 'host' will be top-level target in the case of a target lib, + # 'host' will be top-level target in the case of a target lib,
@ -120,13 +110,17 @@
+ +
+ +
+ +
+
+
+ +
# Check to see if -pthread or -lpthread is needed. Prefer the former.
--- gcc-5.3.0/libcilkrts/configure.ac 2015-01-26 16:54:31.000000000 -0600 diff --git a/libcilkrts/configure.ac b/libcilkrts/configure.ac
+++ gcc-5.3.0/libcilkrts/configure.ac 2016-02-02 01:36:52.100207200 -0600 index 8ad647e..af999a0 100644
@@ -160,6 +160,7 @@ --- a/libcilkrts/configure.ac
+++ b/libcilkrts/configure.ac
@@ -160,6 +160,7 @@ AM_CONDITIONAL(MAC_LINKER_SCRIPT, test "$mac_linker_script" = "yes")
AC_LIBTOOL_DLOPEN AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL AM_PROG_LIBTOOL

View File

@ -1,40 +0,0 @@
--- gcc-5.3.0/config/mt-cygwin 1969-12-31 18:00:00.000000000 -0600
+++ gcc-5.3.0/config/mt-cygwin 2016-02-04 01:48:00.058340400 -0600
@@ -0,0 +1 @@
+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
--- gcc-5.3.0/configure.ac 2015-05-03 12:29:57.000000000 -0500
+++ 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"
;;
--- gcc-5.3.0/configure 2015-05-03 12:29:57.000000000 -0500
+++ 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"
;;
--- gcc-5.3.0/gcc/config/i386/cygwin.h 2016-02-03 16:49:24.261755400 -0600
+++ 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)

View File

@ -1,26 +0,0 @@
https://cygwin.com/ml/cygwin/2016-02/msg00393.html
--- a/gcc/config/i386/cygwin.h 2016-02-11 17:21:55.058829500 -0600
+++ b/gcc/config/i386/cygwin.h 2016-02-25 11:48:51.241207300 -0600
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3.
#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} \
@@ -56,6 +55,13 @@
fvtable-verify=std:vtv_end.o%s} \
crtend.o%s"
+#undef STANDARD_STARTFILE_PREFIX
+#define STANDARD_STARTFILE_PREFIX "/usr/lib/"
+#undef STANDARD_STARTFILE_PREFIX_1
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+#undef STANDARD_STARTFILE_PREFIX_2
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/w32api/"
+
/* Normally, -lgcc is not needed since everything in it is in the DLL, but we
want to allow things to be added to it when installing new versions of
GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled

View File

@ -0,0 +1,28 @@
This was just a bit outdated...
--- gcc-5.3.0/libstdc++-v3/acinclude.m4 2015-11-24 07:25:07.000000000 -0600
+++ gcc-5.3.0/libstdc++-v3/acinclude.m4 2016-04-01 00:21:40.077426000 -0500
@@ -1196,7 +1196,10 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME]
case "${target_os}" in
cygwin*)
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
;;
darwin*)
ac_has_nanosleep=yes
--- gcc-5.3.0/libstdc++-v3/configure 2016-03-31 21:24:38.558164300 -0500
+++ gcc-5.3.0/libstdc++-v3/configure 2016-04-01 00:26:14.110723800 -0500
@@ -19632,7 +19632,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
case "${target_os}" in
cygwin*)
+ ac_has_clock_monotonic=yes
+ ac_has_clock_realtime=yes
ac_has_nanosleep=yes
+ ac_has_sched_yield=yes
;;
darwin*)
ac_has_nanosleep=yes

View File

@ -1,112 +0,0 @@
From 38274147bb2a3fa481d0a1853c185c2337550260 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Mon, 17 Aug 2015 22:57:46 +0100
Subject: [PATCH 22/22] clone_function_name_1: Retain any stdcall suffix
Previously, clone_function_name_1 would add a suffix after
any existing stdcall suffix, for example ipa-split.c would
clone test@4 as test@4.part.0.
Later, i386_pe_strip_name_encoding_full would come along
and strip off everything from the last @ onwards which had
the effect of generating incorrect section names which
would then fall over with errors such as:
error: void test() causes a section type conflict with \
void test@4.part.0()
The following testcase, reduced from Firefox can be used
to reproduce this.
test.ii:
class ClassA {
public:
virtual int __attribute__((__stdcall__)) Dispatch() = 0;
};
class ClassB {
public:
ClassA* __attribute__((__stdcall__)) operator->();
};
class ClassC : ClassA {
int *some_int_ptr_variable;
int __attribute__((__stdcall__)) Dispatch() {
return some_int_ptr_variable
? 42
: m_ClassInstanceB->Dispatch();
}
ClassB m_ClassInstanceB;
};
ClassC ClassInstanceC;
Compile for i686-w64-mingw32 with:
cc1plus -O -fpartial-inlining -fdevirtualize \
-fdevirtualize-speculatively test.ii
Outputs:
test.ii: In member function 'virtual int ClassC::Dispatch()':
test.ii:11:36: error: virtual int ClassC::Dispatch() causes \
a section type conflict with int ClassC::_ZN6ClassC8DispatchEv@4.part.0()
int __attribute__((CALLTYPE)) Dispatch() {
^
test.ii:11:36: note: \
'int ClassC::_ZN6ClassC8DispatchEv@4.part.0()' was declared here
---
gcc/cgraphclones.c | 13 ++++++++++++-
gcc/defaults.h | 2 +-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index 9e9f1a0..69b8a91 100644
--- a/gcc/cgraphclones.c
+++ b/gcc/cgraphclones.c
@@ -519,15 +519,24 @@ cgraph_node::create_clone (tree new_decl, gcov_type gcov_count, int freq,
static GTY(()) unsigned int clone_fn_id_num;
/* Return a new assembler name for a clone with SUFFIX of a decl named
- NAME. */
+ NAME. Final stdcall @N suffixes are maintained. */
tree
clone_function_name_1 (const char *name, const char *suffix)
{
size_t len = strlen (name);
char *tmp_name, *prefix;
+ char *at_suffix = NULL;
prefix = XALLOCAVEC (char, len + strlen (suffix) + 2);
+ /* name + 1 to skip fastcall which begins with '@' */
+ at_suffix = strchr (name + 1, '@');
+ size_t at_suffix_len = 0;
+ if (at_suffix)
+ {
+ at_suffix_len = strlen (at_suffix);
+ len -= at_suffix_len;
+ }
memcpy (prefix, name, len);
strcpy (prefix + len + 1, suffix);
#ifndef NO_DOT_IN_LABEL
@@ -538,6 +547,8 @@ clone_function_name_1 (const char *name, const char *suffix)
prefix[len] = '_';
#endif
ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix, clone_fn_id_num++);
+ if (at_suffix)
+ strcat (tmp_name, at_suffix);
return get_identifier (tmp_name);
}
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 9d38ba1..c34478a 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -51,7 +51,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
do { const char *const name_ = (NAME); \
char *const output_ = (OUTPUT) = \
- (char *) alloca (strlen (name_) + 32); \
+ (char *) alloca (strlen (name_) + 35); \
sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \
} while (0)
#endif
--
2.5.0

View File

@ -1,13 +1,20 @@
--- gcc-4.8.2/libgfortran/Makefile.am.orig 2012-03-26 19:16:05.000000000 +0400 From cfe4caf51c829a6bd746566a0b205354fa042dc3 Mon Sep 17 00:00:00 2001
+++ gcc-4.8.2/libgfortran/Makefile.am 2014-02-04 18:27:07.860182173 +0400 From: Alexey Pavlov <alexey.pawlow@gmail.com>
@@ -44,13 +44,13 @@ Date: Wed, 5 Aug 2015 23:36:19 +0100
myexeclib_LTLIBRARIES = libgfortranbegin.la Subject: [PATCH 08/15] Prettify linking -no-undefined
myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
libgfortranbegin_la_SOURCES = fmain.c
-libgfortranbegin_la_LDFLAGS = -static
+libgfortranbegin_la_LDFLAGS = -static -no-undefined
libgfortranbegin_la_LINK = $(LINK) $(libgfortranbegin_la_LDFLAGS)
It might be better to put this change in a
conditional block for Windows only?
---
libgfortran/Makefile.am | 2 +-
libgfortran/Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
index 31eb986..f8ef020 100644
--- a/libgfortran/Makefile.am
+++ b/libgfortran/Makefile.am
@@ -50,7 +50,7 @@ libgfortranbegin_la_LINK = $(LINK) $(libgfortranbegin_la_LDFLAGS)
cafexeclib_LTLIBRARIES = libcaf_single.la cafexeclib_LTLIBRARIES = libcaf_single.la
cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
libcaf_single_la_SOURCES = caf/single.c libcaf_single_la_SOURCES = caf/single.c
@ -16,15 +23,11 @@
libcaf_single_la_DEPENDENCIES = caf/libcaf.h libcaf_single_la_DEPENDENCIES = caf/libcaf.h
libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS) libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS)
--- gcc-4.9.0/libgfortran/Makefile.in.orig 2014-04-22 13:44:36.000000000 +0400 diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in
+++ gcc-4.9.0/libgfortran/Makefile.in 2014-05-01 03:42:16.262620606 +0400 index 0f60e6e..8473026 100644
@@ -508,12 +508,12 @@ --- a/libgfortran/Makefile.in
myexeclib_LTLIBRARIES = libgfortranbegin.la +++ b/libgfortran/Makefile.in
myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) @@ -615,7 +615,7 @@ libgfortranbegin_la_LINK = $(LINK) $(libgfortranbegin_la_LDFLAGS)
libgfortranbegin_la_SOURCES = fmain.c
-libgfortranbegin_la_LDFLAGS = -static
+libgfortranbegin_la_LDFLAGS = -static -no-undefined
libgfortranbegin_la_LINK = $(LINK) $(libgfortranbegin_la_LDFLAGS)
cafexeclib_LTLIBRARIES = libcaf_single.la cafexeclib_LTLIBRARIES = libcaf_single.la
cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
libcaf_single_la_SOURCES = caf/single.c libcaf_single_la_SOURCES = caf/single.c
@ -32,4 +35,6 @@
+libcaf_single_la_LDFLAGS = -static -no-undefined +libcaf_single_la_LDFLAGS = -static -no-undefined
libcaf_single_la_DEPENDENCIES = caf/libcaf.h libcaf_single_la_DEPENDENCIES = caf/libcaf.h
libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS) libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS)
AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \ @IEEE_SUPPORT_TRUE@fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude
--
2.8.1

View File

@ -1,13 +0,0 @@
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index cd0be4e..759dcfb 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -1513,7 +1513,7 @@ CXXABI_1.3.6 {
__cxa_allocate_dependent_exception;
__cxa_free_dependent_exception;
__cxa_deleted_virtual;
-
+ _ZTC*;
} CXXABI_1.3.5;

View File

@ -1,36 +0,0 @@
Relevant references:
https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00409.html
http://gcc.gcc.gnu.narkive.com/RMY4RcbE/asm-output-section-name-cleanup-patch-problem
diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c
index c737620..e5ab209 100644
--- a/libgcc/libgcc2.c
+++ b/libgcc/libgcc2.c
@@ -2211,7 +2211,7 @@ TRANSFER_FROM_TRAMPOLINE
/* Some ELF crosses use crtstuff.c to provide __CTOR_LIST__, but use this
code to run constructors. In that case, we need to handle EH here, too. */
-#ifdef __LIBGCC_EH_FRAME_SECTION_NAME__
+#ifdef EH_FRAME_SECTION_NAME
#include "unwind-dw2-fde.h"
extern unsigned char __EH_FRAME_BEGIN__[];
#endif
@@ -2231,7 +2231,7 @@ __do_global_dtors (void)
(*(p-1)) ();
}
#endif
-#if defined (__LIBGCC_EH_FRAME_SECTION_NAME__) && !defined (HAS_INIT_SECTION)
+#if defined (EH_FRAME_SECTION_NAME) && !defined (HAS_INIT_SECTION)
{
static int completed = 0;
if (! completed)
@@ -2250,7 +2250,7 @@ __do_global_dtors (void)
void
__do_global_ctors (void)
{
-#ifdef __LIBGCC_EH_FRAME_SECTION_NAME__
+#ifdef EH_FRAME_SECTION_NAME
{
static struct object object;
__register_frame_info (__EH_FRAME_BEGIN__, &object);

View File

@ -0,0 +1,44 @@
From d8cd8d0211dcd606a3753a6b3c36c19a7b1672dc Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 5 Aug 2015 23:36:13 +0100
Subject: [PATCH 05/19] master Windows: New feature to allow overriding
-lmsvcrt
Added in support of the MinGW-w64 WIP feature "agile mscvrt dll" where
a process' loaded msvc runtime is used by a newly loaded DLL rather than
always using msvcrt.dll
---
gcc/config/i386/cygming.opt | 3 +++
gcc/config/i386/mingw32.h | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt
index a9074bf..e1d89e2 100644
--- a/gcc/config/i386/cygming.opt
+++ b/gcc/config/i386/cygming.opt
@@ -22,6 +22,9 @@ mconsole
Target RejectNegative
Create console application.
+mcrtdll=
+Target RejectNegative Joined
+
mdll
Target RejectNegative
Generate code for a DLL.
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index 4ac5f68..f875e7b 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -140,7 +140,7 @@ along with GCC; see the file COPYING3. If not see
#define REAL_LIBGCC_SPEC \
"%{mthreads:-lmingwthrd} -lmingw32 \
" SHARED_LIBGCC_SPEC " \
- -lmoldname -lmingwex -lmsvcrt"
+ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
--
2.7.1

View File

@ -1,5 +1,25 @@
From 22a67f6b18d2854bcdf740833cf4e1a0555c7295 Mon Sep 17 00:00:00 2001
From: Martin Richter <xricht17@stud.fit.vutbr.cz>
Date: Wed, 5 Aug 2015 23:36:25 +0100
Subject: [PATCH 10/15] Fix using large PCH
The following patch fixes segfault when gt_pch_use_address
fails (returns -1). fatal_error now correctly shows an error
message and terminates the program.
I have basicly only reordered reads, and placed them after
the file mapping itself. Global pointers are changed only
after gt_pch_use_address succeeds, so in case of failure
they still contain valid addresses.
This patch is meant for the master branch. However, it
should not be hard to modify it for others.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14940 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14940
https://sourceforge.net/p/mingw-w64/bugs/382/ https://sourceforge.net/p/mingw-w64/bugs/382/
---
gcc/config/i386/host-mingw32.c | 10 ++-------
gcc/ggc-common.c | 51 +++++++++++++++++++++++++++++++++---------
2 files changed, 42 insertions(+), 19 deletions(-)
diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c diff --git a/gcc/config/i386/host-mingw32.c b/gcc/config/i386/host-mingw32.c
index aa17378..631d9c4 100644 index aa17378..631d9c4 100644
@ -44,10 +64,10 @@ index aa17378..631d9c4 100644
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 5096837..f741f2c 100644 index 03fbe7d..3a5df8a 100644
--- a/gcc/ggc-common.c --- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c +++ b/gcc/ggc-common.c
@@ -599,7 +599,9 @@ gt_pch_restore (FILE *f) @@ -603,7 +603,9 @@ gt_pch_restore (FILE *f)
size_t i; size_t i;
struct mmap_info mmi; struct mmap_info mmi;
int result; int result;
@ -58,7 +78,7 @@ index 5096837..f741f2c 100644
/* Delete any deletable objects. This makes ggc_pch_read much /* Delete any deletable objects. This makes ggc_pch_read much
faster, as it can be sure that no GCable objects remain other faster, as it can be sure that no GCable objects remain other
than the ones just read in. */ than the ones just read in. */
@@ -607,20 +609,24 @@ gt_pch_restore (FILE *f) @@ -611,20 +613,24 @@ gt_pch_restore (FILE *f)
for (rti = *rt; rti->base != NULL; rti++) for (rti = *rt; rti->base != NULL; rti++)
memset (rti->base, 0, rti->stride); memset (rti->base, 0, rti->stride);
@ -91,7 +111,7 @@ index 5096837..f741f2c 100644
if (fread (&mmi, sizeof (mmi), 1, f) != 1) if (fread (&mmi, sizeof (mmi), 1, f) != 1)
fatal_error (input_location, "can%'t read PCH file: %m"); fatal_error (input_location, "can%'t read PCH file: %m");
@@ -631,12 +637,35 @@ gt_pch_restore (FILE *f) @@ -635,12 +641,35 @@ gt_pch_restore (FILE *f)
if (result == 0) if (result == 0)
{ {
if (fseek (f, mmi.offset, SEEK_SET) != 0 if (fseek (f, mmi.offset, SEEK_SET) != 0
@ -129,3 +149,6 @@ index 5096837..f741f2c 100644
ggc_pch_read (f, mmi.preferred_base); ggc_pch_read (f, mmi.preferred_base);
gt_pch_restore_stringpool (); gt_pch_restore_stringpool ();
--
2.8.1

View File

@ -0,0 +1,10 @@
--- gcc-6.1.0/libstdc++-v3/config/os/mingw32-w64/os_defines.h.orig 2016-01-04 14:30:49.999997000 +0000
+++ gcc-6.1.0/libstdc++-v3/config/os/mingw32-w64/os_defines.h 2016-07-24 20:45:37.352669700 +0100
@@ -76,6 +76,7 @@
#ifdef __x86_64__
#define _GLIBCXX_LLP64 1
+#define _GLIBCXX_USE_WEAK_REF 0
#endif
// Enable use of GetModuleHandleEx (requires Windows XP/2003) in

View File

@ -1,6 +1,6 @@
diff -Naur gcc-5.3.0-orig/gcc/config/i386/msys.h gcc-5.3.0/gcc/config/i386/msys.h diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys.h gcc-6.3.0/gcc/config/i386/msys.h
--- gcc-5.3.0-orig/gcc/config/i386/msys.h 1970-01-01 03:00:00.000000000 +0300 --- gcc-6.3.0-orig/gcc/config/i386/msys.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-5.3.0/gcc/config/i386/msys.h 2016-03-28 10:26:33.050945600 +0300 +++ gcc-6.3.0/gcc/config/i386/msys.h 2017-01-24 12:04:34.338454000 +0300
@@ -0,0 +1,175 @@ @@ -0,0 +1,175 @@
+/* Operating system specific defines to be used when targeting GCC for +/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows32, using a Unix style C library and tools. + hosting on Windows32, using a Unix style C library and tools.
@ -177,9 +177,9 @@ diff -Naur gcc-5.3.0-orig/gcc/config/i386/msys.h gcc-5.3.0/gcc/config/i386/msys.
+#define HAVE_ENABLE_EXECUTE_STACK +#define HAVE_ENABLE_EXECUTE_STACK
+#undef CHECK_EXECUTE_STACK_ENABLED +#undef CHECK_EXECUTE_STACK_ENABLED
+#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable +#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable
diff -Naur gcc-5.3.0-orig/gcc/config/i386/msys-w64.h gcc-5.3.0/gcc/config/i386/msys-w64.h diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys-w64.h gcc-6.3.0/gcc/config/i386/msys-w64.h
--- gcc-5.3.0-orig/gcc/config/i386/msys-w64.h 1970-01-01 03:00:00.000000000 +0300 --- gcc-6.3.0-orig/gcc/config/i386/msys-w64.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-5.3.0/gcc/config/i386/msys-w64.h 2016-03-28 10:26:33.066945600 +0300 +++ gcc-6.3.0/gcc/config/i386/msys-w64.h 2017-01-24 12:04:34.354054000 +0300
@@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
+/* Operating system specific defines to be used when targeting GCC for +/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows 32/64 via MSYS runtime, using GNU tools and + hosting on Windows 32/64 via MSYS runtime, using GNU tools and
@ -265,17 +265,17 @@ diff -Naur gcc-5.3.0-orig/gcc/config/i386/msys-w64.h gcc-5.3.0/gcc/config/i386/m
+ +
+#undef LIBGCC_SONAME +#undef LIBGCC_SONAME
+#define LIBGCC_SONAME "msys-gcc_s-seh-1.dll" +#define LIBGCC_SONAME "msys-gcc_s-seh-1.dll"
diff -Naur gcc-5.3.0-orig/gcc/config/i386/t-msys-w64 gcc-5.3.0/gcc/config/i386/t-msys-w64 diff -Naur gcc-6.3.0-orig/gcc/config/i386/t-msys-w64 gcc-6.3.0/gcc/config/i386/t-msys-w64
--- gcc-5.3.0-orig/gcc/config/i386/t-msys-w64 1970-01-01 03:00:00.000000000 +0300 --- gcc-6.3.0-orig/gcc/config/i386/t-msys-w64 1970-01-01 03:00:00.000000000 +0300
+++ gcc-5.3.0/gcc/config/i386/t-msys-w64 2016-03-28 10:26:33.104945600 +0300 +++ gcc-6.3.0/gcc/config/i386/t-msys-w64 2017-01-24 12:04:34.354054000 +0300
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
+MULTILIB_OPTIONS = m64/m32 +MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64 +MULTILIB_DIRNAMES = 64
+MULTILIB_OSDIRNAMES = ../lib ../lib32 +MULTILIB_OSDIRNAMES = ../lib ../lib32
diff -Naur gcc-5.3.0-orig/gcc/config.build gcc-5.3.0/gcc/config.build diff -Naur gcc-6.3.0-orig/gcc/config.build gcc-6.3.0/gcc/config.build
--- gcc-5.3.0-orig/gcc/config.build 2015-01-05 15:33:28.000000000 +0300 --- gcc-6.3.0-orig/gcc/config.build 2016-01-04 17:30:50.000000000 +0300
+++ gcc-5.3.0/gcc/config.build 2016-03-28 10:26:33.117945600 +0300 +++ gcc-6.3.0/gcc/config.build 2017-01-24 12:04:34.354054000 +0300
@@ -64,6 +64,10 @@ @@ -60,6 +60,10 @@
build_xm_file=i386/xm-cygwin.h build_xm_file=i386/xm-cygwin.h
build_exeext=.exe build_exeext=.exe
;; ;;
@ -286,10 +286,10 @@ diff -Naur gcc-5.3.0-orig/gcc/config.build gcc-5.3.0/gcc/config.build
i[34567]86-*-mingw32* | x86_64-*-mingw*) i[34567]86-*-mingw32* | x86_64-*-mingw*)
build_xm_file=i386/xm-mingw32.h build_xm_file=i386/xm-mingw32.h
build_exeext=.exe build_exeext=.exe
diff -Naur gcc-5.3.0-orig/gcc/config.gcc gcc-5.3.0/gcc/config.gcc diff -Naur gcc-6.3.0-orig/gcc/config.gcc gcc-6.3.0/gcc/config.gcc
--- gcc-5.3.0-orig/gcc/config.gcc 2016-03-28 10:22:09.874786400 +0300 --- gcc-6.3.0-orig/gcc/config.gcc 2017-01-24 12:01:43.334712400 +0300
+++ gcc-5.3.0/gcc/config.gcc 2016-03-28 10:26:33.163945600 +0300 +++ gcc-6.3.0/gcc/config.gcc 2017-01-24 12:04:34.354054000 +0300
@@ -1645,6 +1645,37 @@ @@ -1702,6 +1702,37 @@
use_gcc_stdint=wrap use_gcc_stdint=wrap
tm_defines="${tm_defines} TARGET_CYGWIN64=1" tm_defines="${tm_defines} TARGET_CYGWIN64=1"
;; ;;
@ -327,7 +327,7 @@ diff -Naur gcc-5.3.0-orig/gcc/config.gcc gcc-5.3.0/gcc/config.gcc
i[34567]86-*-mingw* | x86_64-*-mingw*) i[34567]86-*-mingw* | x86_64-*-mingw*)
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h" tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
xm_file=i386/xm-mingw32.h xm_file=i386/xm-mingw32.h
@@ -4250,6 +4281,8 @@ @@ -4420,6 +4451,8 @@
;; ;;
i[34567]86-*-cygwin* | x86_64-*-cygwin*) i[34567]86-*-cygwin* | x86_64-*-cygwin*)
;; ;;
@ -336,10 +336,10 @@ diff -Naur gcc-5.3.0-orig/gcc/config.gcc gcc-5.3.0/gcc/config.gcc
i[34567]86-*-mingw* | x86_64-*-mingw*) i[34567]86-*-mingw* | x86_64-*-mingw*)
;; ;;
i[34567]86-*-dragonfly* | x86_64-*-dragonfly*) i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
diff -Naur gcc-5.3.0-orig/gcc/config.host gcc-5.3.0/gcc/config.host diff -Naur gcc-6.3.0-orig/gcc/config.host gcc-6.3.0/gcc/config.host
--- gcc-5.3.0-orig/gcc/config.host 2016-03-28 10:19:31.986048600 +0300 --- gcc-6.3.0-orig/gcc/config.host 2017-01-24 11:59:20.670797800 +0300
+++ gcc-5.3.0/gcc/config.host 2016-03-28 10:26:33.205945600 +0300 +++ gcc-6.3.0/gcc/config.host 2017-01-24 12:04:34.369654000 +0300
@@ -221,6 +221,13 @@ @@ -234,6 +234,13 @@
host_exeext=.exe host_exeext=.exe
host_lto_plugin_soname=cyglto_plugin.dll host_lto_plugin_soname=cyglto_plugin.dll
;; ;;
@ -353,9 +353,9 @@ diff -Naur gcc-5.3.0-orig/gcc/config.host gcc-5.3.0/gcc/config.host
i[34567]86-*-mingw32*) i[34567]86-*-mingw32*)
host_xm_file=i386/xm-mingw32.h host_xm_file=i386/xm-mingw32.h
host_xmake_file="${host_xmake_file} i386/x-mingw32" host_xmake_file="${host_xmake_file} i386/x-mingw32"
diff -Naur gcc-5.3.0-orig/libgcc/config/i386/t-msys gcc-5.3.0/libgcc/config/i386/t-msys diff -Naur gcc-6.3.0-orig/libgcc/config/i386/t-msys gcc-6.3.0/libgcc/config/i386/t-msys
--- gcc-5.3.0-orig/libgcc/config/i386/t-msys 1970-01-01 03:00:00.000000000 +0300 --- gcc-6.3.0-orig/libgcc/config/i386/t-msys 1970-01-01 03:00:00.000000000 +0300
+++ gcc-5.3.0/libgcc/config/i386/t-msys 2016-03-28 10:26:33.229945600 +0300 +++ gcc-6.3.0/libgcc/config/i386/t-msys 2017-01-24 12:04:34.385254000 +0300
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
+# If we are building next to winsup, this will let us find the real +# If we are building next to winsup, this will let us find the real
+# limits.h when building libgcc2. Otherwise, winsup must be installed +# limits.h when building libgcc2. Otherwise, winsup must be installed
@ -376,10 +376,10 @@ diff -Naur gcc-5.3.0-orig/libgcc/config/i386/t-msys gcc-5.3.0/libgcc/config/i386
+# We'd like to use SHLIB_SONAME here too, and we can, since +# We'd like to use SHLIB_SONAME here too, and we can, since
+# we don't rely on shlib_base_name substitution for it. +# we don't rely on shlib_base_name substitution for it.
+SHLIB_MKMAP_OPTS = -v pe_dll=$(SHLIB_SONAME) +SHLIB_MKMAP_OPTS = -v pe_dll=$(SHLIB_SONAME)
diff -Naur gcc-5.3.0-orig/libgcc/config.host gcc-5.3.0/libgcc/config.host diff -Naur gcc-6.3.0-orig/libgcc/config.host gcc-6.3.0/libgcc/config.host
--- gcc-5.3.0-orig/libgcc/config.host 2016-03-28 10:16:04.888809100 +0300 --- gcc-6.3.0-orig/libgcc/config.host 2017-01-24 11:56:37.708704400 +0300
+++ gcc-5.3.0/libgcc/config.host 2016-03-28 10:26:33.282945600 +0300 +++ gcc-6.3.0/libgcc/config.host 2017-01-24 12:04:34.385254000 +0300
@@ -319,6 +319,9 @@ @@ -324,6 +324,9 @@
i[34567]86-*-cygwin* | x86_64-*-cygwin*) i[34567]86-*-cygwin* | x86_64-*-cygwin*)
enable_execute_stack=config/i386/enable-execute-stack-mingw32.c enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
;; ;;
@ -389,9 +389,9 @@ diff -Naur gcc-5.3.0-orig/libgcc/config.host gcc-5.3.0/libgcc/config.host
*) *)
enable_execute_stack=enable-execute-stack-empty.c; enable_execute_stack=enable-execute-stack-empty.c;
;; ;;
@@ -673,6 +676,45 @@ @@ -698,6 +701,45 @@
# FIXME - dj - t-chkstk used to be in here, need a 64-bit version of that # FIXME - dj - t-chkstk used to be in here, need a 64-bit version of that
tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin i386/t-crtfm t-dfprules i386/t-chkstk" tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin t-crtfm t-dfprules i386/t-chkstk"
;; ;;
+i[34567]86-*-msys*) +i[34567]86-*-msys*)
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
@ -435,7 +435,7 @@ diff -Naur gcc-5.3.0-orig/libgcc/config.host gcc-5.3.0/libgcc/config.host
i[34567]86-*-mingw*) i[34567]86-*-mingw*)
extra_parts="crtbegin.o crtend.o crtfastmath.o" extra_parts="crtbegin.o crtend.o crtfastmath.o"
if test x$enable_vtable_verify = xyes; then if test x$enable_vtable_verify = xyes; then
@@ -1330,6 +1372,7 @@ @@ -1377,6 +1419,7 @@
i[34567]86-*-gnu* | \ i[34567]86-*-gnu* | \
i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \ i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
i[34567]86-*-cygwin* | x86_64-*-cygwin* | \ i[34567]86-*-cygwin* | x86_64-*-cygwin* | \

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
diff -Naur gcc-5.3.0-orig/gcc/config/i386/cygwin.h gcc-5.3.0/gcc/config/i386/cygwin.h diff -Naur gcc-6.3.0-orig/gcc/config/i386/cygwin.h gcc-6.3.0/gcc/config/i386/cygwin.h
--- gcc-5.3.0-orig/gcc/config/i386/cygwin.h 2016-03-28 10:25:58.670904500 +0300 --- gcc-6.3.0-orig/gcc/config/i386/cygwin.h 2017-01-24 11:59:41.138236300 +0300
+++ gcc-5.3.0/gcc/config/i386/cygwin.h 2016-03-28 10:27:41.084945600 +0300 +++ gcc-6.3.0/gcc/config/i386/cygwin.h 2017-01-24 12:05:25.522747400 +0300
@@ -62,6 +62,10 @@ @@ -56,6 +56,10 @@
#undef STANDARD_STARTFILE_PREFIX_2 fvtable-verify=std:vtv_end.o%s} \
#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/w32api/" crtend.o%s"
+/* There is a bug when building i686 dw-2 exceptions +/* There is a bug when building i686 dw-2 exceptions
+ where gcc_s gets stripped which this works around */ + where gcc_s gets stripped which this works around */
@ -12,7 +12,7 @@ diff -Naur gcc-5.3.0-orig/gcc/config/i386/cygwin.h gcc-5.3.0/gcc/config/i386/cyg
/* Normally, -lgcc is not needed since everything in it is in the DLL, but we /* Normally, -lgcc is not needed since everything in it is in the DLL, but we
want to allow things to be added to it when installing new versions of want to allow things to be added to it when installing new versions of
GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled
@@ -72,7 +76,7 @@ @@ -66,7 +70,7 @@
%{static|static-libgcc:-lgcc -lgcc_eh} \ %{static|static-libgcc:-lgcc -lgcc_eh} \
%{!static: \ %{!static: \
%{!static-libgcc: \ %{!static-libgcc: \
@ -21,9 +21,9 @@ diff -Naur gcc-5.3.0-orig/gcc/config/i386/cygwin.h gcc-5.3.0/gcc/config/i386/cyg
} \ } \
} " } "
#else #else
diff -Naur gcc-5.3.0-orig/gcc/config/i386/mingw32.h gcc-5.3.0/gcc/config/i386/mingw32.h diff -Naur gcc-6.3.0-orig/gcc/config/i386/mingw32.h gcc-6.3.0/gcc/config/i386/mingw32.h
--- gcc-5.3.0-orig/gcc/config/i386/mingw32.h 2015-01-29 11:03:56.000000000 +0300 --- gcc-6.3.0-orig/gcc/config/i386/mingw32.h 2016-04-08 16:47:37.000000000 +0300
+++ gcc-5.3.0/gcc/config/i386/mingw32.h 2016-03-28 10:27:41.098945600 +0300 +++ gcc-6.3.0/gcc/config/i386/mingw32.h 2017-01-24 12:05:25.538347400 +0300
@@ -120,6 +120,10 @@ @@ -120,6 +120,10 @@
%{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \ %{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \
%(shared_libgcc_undefs)" %(shared_libgcc_undefs)"
@ -47,9 +47,9 @@ diff -Naur gcc-5.3.0-orig/gcc/config/i386/mingw32.h gcc-5.3.0/gcc/config/i386/mi
} \ } \
} " } "
#else #else
diff -Naur gcc-5.3.0-orig/gcc/config/i386/msys.h gcc-5.3.0/gcc/config/i386/msys.h diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys.h gcc-6.3.0/gcc/config/i386/msys.h
--- gcc-5.3.0-orig/gcc/config/i386/msys.h 2016-03-28 10:26:55.135945600 +0300 --- gcc-6.3.0-orig/gcc/config/i386/msys.h 2017-01-24 12:04:53.694488600 +0300
+++ gcc-5.3.0/gcc/config/i386/msys.h 2016-03-28 10:27:41.109945600 +0300 +++ gcc-6.3.0/gcc/config/i386/msys.h 2017-01-24 12:05:25.538347400 +0300
@@ -63,6 +63,10 @@ @@ -63,6 +63,10 @@
#undef STANDARD_STARTFILE_PREFIX_2 #undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/w32api/" #define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/w32api/"

View File

@ -3,7 +3,7 @@
_realname=gcc _realname=gcc
_mingw_suff=mingw-w64-cross _mingw_suff=mingw-w64-cross
pkgname=("${_mingw_suff}-${_realname}") pkgname=("${_mingw_suff}-${_realname}")
pkgver=5.3.0 pkgver=6.3.0
pkgrel=1 pkgrel=1
pkgdesc="Cross GCC for the MinGW-w64" pkgdesc="Cross GCC for the MinGW-w64"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -39,23 +39,19 @@ source=("https://ftp.gnu.org/gnu/gcc/${_realname}-${pkgver}/${_realname}-${pkgve
0018-prevent-modules-from-being-unloaded-before-their-dto.patch 0018-prevent-modules-from-being-unloaded-before-their-dto.patch
0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch 0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
0020-cygwin-uses-cyg-lib-prefix.patch 0020-cygwin-uses-cyg-lib-prefix.patch
0021-search-usr-lib-w32api-explicitly.patch
0022-libgomp-soname-cygwin-mingw.patch 0022-libgomp-soname-cygwin-mingw.patch
0023-glibcxx-use-c99.patch
0024-libitm-weak-symbols.patch 0024-libitm-weak-symbols.patch
0025-enable-libcilkrts.patch 0025-enable-libcilkrts.patch
0026-g++-gnu-source.patch 0028-g++-time.patch
0027-link-w32api.patch
0100-clone_function_name_1-Retain-any-stdcall-suffix.patch
0240-prettify-linking-no-undefined.mingw.patch 0240-prettify-linking-no-undefined.mingw.patch
0400-gcc-4.8-libstdc++export.patch 0408-gcc-6-branch-Windows-New-feature-to-allow-overriding.patch
0405-dwarf-regression.patch
0410-fix-using-large-pch.patch 0410-fix-using-large-pch.patch
0950-5.2.0-configure-msys2.patch 0415-disable-weak-refs-in-libstdc++.patch
0951-5.2.0-msys2-spec.patch 0950-6.3.0-configure-msys2.patch
0953-5.2.0-testsuite-msys2.patch 0951-6.3.0-msys2-spec.patch
0953-6.3.0-testsuite-msys2.patch
0955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch) 0955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch)
sha256sums=('b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db' sha256sums=('f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f'
'e2f984af582f15bfc3618ae9e428518a67b32749cf6de198b48e9d0534eb278a' 'e2f984af582f15bfc3618ae9e428518a67b32749cf6de198b48e9d0534eb278a'
'52b1725a7710040cde2d418d1374eb84dcc5cc0a0ef26c9038b17c0a811392fd' '52b1725a7710040cde2d418d1374eb84dcc5cc0a0ef26c9038b17c0a811392fd'
'6d15fe75fa6e865cde0334f89953daa76ef40c2c6d767e5880bd810470c1aac7' '6d15fe75fa6e865cde0334f89953daa76ef40c2c6d767e5880bd810470c1aac7'
@ -63,8 +59,8 @@ sha256sums=('b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db'
'128b5288dd7c7aa0107ff6c0e76b3b9dfb30194f30b631c3433721220e92eace' '128b5288dd7c7aa0107ff6c0e76b3b9dfb30194f30b631c3433721220e92eace'
'e199a6f5b6b5a018e323b75919ed9e29f2399752d9de94d166c2e8014492ba26' 'e199a6f5b6b5a018e323b75919ed9e29f2399752d9de94d166c2e8014492ba26'
'a3a01a9a6abdd769ae5c92bd1b8522b728d475397543863db98ae8044c8792d0' 'a3a01a9a6abdd769ae5c92bd1b8522b728d475397543863db98ae8044c8792d0'
'73f44d4343e7e9b0029373784a397f1e063e3802f56bb2dbc0dc2e4e9a3e0537' '7a0ffca76cc01df570750af22b4ebb2aa7e67ae21c4351efcc06586107bdf64d'
'4beb483671c9ee7f0149f0655433568662f0ff450d5140d14e3ef2874d0166a4' 'b77b6045aabba3aaae58d578d0b2ffc56ce70907f39a280fa964c9fcbd88bdad'
'7ad412357429a2e2376ec673d0e0a0d2ab4e3a162db532818bc76d55835f35d6' '7ad412357429a2e2376ec673d0e0a0d2ab4e3a162db532818bc76d55835f35d6'
'5b33a86b8fd2ea98d8ad73dc61d6619bb9e006d5a3ddca4769cec9bca2293d32' '5b33a86b8fd2ea98d8ad73dc61d6619bb9e006d5a3ddca4769cec9bca2293d32'
'79db6a8951c3c07d9df26863a2bcfc607606211f6eb813c156b4f46123ecbbdc' '79db6a8951c3c07d9df26863a2bcfc607606211f6eb813c156b4f46123ecbbdc'
@ -75,22 +71,18 @@ sha256sums=('b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db'
'a277245cf7ccf6e3bd83a79945ff26ea5e41fb3ecf7fe0a473b2ec64d8c5b101' 'a277245cf7ccf6e3bd83a79945ff26ea5e41fb3ecf7fe0a473b2ec64d8c5b101'
'54a0e45c09ac70b7932cde3e86b6156c1fec459c69ece53141921adcb8a75e6e' '54a0e45c09ac70b7932cde3e86b6156c1fec459c69ece53141921adcb8a75e6e'
'11b1b1660723dc880e034ad7e26e5e852e88e27bc6fd17c663a5fbc072c16374' '11b1b1660723dc880e034ad7e26e5e852e88e27bc6fd17c663a5fbc072c16374'
'e0c7f71ad3ce4a060c2b2bd3c94d9352393a700173bd5a1d534044092be88daa'
'00e528e198183799c00167cacc1a7b1cb9505ae93ef89e581632ffaae20080f2' '00e528e198183799c00167cacc1a7b1cb9505ae93ef89e581632ffaae20080f2'
'b68848b7ad50b865e6ab2118f2cf25d3d9d002fdbf251e78002df66cd7090660' '9daf3accc664d5a2b6f93354a1e8807d19c640e627dc2977111aab17b766542e'
'f748b4be4bb3b4645f07cc2fa490ba6723f2e19cb09dd9f779816850b953ae4a' 'e9f3537f851b2f267b4f9196696dc291535c9d8cac62614b676004c39098d734'
'c1b6ff3747e2ad2f2d7b052d48c3a0ccfab58a4141f9c90d0e49a9441d25280f' '041ec7903f3285d28a4c2949fbda7b830e9e32c7883de3649c53bf595df037a0'
'cbad1b7866c351f65e188bd2e8dccc2448c0ce82be01008ac081f3271d707dd9' '018e6ef8f431c0cebbc0c01a7acc28270ba5a827904540f6b5f1c22b4955a1dd'
'c1a0172e24ed45fba1c0bf11deb6a0301e959abd258179d07cdb378837784393' 'd1e10cd2ef5594c34acead334bb93af500e00699ba673edc8916da22a572677d'
'37b5460cfd4635231616af8a555d376faa5b53dba1f7260ca029fc5204218af5' '0decbbebda7ceac91da5d3dec9b7330f406a4358fa150560f08ff6f54739035f'
'a101c40bd4bda743ee65691959e090a2ee6e01456c394a6f45c21f9a39849d5e' '09f27e0dae8d962f2a46a33a9891f2d14303629bb40f91ed8c5824c90da653a9'
'21191b4fd57ce5f230fcc97b4d9ae31bdc387d7c7c8e39436aa7e4268d278d3d' '2d1bff672ef25973d07bf65fb8faa68e769a0b3567798c5cd7bcd3e4dad9dcdb'
'0768864eba737cf7be59e8469d039a2246e015e40ba139cd2d20aa798c3362ef' '1b869205d5671faaa40104abbf1321aaef2275a5c5864dcf934f6239dcb9ab93'
'2309caff9d8683f1f2dacb830a08837b2b61b94456b11d13f99874e4862ab207' '74892ecb48ce89545bc06f013c40e1c04a7d4b71963d8b7f812c92507f3f0222'
'7440974e7a3a9f07da6e1c2b26cbb49f0ec34426079d9a9c7436258695c85a84' '89e00457776fb1cae1b020c6f835012a8617996a0d0710a4b12e9804aeda27df')
'64c021dc7d32ae1b06825baff3fc646d9050c20790e4b05ccaf12eab8c4bcc12'
'5984dcfa19906d1964367f3c8dd6be2253b88b8c172c67db3df712702836d308'
'd033071ab49b0873fa2a1cf3ffbc2bd897ef0d94d68d1e87bc1a97efd22afaed')
_threads="win32" _threads="win32"
_targets="i686-w64-mingw32 x86_64-w64-mingw32" #armv7-w64-mingw32 _targets="i686-w64-mingw32 x86_64-w64-mingw32" #armv7-w64-mingw32
@ -123,25 +115,21 @@ prepare() {
patch -p1 -i ${srcdir}/0018-prevent-modules-from-being-unloaded-before-their-dto.patch patch -p1 -i ${srcdir}/0018-prevent-modules-from-being-unloaded-before-their-dto.patch
patch -p1 -i ${srcdir}/0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch patch -p1 -i ${srcdir}/0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
patch -p1 -i ${srcdir}/0020-cygwin-uses-cyg-lib-prefix.patch patch -p1 -i ${srcdir}/0020-cygwin-uses-cyg-lib-prefix.patch
patch -p1 -i ${srcdir}/0021-search-usr-lib-w32api-explicitly.patch
patch -p1 -i ${srcdir}/0022-libgomp-soname-cygwin-mingw.patch patch -p1 -i ${srcdir}/0022-libgomp-soname-cygwin-mingw.patch
patch -p1 -i ${srcdir}/0023-glibcxx-use-c99.patch
patch -p1 -i ${srcdir}/0024-libitm-weak-symbols.patch patch -p1 -i ${srcdir}/0024-libitm-weak-symbols.patch
patch -p1 -i ${srcdir}/0025-enable-libcilkrts.patch patch -p1 -i ${srcdir}/0025-enable-libcilkrts.patch
patch -p1 -i ${srcdir}/0026-g++-gnu-source.patch patch -p1 -i ${srcdir}/0028-g++-time.patch
patch -p1 -i ${srcdir}/0027-link-w32api.patch
# MINGW patches # MINGW patches
patch -p1 -i ${srcdir}/0100-clone_function_name_1-Retain-any-stdcall-suffix.patch
patch -p1 -i ${srcdir}/0240-prettify-linking-no-undefined.mingw.patch patch -p1 -i ${srcdir}/0240-prettify-linking-no-undefined.mingw.patch
patch -p1 -i ${srcdir}/0400-gcc-4.8-libstdc++export.patch patch -p1 -i ${srcdir}/0408-gcc-6-branch-Windows-New-feature-to-allow-overriding.patch
patch -p1 -i ${srcdir}/0405-dwarf-regression.patch
patch -p1 -i ${srcdir}/0410-fix-using-large-pch.patch patch -p1 -i ${srcdir}/0410-fix-using-large-pch.patch
patch -p1 -i ${srcdir}/0415-disable-weak-refs-in-libstdc++.patch
# MSYS2 Patches # MSYS2 Patches
patch -p1 -i ${srcdir}/0950-5.2.0-configure-msys2.patch patch -p1 -i ${srcdir}/0950-6.3.0-configure-msys2.patch
patch -p1 -i ${srcdir}/0951-5.2.0-msys2-spec.patch patch -p1 -i ${srcdir}/0951-6.3.0-msys2-spec.patch
patch -p1 -i ${srcdir}/0953-5.2.0-testsuite-msys2.patch patch -p1 -i ${srcdir}/0953-6.3.0-testsuite-msys2.patch
patch -p1 -i ${srcdir}/0955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch patch -p1 -i ${srcdir}/0955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch
} }