diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-11 16:20:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-11 16:23:49 +0200 |
commit | 6fe7fc56873b27deef74bc9dc36adf86af4fd79b (patch) | |
tree | ab6794c3f6ac2202ebf9f5e2f24cd4f0886fc68e /binary/mingw-w64/patches | |
parent | be44ee078fa5d5470dddd097db0d97fadfc754ff (diff) |
Update MinGW64 binary build (MinGW 3.3 runtime)
Using GCC 4.9.3, multi-arch/multi-lib build (you don't want to try
this at home).
Diffstat (limited to 'binary/mingw-w64/patches')
6 files changed, 390 insertions, 0 deletions
diff --git a/binary/mingw-w64/patches/gcc-4.7-20130209-cross.patch b/binary/mingw-w64/patches/gcc-4.7-20130209-cross.patch new file mode 100644 index 0000000..ab207cc --- /dev/null +++ b/binary/mingw-w64/patches/gcc-4.7-20130209-cross.patch @@ -0,0 +1,25 @@ +diff -ru gcc-4.7-20130209/gcc/config/i386/mingw32.h gcc-cross/gcc/config/i386/mingw32.h +--- gcc-4.7-20130209/gcc/config/i386/mingw32.h 2012-08-06 16:34:27.000000000 +0200 ++++ gcc-cross/gcc/config/i386/mingw32.h 2013-05-27 15:41:55.000000000 +0200 +@@ -153,7 +153,7 @@ + /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR + macro contains POSIX-style path. See bug 52947. */ + #undef NATIVE_SYSTEM_HEADER_DIR +-#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" ++#define NATIVE_SYSTEM_HEADER_DIR "/include" + + /* Output STRING, a string representing a filename, to FILE. + We canonicalize it to be in Unix format (backslashes are replaced +diff -ru gcc-4.7-20130209/gcc/config.gcc gcc-cross/gcc/config.gcc +--- gcc-4.7-20130209/gcc/config.gcc 2013-01-14 18:32:37.000000000 +0200 ++++ gcc-cross/gcc/config.gcc 2013-05-27 15:42:06.000000000 +0200 +@@ -1485,7 +1485,7 @@ + tmake_file="${tmake_file} i386/t-mingw-w32" + ;; + esac +- native_system_header_dir=/mingw/include ++ native_system_header_dir=/include + target_gtfiles="\$(srcdir)/config/i386/winnt.c" + extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" + case ${target} in + diff --git a/binary/mingw-w64/patches/gcc-4.7-20130209-mingw.patch b/binary/mingw-w64/patches/gcc-4.7-20130209-mingw.patch new file mode 100644 index 0000000..391bf0b --- /dev/null +++ b/binary/mingw-w64/patches/gcc-4.7-20130209-mingw.patch @@ -0,0 +1,24 @@ +diff -ru gcc-4.7-20130209/gcc/config/i386/mingw32.h gcc/gcc/config/i386/mingw32.h +--- gcc-4.7-20130209/gcc/config/i386/mingw32.h 2012-08-06 16:34:27.000000000 +0200 ++++ gcc/gcc/config/i386/mingw32.h 2013-05-27 15:42:33.000000000 +0200 +@@ -153,7 +153,7 @@ + /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR + macro contains POSIX-style path. See bug 52947. */ + #undef NATIVE_SYSTEM_HEADER_DIR +-#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" ++#define NATIVE_SYSTEM_HEADER_DIR "/include" + + /* Output STRING, a string representing a filename, to FILE. + We canonicalize it to be in Unix format (backslashes are replaced +diff -ru gcc-4.7-20130209/gcc/config.gcc gcc/gcc/config.gcc +--- gcc-4.7-20130209/gcc/config.gcc 2013-01-14 18:32:37.000000000 +0200 ++++ gcc/gcc/config.gcc 2013-05-27 15:42:45.000000000 +0200 +@@ -1485,7 +1485,7 @@ + tmake_file="${tmake_file} i386/t-mingw-w32" + ;; + esac +- native_system_header_dir=/mingw/include ++ native_system_header_dir=/include + target_gtfiles="\$(srcdir)/config/i386/winnt.c" + extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" + case ${target} in diff --git a/binary/mingw-w64/patches/gcc-4.7-20130209-static-plugin.patch b/binary/mingw-w64/patches/gcc-4.7-20130209-static-plugin.patch new file mode 100644 index 0000000..786a354 --- /dev/null +++ b/binary/mingw-w64/patches/gcc-4.7-20130209-static-plugin.patch @@ -0,0 +1,142 @@ +diff -ru gcc-4.7-20130209/gcc/config.in gcc/gcc/config.in +--- gcc-4.7-20130209/gcc/config.in 2013-02-10 00:52:59.000000000 +0200 ++++ gcc/gcc/config.in 2013-05-27 15:42:33.000000000 +0200 +@@ -143,6 +143,10 @@ + #undef ENABLE_PLUGIN + #endif + ++/* Define to enable static plugin support. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_STATIC_PLUGIN ++#endif + + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. +diff -ru gcc-4.7-20130209/gcc/configure.ac gcc/gcc/configure.ac +--- gcc-4.7-20130209/gcc/configure.ac 2013-02-06 17:23:55.000000000 +0200 ++++ gcc/gcc/configure.ac 2013-05-27 15:42:45.000000000 +0200 +@@ -5224,6 +5224,14 @@ + AC_DEFINE(ENABLE_PLUGIN, 1, [Define to enable plugin support.]) + fi + ++AC_ARG_ENABLE(static-plugin, ++[ --enable-static-plugin enable static plugin support], ++enable_static_plugin=$enableval, ++enable_static_plugin==no) ++ ++if test x"$enable_static_plugin" = x"yes"; then ++ AC_DEFINE(ENABLE_STATIC_PLUGIN, 1, [Define to enable static plugin support.]) ++fi + + AC_ARG_ENABLE(libquadmath-support, + [AS_HELP_STRING([--disable-libquadmath-support], +diff -ru gcc-4.7-20130209/gcc/cp/Make-lang.in gcc/gcc/cp/Make-lang.in +--- gcc-4.7-20130209/gcc/cp/Make-lang.in 2011-11-09 19:53:53.000000000 +0200 ++++ gcc/gcc/cp/Make-lang.in 2013-05-27 15:42:32.000000000 +0200 +@@ -103,7 +103,8 @@ + + cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBDEPS) + +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ +- $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS) ++ $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(STATIC_PLUGIN_LIBS) \ ++ $(LIBS) $(BACKENDLIBS) + + ifeq ($(ENABLE_MAINTAINER_RULES), true) + # Special build rule. This is a maintainer rule, that is only +diff -ru gcc-4.7-20130209/gcc/opts-global.c gcc/gcc/opts-global.c +--- gcc-4.7-20130209/gcc/opts-global.c 2011-11-03 16:46:26.000000000 +0200 ++++ gcc/gcc/opts-global.c 2013-05-27 15:42:45.000000000 +0200 +@@ -365,7 +365,7 @@ + break; + + case OPT_fplugin_: +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + add_new_plugin (opt->arg); + #else + error ("plugin support is disabled; configure with --enable-plugin"); +@@ -373,7 +373,7 @@ + break; + + case OPT_fplugin_arg_: +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + parse_plugin_arg_opt (opt->arg); + #else + error ("plugin support is disabled; configure with --enable-plugin"); +diff -ru gcc-4.7-20130209/gcc/plugin.c gcc/gcc/plugin.c +--- gcc-4.7-20130209/gcc/plugin.c 2011-10-19 15:20:22.000000000 +0200 ++++ gcc/gcc/plugin.c 2013-05-27 15:42:45.000000000 +0200 +@@ -31,7 +31,7 @@ + #include "timevar.h" + #include "ggc.h" + +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + #include "plugin-version.h" + #endif + +@@ -132,6 +132,7 @@ + + flag_plugin_added = true; + ++#ifdef ENABLE_PLUGIN + /* Replace short names by their full path when relevant. */ + name_is_short = !IS_ABSOLUTE_PATH (plugin_name); + for (pc = plugin_name; name_is_short && *pc; pc++) +@@ -153,6 +154,7 @@ + plugin_name, base_name); + } + else ++#endif + base_name = get_plugin_base_name (plugin_name); + + /* If this is the first -fplugin= option we encounter, create +@@ -619,6 +621,26 @@ + return 1; + } + ++#elif defined(ENABLE_STATIC_PLUGIN) ++ ++extern int ++plugin_init (struct plugin_name_args*, struct plugin_gcc_version*); ++ ++static int ++init_one_plugin (void **slot, void * ARG_UNUSED (info)) ++{ ++ struct plugin_name_args *plugin = (struct plugin_name_args *) *slot; ++ ++ /* Call the plugin-provided initialization routine with the arguments. */ ++ if (plugin_init (plugin, &gcc_version)) ++ { ++ error ("Fail to initialize plugin %s", plugin->full_name); ++ htab_remove_elt (plugin_name_args_tab, plugin->base_name); ++ XDELETE (plugin); ++ } ++ return 1; ++} ++ + #endif /* ENABLE_PLUGIN */ + + /* Main plugin initialization function. Called from compile_file() in +@@ -633,7 +655,7 @@ + + timevar_push (TV_PLUGIN_INIT); + +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + /* Traverse and initialize each plugin specified in the command-line. */ + htab_traverse_noresize (plugin_name_args_tab, init_one_plugin, NULL); + #endif +diff -ru gcc-4.7-20130209/gcc/plugin.h gcc/gcc/plugin.h +--- gcc-4.7-20130209/gcc/plugin.h 2010-10-05 16:28:39.000000000 +0200 ++++ gcc/gcc/plugin.h 2013-05-27 15:42:33.000000000 +0200 +@@ -52,7 +52,7 @@ + invoke_plugin_callbacks (int event ATTRIBUTE_UNUSED, + void *gcc_data ATTRIBUTE_UNUSED) + { +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + /* True iff at least one plugin has been added. */ + if (flag_plugin_added) + return invoke_plugin_callbacks_full (event, gcc_data); diff --git a/binary/mingw-w64/patches/gcc-4.9-20150204-cross.patch b/binary/mingw-w64/patches/gcc-4.9-20150204-cross.patch new file mode 100644 index 0000000..497aa9b --- /dev/null +++ b/binary/mingw-w64/patches/gcc-4.9-20150204-cross.patch @@ -0,0 +1,25 @@ +diff -ru gcc-4.9-20150204/gcc/config/i386/mingw32.h gcc-cross/gcc/config/i386/mingw32.h +--- gcc-4.9-20150204/gcc/config/i386/mingw32.h 2014-04-23 11:46:13.000000000 +0200 ++++ gcc-cross/gcc/config/i386/mingw32.h 2015-02-09 08:27:15.531922502 +0200 +@@ -162,7 +162,7 @@ + /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR + macro contains POSIX-style path. See bug 52947. */ + #undef NATIVE_SYSTEM_HEADER_DIR +-#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" ++#define NATIVE_SYSTEM_HEADER_DIR "/i686-w64-mingw32/include" + + /* Output STRING, a string representing a filename, to FILE. + We canonicalize it to be in Unix format (backslashes are replaced +diff -ru gcc-4.9-20150204/gcc/config.gcc gcc-cross/gcc/config.gcc +--- gcc-4.9-20150204/gcc/config.gcc 2014-11-07 18:40:16.000000000 +0200 ++++ gcc-cross/gcc/config.gcc 2015-02-09 08:28:53.155923698 +0200 +@@ -1666,7 +1666,7 @@ + tmake_file="${tmake_file} i386/t-mingw-w32" + ;; + esac +- native_system_header_dir=/mingw/include ++ native_system_header_dir=/i686-w64-mingw32/include + target_gtfiles="\$(srcdir)/config/i386/winnt.c" + extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" + case ${target} in + diff --git a/binary/mingw-w64/patches/gcc-4.9-20150204-mingw.patch b/binary/mingw-w64/patches/gcc-4.9-20150204-mingw.patch new file mode 100644 index 0000000..9c10bae --- /dev/null +++ b/binary/mingw-w64/patches/gcc-4.9-20150204-mingw.patch @@ -0,0 +1,24 @@ +diff -ru gcc-4.9-20150204/gcc/config/i386/mingw32.h gcc/gcc/config/i386/mingw32.h +--- gcc-4.9-20150204/gcc/config/i386/mingw32.h 2014-04-23 11:46:13.000000000 +0200 ++++ gcc/gcc/config/i386/mingw32.h 2015-02-09 15:37:33.864238829 +0200 +@@ -162,7 +162,7 @@ + /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR + macro contains POSIX-style path. See bug 52947. */ + #undef NATIVE_SYSTEM_HEADER_DIR +-#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" ++#define NATIVE_SYSTEM_HEADER_DIR "/include" + + /* Output STRING, a string representing a filename, to FILE. + We canonicalize it to be in Unix format (backslashes are replaced +diff -ru gcc-4.9-20150204/gcc/config.gcc gcc/gcc/config.gcc +--- gcc-4.9-20150204/gcc/config.gcc 2014-11-07 18:40:16.000000000 +0200 ++++ gcc/gcc/config.gcc 2015-02-09 15:38:07.376239240 +0200 +@@ -1666,7 +1666,7 @@ + tmake_file="${tmake_file} i386/t-mingw-w32" + ;; + esac +- native_system_header_dir=/mingw/include ++ native_system_header_dir=/include + target_gtfiles="\$(srcdir)/config/i386/winnt.c" + extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" + case ${target} in diff --git a/binary/mingw-w64/patches/gcc-4.9-20150204-static-plugin.patch b/binary/mingw-w64/patches/gcc-4.9-20150204-static-plugin.patch new file mode 100644 index 0000000..4230d5f --- /dev/null +++ b/binary/mingw-w64/patches/gcc-4.9-20150204-static-plugin.patch @@ -0,0 +1,150 @@ +diff -ru gcc-4.9-20150204/gcc/config.in gcc/gcc/config.in +--- gcc-4.9-20150204/gcc/config.in 2015-02-05 00:32:56.000000000 +0200 ++++ gcc/gcc/config.in 2015-02-08 19:58:45.215372260 +0200 +@@ -137,6 +137,10 @@ + #undef ENABLE_PLUGIN + #endif + ++/* Define to enable static plugin support. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_STATIC_PLUGIN ++#endif + + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. +diff -ru gcc-4.9-20150204/gcc/configure.ac gcc/gcc/configure.ac +--- gcc-4.9-20150204/gcc/configure.ac 2014-12-04 20:25:37.000000000 +0200 ++++ gcc/gcc/configure.ac 2015-02-08 19:58:45.219372260 +0200 +@@ -5519,6 +5519,14 @@ + fi + fi + ++AC_ARG_ENABLE(static-plugin, ++[ --enable-static-plugin enable static plugin support], ++enable_static_plugin=$enableval, ++enable_static_plugin==no) ++ ++if test x"$enable_static_plugin" = x"yes"; then ++ AC_DEFINE(ENABLE_STATIC_PLUGIN, 1, [Define to enable static plugin support.]) ++fi + + # Check for plugin support + AC_ARG_ENABLE(plugin, +diff -ru gcc-4.9-20150204/gcc/cp/Make-lang.in gcc/gcc/cp/Make-lang.in +--- gcc-4.9-20150204/gcc/cp/Make-lang.in 2014-04-15 10:04:17.000000000 +0200 ++++ gcc/gcc/cp/Make-lang.in 2015-02-08 20:01:21.479374174 +0200 +@@ -90,14 +90,14 @@ + + # compute checksum over all object files and the options + cc1plus-checksum.c : build/genchecksum$(build_exeext) checksum-options \ +- $(CXX_OBJS) $(BACKEND) $(LIBDEPS) ++ $(CXX_OBJS) $(BACKEND) $(LIBDEPS) + build/genchecksum$(build_exeext) $(CXX_OBJS) $(BACKEND) $(LIBDEPS) \ + checksum-options > cc1plus-checksum.c.tmp && \ + $(srcdir)/../move-if-change cc1plus-checksum.c.tmp cc1plus-checksum.c + + cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBDEPS) + +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ +- $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS) ++ $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(STATIC_PLUGIN_LIBS) $(LIBS) $(BACKENDLIBS) + + ifeq ($(ENABLE_MAINTAINER_RULES), true) + # Special build rule. This is a maintainer rule, that is only +diff -ru gcc-4.9-20150204/gcc/opts-global.c gcc/gcc/opts-global.c +--- gcc-4.9-20150204/gcc/opts-global.c 2014-01-03 00:23:26.000000000 +0200 ++++ gcc/gcc/opts-global.c 2015-02-08 19:58:45.223372260 +0200 +@@ -381,7 +381,7 @@ + break; + + case OPT_fplugin_: +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + add_new_plugin (opt->arg); + #else + error ("plugin support is disabled; configure with --enable-plugin"); +@@ -389,7 +389,7 @@ + break; + + case OPT_fplugin_arg_: +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + parse_plugin_arg_opt (opt->arg); + #else + error ("plugin support is disabled; configure with --enable-plugin"); +diff -ru gcc-4.9-20150204/gcc/plugin.c gcc/gcc/plugin.c +--- gcc-4.9-20150204/gcc/plugin.c 2014-01-03 00:23:26.000000000 +0200 ++++ gcc/gcc/plugin.c 2015-02-09 12:40:04.956108359 +0200 +@@ -31,7 +31,7 @@ + #include "plugin.h" + #include "ggc.h" + +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + #include "plugin-version.h" + #endif + +@@ -159,6 +159,7 @@ + + flag_plugin_added = true; + ++#ifdef ENABLE_PLUGIN + /* Replace short names by their full path when relevant. */ + name_is_short = !IS_ABSOLUTE_PATH (plugin_name); + for (pc = plugin_name; name_is_short && *pc; pc++) +@@ -180,6 +181,7 @@ + plugin_name, base_name); + } + else ++#endif + base_name = get_plugin_base_name (plugin_name); + + /* If this is the first -fplugin= option we encounter, create +@@ -634,6 +636,26 @@ + return 1; + } + ++#elif defined(ENABLE_STATIC_PLUGIN) ++ ++extern "C" int ++plugin_init (struct plugin_name_args*, struct plugin_gcc_version*); ++ ++static int ++init_one_plugin (void **slot, void * ARG_UNUSED (info)) ++{ ++ struct plugin_name_args *plugin = (struct plugin_name_args *) *slot; ++ ++ /* Call the plugin-provided initialization routine with the arguments. */ ++ if (plugin_init (plugin, &gcc_version)) ++ { ++ error ("Fail to initialize plugin %s", plugin->full_name); ++ htab_remove_elt (plugin_name_args_tab, plugin->base_name); ++ XDELETE (plugin); ++ } ++ return 1; ++} ++ + #endif /* ENABLE_PLUGIN */ + + /* Main plugin initialization function. Called from compile_file() in +@@ -648,7 +670,7 @@ + + timevar_push (TV_PLUGIN_INIT); + +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + /* Traverse and initialize each plugin specified in the command-line. */ + htab_traverse_noresize (plugin_name_args_tab, init_one_plugin, NULL); + #endif +diff -ru gcc-4.9-20150204/gcc/plugin.h gcc/gcc/plugin.h +--- gcc-4.9-20150204/gcc/plugin.h 2014-01-03 00:23:26.000000000 +0200 ++++ gcc/gcc/plugin.h 2015-02-08 19:58:45.227372260 +0200 +@@ -53,7 +53,7 @@ + invoke_plugin_callbacks (int event ATTRIBUTE_UNUSED, + void *gcc_data ATTRIBUTE_UNUSED) + { +-#ifdef ENABLE_PLUGIN ++#if defined(ENABLE_PLUGIN) || defined(ENABLE_STATIC_PLUGIN) + /* True iff at least one plugin has been added. */ + if (flag_plugin_added) + return invoke_plugin_callbacks_full (event, gcc_data); + |