diff --git a/mingw-w64-gcc-git/0001-Relocate-libintl.patch b/mingw-w64-gcc-git/0001-Relocate-libintl.patch index 484a061674..5031b955fd 100644 --- a/mingw-w64-gcc-git/0001-Relocate-libintl.patch +++ b/mingw-w64-gcc-git/0001-Relocate-libintl.patch @@ -1,7 +1,7 @@ -From 8d421ffee9b324f35390a077c1278a1e31585db9 Mon Sep 17 00:00:00 2001 +From ff4ae68b006fbbbf78360dee0f115a2715bf70d9 Mon Sep 17 00:00:00 2001 From: Erwin Waterlander Date: Wed, 5 Aug 2015 23:36:03 +0100 -Subject: [PATCH 01/21] Relocate libintl +Subject: [PATCH 01/22] Relocate libintl The relocatex-libintl patch adds builtin relocation for executables to the libintl dll. With this patch the programs are automatically relocatable. There diff --git a/mingw-w64-gcc-git/0002-PR54314-Include-_ZTC-in-libstdc-exports-deprecated.patch b/mingw-w64-gcc-git/0002-PR54314-Include-_ZTC-in-libstdc-exports-deprecated.patch index 2dd4f68004..fbd3a752bf 100644 --- a/mingw-w64-gcc-git/0002-PR54314-Include-_ZTC-in-libstdc-exports-deprecated.patch +++ b/mingw-w64-gcc-git/0002-PR54314-Include-_ZTC-in-libstdc-exports-deprecated.patch @@ -1,7 +1,7 @@ -From daaed8dcdc5499a4d7eb6d73d9829a578ad32d51 Mon Sep 17 00:00:00 2001 +From 9fe0b8519f2845d47377d393cadbde0ccfa17bb0 Mon Sep 17 00:00:00 2001 From: gee Date: Wed, 5 Aug 2015 23:36:04 +0100 -Subject: [PATCH 02/21] PR54314: Include _ZTC* in libstdc++ exports +Subject: [PATCH 02/22] PR54314: Include _ZTC* in libstdc++ exports [deprecated] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54314 @@ -37,10 +37,10 @@ Add thunk _ZTv0_n12_NS* like in gnu.ver 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver -index 120b133..f029a05 100644 +index d42cd37..7502fee 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver -@@ -2056,7 +2056,7 @@ CXXABI_1.3.6 { +@@ -2064,7 +2064,7 @@ CXXABI_1.3.6 { __cxa_allocate_dependent_exception; __cxa_free_dependent_exception; __cxa_deleted_virtual; diff --git a/mingw-w64-gcc-git/0003-PR52300-Avoid-__weakref__-on-__MINGW32__-deprecated.patch b/mingw-w64-gcc-git/0003-PR52300-Avoid-__weakref__-on-__MINGW32__-deprecated.patch index 95fc9999fa..59a6244c5d 100644 --- a/mingw-w64-gcc-git/0003-PR52300-Avoid-__weakref__-on-__MINGW32__-deprecated.patch +++ b/mingw-w64-gcc-git/0003-PR52300-Avoid-__weakref__-on-__MINGW32__-deprecated.patch @@ -1,7 +1,7 @@ -From ee889411a031eded929e5b03e08851a5c748c9ad Mon Sep 17 00:00:00 2001 +From 103329511f61dc7675a69ae0e4c84dd1b32b94f1 Mon Sep 17 00:00:00 2001 From: niXman Date: Wed, 5 Aug 2015 23:36:06 +0100 -Subject: [PATCH 03/21] PR52300: Avoid __weakref__ on __MINGW32__ [deprecated] +Subject: [PATCH 03/22] PR52300: Avoid __weakref__ on __MINGW32__ [deprecated] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52300 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52300#c0 diff --git a/mingw-w64-gcc-git/0004-Windows-Follow-Posix-dir-exists-semantics-more-close.patch b/mingw-w64-gcc-git/0004-Windows-Follow-Posix-dir-exists-semantics-more-close.patch index b7f0474c70..6492f308cf 100644 --- a/mingw-w64-gcc-git/0004-Windows-Follow-Posix-dir-exists-semantics-more-close.patch +++ b/mingw-w64-gcc-git/0004-Windows-Follow-Posix-dir-exists-semantics-more-close.patch @@ -1,7 +1,7 @@ -From 0358994260d801cfbdd6125c5bf335188097d6ac Mon Sep 17 00:00:00 2001 +From e79a89ddcccd411c0d61adc3c21710f63b79730d Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 5 Aug 2015 23:36:07 +0100 -Subject: [PATCH 04/21] Windows: Follow Posix dir-exists semantics more closely +Subject: [PATCH 04/22] Windows: Follow Posix dir-exists semantics more closely Make Windows behave the same as Posix in the consideration of whether folder "/doesnt-exist/.." is a valid @@ -14,7 +14,7 @@ compiling GNU/Linux glibc on Windows. 1 file changed, 87 insertions(+) diff --git a/libcpp/files.c b/libcpp/files.c -index 2f49122..644701d 100644 +index 8c388d8..e45665c 100644 --- a/libcpp/files.c +++ b/libcpp/files.c @@ -30,6 +30,13 @@ along with this program; see the file COPYING3. If not see diff --git a/mingw-w64-gcc-git/0005-Windows-Use-not-in-progpath-and-leave-case-as-is.patch b/mingw-w64-gcc-git/0005-Windows-Use-not-in-progpath-and-leave-case-as-is.patch index 385761c7ae..146aec9d21 100644 --- a/mingw-w64-gcc-git/0005-Windows-Use-not-in-progpath-and-leave-case-as-is.patch +++ b/mingw-w64-gcc-git/0005-Windows-Use-not-in-progpath-and-leave-case-as-is.patch @@ -1,7 +1,7 @@ -From 8345a1a9ac6fa6587cfc6ec27667aa7a8ed77151 Mon Sep 17 00:00:00 2001 +From 1140ae4d65b16735ce32ebd99ab29ad96997165b Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 5 Aug 2015 23:36:09 +0100 -Subject: [PATCH 05/21] Windows: Use '/' not '\' in progpath and leave case +Subject: [PATCH 05/22] Windows: Use '/' not '\' in progpath and leave case as-is Windows can handle both '/' and '\' dirseps. GCC will diff --git a/mingw-w64-gcc-git/0006-Windows-Don-t-ignore-native-system-header-dir.patch b/mingw-w64-gcc-git/0006-Windows-Don-t-ignore-native-system-header-dir.patch index c8a83601a0..254436a87d 100644 --- a/mingw-w64-gcc-git/0006-Windows-Don-t-ignore-native-system-header-dir.patch +++ b/mingw-w64-gcc-git/0006-Windows-Don-t-ignore-native-system-header-dir.patch @@ -1,17 +1,17 @@ -From b61f5e29306511be2f6d243b1e887a903c10b077 Mon Sep 17 00:00:00 2001 +From b35b11fad88c2f0de40663813e2c19154faccae2 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 5 Aug 2015 23:36:11 +0100 -Subject: [PATCH 06/21] Windows: Don't ignore native system header dir +Subject: [PATCH 06/22] Windows: Don't ignore native system header dir --- gcc/config.gcc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/config.gcc b/gcc/config.gcc -index 3ede69b..f25325f 100644 +index 24f6d35..8c79739 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc -@@ -1693,7 +1693,10 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) +@@ -1722,7 +1722,10 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) tmake_file="${tmake_file} i386/t-mingw-w32" ;; esac diff --git a/mingw-w64-gcc-git/0007-master-Windows-New-feature-to-allow-overriding-lmsvc.patch b/mingw-w64-gcc-git/0007-master-Windows-New-feature-to-allow-overriding-lmsvc.patch new file mode 100644 index 0000000000..ee54722cf1 --- /dev/null +++ b/mingw-w64-gcc-git/0007-master-Windows-New-feature-to-allow-overriding-lmsvc.patch @@ -0,0 +1,44 @@ +From cba090e187e04894e13c4ad178498f710e814d88 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 5 Aug 2015 23:36:13 +0100 +Subject: [PATCH 07/22] 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 c7e398f..dfddaf8 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 eef90fb..47e12e7 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.5.0 + diff --git a/mingw-w64-gcc-git/0008-libgomp-Use-gomp_malloc_cleared-instead-of-gomp_mall.patch b/mingw-w64-gcc-git/0008-libgomp-Use-gomp_malloc_cleared-instead-of-gomp_mall.patch index 17ae4127b2..f93e74b53a 100644 --- a/mingw-w64-gcc-git/0008-libgomp-Use-gomp_malloc_cleared-instead-of-gomp_mall.patch +++ b/mingw-w64-gcc-git/0008-libgomp-Use-gomp_malloc_cleared-instead-of-gomp_mall.patch @@ -1,7 +1,7 @@ -From 98337c715bbc77e19e7514c92f4f0c9f0242f83d Mon Sep 17 00:00:00 2001 +From 17b20f9905260f575071bce6d192ac0319e1b294 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Wed, 5 Aug 2015 23:36:16 +0100 -Subject: [PATCH 08/21] libgomp: Use gomp_malloc_cleared instead of gomp_malloc +Subject: [PATCH 08/22] libgomp: Use gomp_malloc_cleared instead of gomp_malloc [deprecated] This was added when trying to track down a problem in Blender, @@ -14,10 +14,10 @@ is probably not needed. 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libgomp/team.c b/libgomp/team.c -index b98b233..c1f6deb 100644 +index 7671b05..f9024c0 100644 --- a/libgomp/team.c +++ b/libgomp/team.c -@@ -197,7 +197,7 @@ free_team (struct gomp_team *team) +@@ -224,7 +224,7 @@ free_team (struct gomp_team *team) static struct gomp_thread_pool *gomp_new_thread_pool (void) { struct gomp_thread_pool *pool @@ -26,7 +26,7 @@ index b98b233..c1f6deb 100644 pool->threads = NULL; pool->threads_size = 0; pool->threads_used = 0; -@@ -940,7 +940,7 @@ struct gomp_task_icv * +@@ -964,7 +964,7 @@ struct gomp_task_icv * gomp_new_icv (void) { struct gomp_thread *thr = gomp_thread (); diff --git a/mingw-w64-gcc-git/0009-Build-EXTRA_GNATTOOLS-for-Ada.patch b/mingw-w64-gcc-git/0009-Build-EXTRA_GNATTOOLS-for-Ada.patch index e790613c27..b13fd88cb2 100644 --- a/mingw-w64-gcc-git/0009-Build-EXTRA_GNATTOOLS-for-Ada.patch +++ b/mingw-w64-gcc-git/0009-Build-EXTRA_GNATTOOLS-for-Ada.patch @@ -1,7 +1,7 @@ -From 4f0883f86431cf2b32fad338a6c797fee3e4a468 Mon Sep 17 00:00:00 2001 +From 266f288900a364912d011fe5f4d29c5cf04c8a85 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Wed, 5 Aug 2015 23:36:17 +0100 -Subject: [PATCH 09/21] Build EXTRA_GNATTOOLS for Ada +Subject: [PATCH 09/22] Build EXTRA_GNATTOOLS for Ada --- gnattools/Makefile.in | 6 +++--- diff --git a/mingw-w64-gcc-git/0010-Prettify-linking-no-undefined.patch b/mingw-w64-gcc-git/0010-Prettify-linking-no-undefined.patch index e94dbbfcfa..e44a820536 100644 --- a/mingw-w64-gcc-git/0010-Prettify-linking-no-undefined.patch +++ b/mingw-w64-gcc-git/0010-Prettify-linking-no-undefined.patch @@ -1,7 +1,7 @@ -From 777747a9eb169ae69fb7216b8d582e76e197decb Mon Sep 17 00:00:00 2001 +From 4b42253739b297be7568a69674867d04a16668e7 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Wed, 5 Aug 2015 23:36:19 +0100 -Subject: [PATCH 10/21] Prettify linking -no-undefined +Subject: [PATCH 10/22] Prettify linking -no-undefined It might be better to put this change in a conditional block for Windows only? @@ -11,10 +11,10 @@ conditional block for Windows only? 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am -index 31eb986..f8ef020 100644 +index 0e816ac..0477605 100644 --- a/libgfortran/Makefile.am +++ b/libgfortran/Makefile.am -@@ -50,7 +50,7 @@ libgfortranbegin_la_LINK = $(LINK) $(libgfortranbegin_la_LDFLAGS) +@@ -44,7 +44,7 @@ libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) cafexeclib_LTLIBRARIES = libcaf_single.la cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) libcaf_single_la_SOURCES = caf/single.c @@ -24,10 +24,10 @@ index 31eb986..f8ef020 100644 libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS) diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in -index 0f60e6e..8473026 100644 +index ab71b38..77374d4 100644 --- a/libgfortran/Makefile.in +++ b/libgfortran/Makefile.in -@@ -615,7 +615,7 @@ libgfortranbegin_la_LINK = $(LINK) $(libgfortranbegin_la_LDFLAGS) +@@ -605,7 +605,7 @@ libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) cafexeclib_LTLIBRARIES = libcaf_single.la cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) libcaf_single_la_SOURCES = caf/single.c diff --git a/mingw-w64-gcc-git/0011-gcc-make-xmmintrin-header-cplusplus-compatible-depre.patch b/mingw-w64-gcc-git/0011-gcc-make-xmmintrin-header-cplusplus-compatible-depre.patch index 456eb74b6c..06d8b1cffa 100644 --- a/mingw-w64-gcc-git/0011-gcc-make-xmmintrin-header-cplusplus-compatible-depre.patch +++ b/mingw-w64-gcc-git/0011-gcc-make-xmmintrin-header-cplusplus-compatible-depre.patch @@ -1,7 +1,7 @@ -From 52b810bd7ee566d3f1950c32ad32efe8090652c3 Mon Sep 17 00:00:00 2001 +From 3bae5991f5eee5a4c8f2ebf466dbffe95ce466b7 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Wed, 5 Aug 2015 23:36:21 +0100 -Subject: [PATCH 11/21] gcc: make xmmintrin header cplusplus compatible +Subject: [PATCH 11/22] gcc: make xmmintrin header cplusplus compatible [deprecated] Deprecated as-per: diff --git a/mingw-w64-gcc-git/0012-Work-around-un-too-late-resolved-__EH_FRAME_BEGIN__.patch b/mingw-w64-gcc-git/0012-Work-around-un-too-late-resolved-__EH_FRAME_BEGIN__.patch index 9af33b3c5c..99d0c23db1 100644 --- a/mingw-w64-gcc-git/0012-Work-around-un-too-late-resolved-__EH_FRAME_BEGIN__.patch +++ b/mingw-w64-gcc-git/0012-Work-around-un-too-late-resolved-__EH_FRAME_BEGIN__.patch @@ -1,7 +1,7 @@ -From 2e77b95a04243b410131c31498fe98f4ef49dbf6 Mon Sep 17 00:00:00 2001 +From b70fc022cae3efec16efb2b46a0440d3e6dd3bdc Mon Sep 17 00:00:00 2001 From: Matt Breedlove Date: Wed, 5 Aug 2015 23:36:22 +0100 -Subject: [PATCH 12/21] Work around {un-,too-late-}resolved __EH_FRAME_BEGIN__ +Subject: [PATCH 12/22] Work around {un-,too-late-}resolved __EH_FRAME_BEGIN__ Here's the dwarf2 patch I'm using. With the change to checking __LIBGCC_EH_FRAME_SECTION_NAME__, an undefined reference to diff --git a/mingw-w64-gcc-git/0013-Fix-using-large-PCH.patch b/mingw-w64-gcc-git/0013-Fix-using-large-PCH.patch index f2e8ce7c7a..e07fc780d7 100644 --- a/mingw-w64-gcc-git/0013-Fix-using-large-PCH.patch +++ b/mingw-w64-gcc-git/0013-Fix-using-large-PCH.patch @@ -1,7 +1,7 @@ -From d33c5504ef629af9b13cee500773d8101a697d15 Mon Sep 17 00:00:00 2001 +From f62203be0f878559bf0ce423d38ed174f23779fa Mon Sep 17 00:00:00 2001 From: Martin Richter Date: Wed, 5 Aug 2015 23:36:25 +0100 -Subject: [PATCH 13/21] Fix using large PCH +Subject: [PATCH 13/22] Fix using large PCH The following patch fixes segfault when gt_pch_use_address fails (returns -1). fatal_error now correctly shows an error @@ -64,10 +64,10 @@ index aa17378..631d9c4 100644 diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c -index 03fbe7d..3a5df8a 100644 +index 5096837..f741f2c 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c -@@ -603,7 +603,9 @@ gt_pch_restore (FILE *f) +@@ -599,7 +599,9 @@ gt_pch_restore (FILE *f) size_t i; struct mmap_info mmi; int result; @@ -78,7 +78,7 @@ index 03fbe7d..3a5df8a 100644 /* Delete any deletable objects. This makes ggc_pch_read much faster, as it can be sure that no GCable objects remain other than the ones just read in. */ -@@ -611,20 +613,24 @@ gt_pch_restore (FILE *f) +@@ -607,20 +609,24 @@ gt_pch_restore (FILE *f) for (rti = *rt; rti->base != NULL; rti++) memset (rti->base, 0, rti->stride); @@ -111,7 +111,7 @@ index 03fbe7d..3a5df8a 100644 if (fread (&mmi, sizeof (mmi), 1, f) != 1) fatal_error (input_location, "can%'t read PCH file: %m"); -@@ -635,12 +641,35 @@ gt_pch_restore (FILE *f) +@@ -631,12 +637,35 @@ gt_pch_restore (FILE *f) if (result == 0) { if (fseek (f, mmi.offset, SEEK_SET) != 0 diff --git a/mingw-w64-gcc-git/0014-Enable-shared-gnat-implib.patch b/mingw-w64-gcc-git/0014-Enable-shared-gnat-implib.patch index 66ecf8e493..3f8a163e19 100644 --- a/mingw-w64-gcc-git/0014-Enable-shared-gnat-implib.patch +++ b/mingw-w64-gcc-git/0014-Enable-shared-gnat-implib.patch @@ -1,7 +1,7 @@ -From 27578e70bac3247cd8f798614383e31311312b0c Mon Sep 17 00:00:00 2001 +From 53c92e4aa8cca14ecf849c6a69cf12fdabd716c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Pfeifer?= Date: Wed, 5 Aug 2015 23:36:27 +0100 -Subject: [PATCH 14/21] Enable shared gnat implib +Subject: [PATCH 14/22] Enable shared gnat implib Provide GNAT runtime import libraries to allow to link against shared runtime @@ -13,10 +13,10 @@ https://github.com/Alexpux/MINGW-packages/commit/51b4eb3b702fdb38df0460180c2f820 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in -index 5559269..c0a1d1c 100644 +index 1d03f86..dd4453c 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in -@@ -2851,13 +2851,16 @@ gnatlib-shared-win32: +@@ -2886,13 +2886,16 @@ gnatlib-shared-win32: $(PICFLAG_FOR_TARGET) \ -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ diff --git a/mingw-w64-gcc-git/0015-MinGW-w64-Enable-libitm.patch b/mingw-w64-gcc-git/0015-MinGW-w64-Enable-libitm.patch index bb03affae3..3a18d641b3 100644 --- a/mingw-w64-gcc-git/0015-MinGW-w64-Enable-libitm.patch +++ b/mingw-w64-gcc-git/0015-MinGW-w64-Enable-libitm.patch @@ -1,7 +1,7 @@ -From f1cb7b014b0d6f6bf8348fc25474fe201848399d Mon Sep 17 00:00:00 2001 +From 5e266f42509c70dc8a04a3bde4200af97013a1d0 Mon Sep 17 00:00:00 2001 From: LRN Date: Wed, 5 Aug 2015 23:36:29 +0100 -Subject: [PATCH 15/21] MinGW-w64: Enable libitm +Subject: [PATCH 15/22] MinGW-w64: Enable libitm --- 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,7 +46,7 @@ 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/configure b/libitm/configure -index e924228..a23c011 100644 +index 55332bb..8f19e0a 100644 --- a/libitm/configure +++ b/libitm/configure @@ -630,6 +630,7 @@ MAINTAINER_MODE_FALSE @@ -57,7 +57,7 @@ index e924228..a23c011 100644 CXXCPP CPP OTOOL64 -@@ -15144,6 +15145,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -15149,6 +15150,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Only expand once: diff --git a/mingw-w64-gcc-git/0016-MinGW-w64-Enable-libsanitizer.patch b/mingw-w64-gcc-git/0016-MinGW-w64-Enable-libsanitizer.patch index 792f352efc..33b7713b2d 100644 --- a/mingw-w64-gcc-git/0016-MinGW-w64-Enable-libsanitizer.patch +++ b/mingw-w64-gcc-git/0016-MinGW-w64-Enable-libsanitizer.patch @@ -1,7 +1,7 @@ -From 36ebc51b5ce673c68e2144ed310562a2f3278702 Mon Sep 17 00:00:00 2001 +From 52acb6abae02ed86e8181e62bd8648087b4a18a5 Mon Sep 17 00:00:00 2001 From: LRN Date: Wed, 5 Aug 2015 23:36:31 +0100 -Subject: [PATCH 16/21] MinGW-w64: Enable libsanitizer +Subject: [PATCH 16/22] MinGW-w64: Enable libsanitizer --- libsanitizer/configure.tgt | 2 ++ diff --git a/mingw-w64-gcc-git/0017-MinGW-w64-Enable-shared-gnat.patch b/mingw-w64-gcc-git/0017-MinGW-w64-Enable-shared-gnat.patch index d48e621b64..e55cf7949b 100644 --- a/mingw-w64-gcc-git/0017-MinGW-w64-Enable-shared-gnat.patch +++ b/mingw-w64-gcc-git/0017-MinGW-w64-Enable-shared-gnat.patch @@ -1,7 +1,7 @@ -From 2bb8c06f10a92bc95efa2734f49462f1cbee3de5 Mon Sep 17 00:00:00 2001 +From 083731577ddd8e4544fb0cc091b472ac73607a02 Mon Sep 17 00:00:00 2001 From: LRN Date: Wed, 5 Aug 2015 23:36:33 +0100 -Subject: [PATCH 17/21] MinGW-w64: Enable shared gnat +Subject: [PATCH 17/22] MinGW-w64: Enable shared gnat --- libada/configure | 2 +- diff --git a/mingw-w64-gcc-git/0018-MinGW-w64-No-fpic-in-sanitizer.patch b/mingw-w64-gcc-git/0018-MinGW-w64-No-fpic-in-sanitizer.patch index 5b8e9d2cc3..fde6e98f81 100644 --- a/mingw-w64-gcc-git/0018-MinGW-w64-No-fpic-in-sanitizer.patch +++ b/mingw-w64-gcc-git/0018-MinGW-w64-No-fpic-in-sanitizer.patch @@ -1,7 +1,7 @@ -From 4e4bf988c080e08188431d41c368e7d114f90c37 Mon Sep 17 00:00:00 2001 +From 6e0d53d3f927ae3c30da2d14a45a49a12abfaa51 Mon Sep 17 00:00:00 2001 From: LRN Date: Wed, 5 Aug 2015 23:36:35 +0100 -Subject: [PATCH 18/21] MinGW-w64: No -fpic in sanitizer +Subject: [PATCH 18/22] MinGW-w64: No -fpic in sanitizer --- libsanitizer/asan/Makefile.am | 2 +- @@ -32,10 +32,10 @@ index 54c74ce..1dc515e 100644 AM_CXXFLAGS += -std=gnu++11 ACLOCAL_AMFLAGS = -I $(top_srcdir) -I $(top_srcdir)/config diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in -index a56c6b1..2ed29ec 100644 +index edbed4d..690d41a 100644 --- a/libsanitizer/asan/Makefile.in +++ b/libsanitizer/asan/Makefile.in -@@ -269,7 +269,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) +@@ -297,7 +297,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) # May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ @@ -58,10 +58,10 @@ index 4fb69a9..6df9645 100644 AM_CXXFLAGS += -std=gnu++11 ACLOCAL_AMFLAGS = -I m4 diff --git a/libsanitizer/interception/Makefile.in b/libsanitizer/interception/Makefile.in -index 5a49650..8ff18f4 100644 +index 3dfa774..422593f 100644 --- a/libsanitizer/interception/Makefile.in +++ b/libsanitizer/interception/Makefile.in -@@ -225,7 +225,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) +@@ -247,7 +247,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) # May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ @@ -84,10 +84,10 @@ index 03ec4fe..55a1d33 100644 AM_CXXFLAGS += -std=gnu++11 ACLOCAL_AMFLAGS = -I m4 diff --git a/libsanitizer/lsan/Makefile.in b/libsanitizer/lsan/Makefile.in -index 49fa874..360787b 100644 +index b02c373..bb0475f 100644 --- a/libsanitizer/lsan/Makefile.in +++ b/libsanitizer/lsan/Makefile.in -@@ -260,7 +260,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) +@@ -288,7 +288,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -I $(top_srcdir) # May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ @@ -110,10 +110,10 @@ index d541717..7b302b3 100644 AM_CXXFLAGS += -std=gnu++11 if LIBBACKTRACE_SUPPORTED diff --git a/libsanitizer/sanitizer_common/Makefile.in b/libsanitizer/sanitizer_common/Makefile.in -index 77ad416..fe46773 100644 +index 6614524..d2fd290 100644 --- a/libsanitizer/sanitizer_common/Makefile.in +++ b/libsanitizer/sanitizer_common/Makefile.in -@@ -253,7 +253,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -isystem $(top_srcdir)/include/system +@@ -275,7 +275,7 @@ AM_CPPFLAGS = -I $(top_srcdir)/include -isystem $(top_srcdir)/include/system # May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ @@ -136,10 +136,10 @@ index abfafb7..5e8a6ba 100644 AM_CXXFLAGS += -std=gnu++11 ACLOCAL_AMFLAGS = -I m4 diff --git a/libsanitizer/tsan/Makefile.in b/libsanitizer/tsan/Makefile.in -index ed594a6..8365961 100644 +index 8b20d28..ec5243d 100644 --- a/libsanitizer/tsan/Makefile.in +++ b/libsanitizer/tsan/Makefile.in -@@ -273,7 +273,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include +@@ -301,7 +301,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include # May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ @@ -162,10 +162,10 @@ index 12d1ffa..83b6b5c 100644 AM_CXXFLAGS += -std=gnu++11 ACLOCAL_AMFLAGS = -I m4 diff --git a/libsanitizer/ubsan/Makefile.in b/libsanitizer/ubsan/Makefile.in -index 0973a7a..8f30452 100644 +index 64aad19..f5748b9 100644 --- a/libsanitizer/ubsan/Makefile.in +++ b/libsanitizer/ubsan/Makefile.in -@@ -256,7 +256,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include +@@ -284,7 +284,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include # May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ diff --git a/mingw-w64-gcc-git/0019-MinGW-w64-Port-sanitizer.patch b/mingw-w64-gcc-git/0019-MinGW-w64-Port-sanitizer.patch index 846c57e3eb..2e715ac9f3 100644 --- a/mingw-w64-gcc-git/0019-MinGW-w64-Port-sanitizer.patch +++ b/mingw-w64-gcc-git/0019-MinGW-w64-Port-sanitizer.patch @@ -1,7 +1,7 @@ -From acd73154de83946edf76aa8e045cde54abfa60dd Mon Sep 17 00:00:00 2001 +From 433fc9e4c5d5ce2bd6e9c3ec3a9c815b3657b499 Mon Sep 17 00:00:00 2001 From: LRN Date: Wed, 5 Aug 2015 23:36:37 +0100 -Subject: [PATCH 19/21] MinGW-w64: Port sanitizer +Subject: [PATCH 19/22] MinGW-w64: Port sanitizer --- libsanitizer/asan/asan_win.cc | 3 --- @@ -26,7 +26,7 @@ index b002876..7b93331 100644 } diff --git a/libsanitizer/configure b/libsanitizer/configure -index 1efbd53..2c58716 100755 +index 809f0d7..75fbc0e 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -628,6 +628,7 @@ TSAN_SUPPORTED_FALSE @@ -37,7 +37,7 @@ index 1efbd53..2c58716 100755 CXXCPP OTOOL64 OTOOL -@@ -15382,6 +15383,31 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -15387,6 +15388,31 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -69,7 +69,7 @@ index 1efbd53..2c58716 100755 for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. -@@ -15509,10 +15535,10 @@ done +@@ -15514,10 +15540,10 @@ done # Common libraries that we need to link against for all sanitizer libs. diff --git a/mingw-w64-gcc-git/0020-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch b/mingw-w64-gcc-git/0020-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch index 28b6022c21..4d02b95138 100644 --- a/mingw-w64-gcc-git/0020-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch +++ b/mingw-w64-gcc-git/0020-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch @@ -1,7 +1,7 @@ -From be8fb1f85351f198c063a2b7863c0b428f502962 Mon Sep 17 00:00:00 2001 +From a1bb29d7af308c59b1715406465fee95c0d52012 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Wed, 5 Aug 2015 23:36:39 +0100 -Subject: [PATCH 20/21] Force linking to libgcc_s_dw2-1.dll [deprecated] +Subject: [PATCH 20/22] Force linking to libgcc_s_dw2-1.dll [deprecated] .. by adding to specs: *libgcc @@ -53,7 +53,7 @@ index 2186937..7f71ccc 100644 } " #else diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h -index 0950304..ca73137 100644 +index 47e12e7..9afe794 100644 --- a/gcc/config/i386/mingw32.h +++ b/gcc/config/i386/mingw32.h @@ -120,6 +120,10 @@ along with GCC; see the file COPYING3. If not see diff --git a/mingw-w64-gcc-git/0021-MinGW-w64-Disable-libsanitizer.patch b/mingw-w64-gcc-git/0021-MinGW-w64-Disable-libsanitizer.patch index f08aee369d..a5e947ffdb 100644 --- a/mingw-w64-gcc-git/0021-MinGW-w64-Disable-libsanitizer.patch +++ b/mingw-w64-gcc-git/0021-MinGW-w64-Disable-libsanitizer.patch @@ -1,7 +1,7 @@ -From 51e6afe704bdf28680db2a00cb7fa31507988b55 Mon Sep 17 00:00:00 2001 +From d8338b5d84c7de1643d76301c1d73ee52b476ba8 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 8 Aug 2015 16:46:03 +0100 -Subject: [PATCH 21/21] MinGW-w64: Disable libsanitizer +Subject: [PATCH 21/22] MinGW-w64: Disable libsanitizer [20150808] Causes a build failure on gcc-5-branch --- diff --git a/mingw-w64-gcc-git/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch b/mingw-w64-gcc-git/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch new file mode 100644 index 0000000000..efb3fc0340 --- /dev/null +++ b/mingw-w64-gcc-git/0022-clone_function_name_1-Retain-any-stdcall-suffix.patch @@ -0,0 +1,112 @@ +From 38274147bb2a3fa481d0a1853c185c2337550260 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +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 +