From 80a3a8507b3824db047aec75081cd874fe28f7d1 Mon Sep 17 00:00:00 2001 From: "Koenig, Joerg" Date: Mon, 3 May 2021 13:44:08 +0200 Subject: Update to gcc suite version 1.9.0 with gcc 11.1 Change-Id: I9db0d491009f095293b09071be0250185c96b3b5 --- Makefile | 113 +++++++++++---------- ...6-Windows-New-feature-to-allow-overriding.patch | 39 ++----- PATCHES/0025-crt-Undefine-__rdtsc-for-GCC-11.patch | 27 +++++ PATCHES/0025-gcc11_1_0_quick_exit.patch | 22 ++++ versions.mk.inc | 6 +- 5 files changed, 124 insertions(+), 83 deletions(-) create mode 100644 PATCHES/0025-crt-Undefine-__rdtsc-for-GCC-11.patch create mode 100644 PATCHES/0025-gcc11_1_0_quick_exit.patch diff --git a/Makefile b/Makefile index 56cd904..bccca83 100644 --- a/Makefile +++ b/Makefile @@ -11,18 +11,18 @@ # Multilib: -m32, -m64 # # host -# +# # The system that is going to run the software once it is built. Once the software # has been built, it will execute on this particular system. -# +# # build -# +# # The system where the build process is being executed. For most uses this # would be the same as the host system, but in case of cross-compilation # the two obviously differ. -# +# # target -# +# # The system against which the software being built will run on. This only exists, or rather # has a meaning, when the software being built may interact specifically with a # system that differs from the one it's being executed on (our host). This is the case @@ -99,14 +99,14 @@ SOURCE_PACKAGES = \ $(SOURCE_DIR)/mpc-$(VERSION_MPC).tar.gz \ $(SOURCE_DIR)/mpfr-$(VERSION_MPFR).tar.bz2 \ $(SOURCE_DIR)/zlib-$(VERSION_ZLIB).tar.gz \ - $(SOURCE_DIR)/bzip2-$(VERSION_BZ2).tar.gz + $(SOURCE_DIR)/bzip2-$(VERSION_BZ2).tar.gz #JOBS = -j4 JOBS = $(SOURCE_DIR)/binutils-$(VERSION_BINUTILS).tar.bz2: _download_prepare wget -c https://ftp.gnu.org/gnu/binutils/binutils-$(VERSION_BINUTILS).tar.bz2 -O \ - $(SOURCE_DIR)/binutils-$(VERSION_BINUTILS).tar.bz2 2>&1 + $(SOURCE_DIR)/binutils-$(VERSION_BINUTILS).tar.bz2 2>&1 $(SOURCE_DIR)/gcc-$(VERSION_GCC).tar.gz: wget -c https://ftp.gnu.org/gnu/gcc/gcc-$(VERSION_GCC)/gcc-$(VERSION_GCC).tar.gz -O \ $(SOURCE_DIR)/gcc-$(VERSION_GCC).tar.gz @@ -148,7 +148,7 @@ ifneq ($(LOCAL_INST_PATH),) mkdir -p $(LOCAL_INST_PATH) mkdir -p $(LOCAL_INST_PATH)/../x86-mingw64 cd $(LOCAL_INST_PATH); \ - tar -zxf $(PWD)/gcc-suite-$(VERSION_SUITE)-gcc-$(VERSION_GCC)-x86-linux64.tgz + tar -zxf $(PWD)/gcc-suite-$(VERSION_SUITE)-gcc-$(VERSION_GCC)-x86-linux64.tgz cd $(LOCAL_INST_PATH); \ tar -zxf $(PWD)/gcc-suite-$(VERSION_SUITE)-xgcc-$(VERSION_GCC)-$(VERSION_MINGW)-x86-linux64.tgz cd $(LOCAL_INST_PATH)/../x86-mingw64; \ @@ -160,10 +160,14 @@ prepare: tar -zxf $(SOURCE_DIR)/gcc-$(VERSION_GCC).tar.gz -C $(UNPACK_DIR)/ # Patches from https://gcc-mcf.lhmouse.com/ ... cd $(UNPACK_DIR)/gcc-$(VERSION_GCC) && \ - patch -p1 < $(PATCHES_DIR)/0002-Relocate-libintl.patch && \ - patch -p1 < $(PATCHES_DIR)/0004-Windows-Use-not-in-progpath-and-leave-case-as-is.patch && \ - patch -p1 < $(PATCHES_DIR)/0006-Windows-New-feature-to-allow-overriding.patch && \ - patch -p1 < $(PATCHES_DIR)/0008-Prettify-linking-no-undefined.patch && \ + patch -p1 < $(PATCHES_DIR)/0002-Relocate-libintl.patch + cd $(UNPACK_DIR)/gcc-$(VERSION_GCC) && \ + patch -p1 < $(PATCHES_DIR)/0004-Windows-Use-not-in-progpath-and-leave-case-as-is.patch + cd $(UNPACK_DIR)/gcc-$(VERSION_GCC) && \ + patch -p1 < $(PATCHES_DIR)/0006-Windows-New-feature-to-allow-overriding.patch + cd $(UNPACK_DIR)/gcc-$(VERSION_GCC) && \ + patch -p1 < $(PATCHES_DIR)/0008-Prettify-linking-no-undefined.patch + cd $(UNPACK_DIR)/gcc-$(VERSION_GCC) && \ patch -p1 < $(PATCHES_DIR)/0010-Fix-using-large-PCH.gcc10.patch tar -zxf $(SOURCE_DIR)/gdb-$(VERSION_GDB).tar.gz -C $(UNPACK_DIR)/ cd $(UNPACK_DIR)/gdb-$(VERSION_GDB) && \ @@ -172,8 +176,8 @@ prepare: cd $(UNPACK_DIR)/binutils-$(VERSION_BINUTILS) && \ patch -p1 < $(PATCHES_DIR)/0004-Windows-Use-not-in-progpath-and-leave-case-as-is.patch tar -jxf $(SOURCE_DIR)/mingw-w64-v$(VERSION_MINGW).tar.bz2 -C $(UNPACK_DIR)/ - #cd $(UNPACK_DIR)/mingw-w64-v$(VERSION_MINGW)/mingw-w64-tools/widl && \ - # patch -p0 < $(PATCHES_DIR)/mingw-tools-widl-realloc.patch + cd $(UNPACK_DIR)/mingw-w64-v$(VERSION_MINGW)/ && \ + patch -p1 < $(PATCHES_DIR)/0025-crt-Undefine-__rdtsc-for-GCC-11.patch tar -jxf $(SOURCE_DIR)/mpfr-$(VERSION_MPFR).tar.bz2 -C $(UNPACK_DIR)/ tar -jxf $(SOURCE_DIR)/isl-$(VERSION_ISL).tar.bz2 -C $(UNPACK_DIR)/ tar -zxf $(SOURCE_DIR)/mpc-$(VERSION_MPC).tar.gz -C $(UNPACK_DIR)/ @@ -272,8 +276,8 @@ lingcc-finish: rm -Rf $(INST_BASE)/gcc/share find $(INST_BASE)/gcc -type f -name "*.py" | xargs rm -f -lingcc-gdb: - rm -Rf $(BUILD_DIR)/lingdb +lingcc-gdb: + rm -Rf $(BUILD_DIR)/lingdb mkdir -p $(BUILD_DIR)/lingdb cd $(BUILD_DIR)/lingdb && \ export PATH=$(INST_BASE)/gcc/bin:$(PATH) && \ @@ -297,7 +301,7 @@ else cd $(INST_BASE) && \ tar -zcf $(PWD)/gcc-suite-$(VERSION_SUITE)-gcc-$(VERSION_GCC)-x86-linux64.tgz ./gcc endif - + ############################################################################## # Linux based MinGW multilib cross compiler @@ -344,9 +348,11 @@ xgcc-build-binutils: --target=$(XGCC_TARGET64) ;\ make $(JOBS) ;\ make $(JOBS) install-strip - cd $(XGCC_INST_DIR)/bin && ln -s x86_64-w64-mingw32-windres windres + cd $(XGCC_INST_DIR)/bin; \ + test -f windres && rm -f windres; \ + ln -s x86_64-w64-mingw32-windres windres -xgcc-mingw-pass1: +xgcc-mingw-pass1: mkdir -p $(BUILD_DIR)/mingw cd $(BUILD_DIR)/mingw ;\ PATH=$(INST_BASE)/gcc/bin:$(PATH) \ @@ -375,7 +381,7 @@ xgcc-pthread-64: --host=$(XGCC_TARGET64) && \ make $(JOBS) clean && \ make $(JOBS) && \ - make $(JOBS) install + make $(JOBS) install mv -f $(XGCC_INST_DIR)/$(XGCC_TARGET64)/bin/libwinpthread-1.dll \ $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib @@ -387,8 +393,8 @@ xgcc-pthread-32: LDLAGS="-m32 -static-libgcc -static-libstdc++" \ CFLAGS="-m32 -O2 -pipe" \ CXXFLAGS="-m32 -O2 -pipe" \ - CC='x86_64-w64-mingw32-gcc -m32' \ - CCAS='x86_64-w64-mingw32-gcc -m32' \ + CC='x86_64-w64-mingw32-gcc -m32 -fno-expensive-optimizations' \ + CCAS='x86_64-w64-mingw32-gcc -m32 -fno-expensive-optimizations' \ DLLTOOL='x86_64-w64-mingw32-dlltool -m i386' \ RC='x86_64-w64-mingw32-windres -F pe-i386' \ $(UNPACK_DIR)/mingw-w64-v$(VERSION_MINGW)/mingw-w64-libraries/winpthreads/configure \ @@ -402,7 +408,7 @@ xgcc-pthread-32: $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib32 -xgcc-gcc-pass1: +xgcc-gcc-pass1: mkdir -p $(BUILD_DIR)/gcc cd $(BUILD_DIR)/gcc && \ PATH=$(INST_BASE)/gcc/bin:$(PATH) \ @@ -439,7 +445,7 @@ xgcc-gcc-pass1: make $(JOBS) all-gcc && \ make $(JOBS) install-gcc -xgcc-mingw-pass2: +xgcc-mingw-pass2: cd $(BUILD_DIR)/mingw && \ LDLAGS="-static-libgcc -static-libstdc++" \ CFLAGS="-O2 -pipe" \ @@ -457,7 +463,7 @@ xgcc-mingw-pass2: make $(JOBS) && \ make $(JOBS) install -xgcc-gcc-pass2: +xgcc-gcc-pass2: export PATH=$(XGCC_INST_DIR)/bin:$(PATH) && \ cd $(BUILD_DIR)/gcc && \ make $(JOBS) && \ @@ -465,7 +471,7 @@ xgcc-gcc-pass2: xgcc-finish: - cd $(XGCC_INST_DIR) && rm -f mingw + cd $(XGCC_INST_DIR) && rm -f mingw for f in `find $(XGCC_INST_DIR) -type f -executable -exec file -i '{}' \; | grep 'x-executable; charset=binary' | cut -d: -f1`; do \ $(XGCC_INST_DIR)/bin/$(XGCC_TARGET64)-strip $$f ;\ done; @@ -489,11 +495,16 @@ xgcc-finish: cat $(XGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET64)/$(VERSION_GCC)/specs \ $(SOURCE_DIR)/gcc.msvcr110.spec > \ $(XGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET64)/$(VERSION_GCC)/msvcr110 - cd $(XGCC_INST_DIR)/x86_64-w64-mingw32/include && \ - ln -s windows.h Windows.h - cd $(XGCC_INST_DIR)/lib64 && ln -s ../lib/gcc/x86_64-w64-mingw32/lib/libgcc_s.a - -xgcc-gdb: + cd $(XGCC_INST_DIR)/x86_64-w64-mingw32/include; \ + if ! [ -f Windows.h ]; then \ + ln -s windows.h Windows.h ;\ + fi; + cd $(XGCC_INST_DIR)/x86_64-w64-mingw32/lib64;\ + if ! [ -f libgcc_s.a ]; then \ + ln -s ../lib/gcc/x86_64-w64-mingw32/lib/libgcc_s.a ;\ + fi; + +xgcc-gdb: rm -rf $(BUILD_DIR)/gdb && mkdir -p $(BUILD_DIR)/gdb cd $(BUILD_DIR)/gdb && \ export PATH=$(XGCC_BINPATH):$(INST_BASE)/gcc/bin:$(PATH) && \ @@ -507,7 +518,7 @@ xgcc-gdb: --build=$(ARCH64) \ --host=$(ARCH64) && \ make $(JOBS) && make $(JOBS) install - + xgcc-reimp: rm -Rf $(BUILD_DIR)/reimp cd $(BUILD_DIR)/ && \ @@ -563,12 +574,12 @@ xgcc-zlib: RANLIB=$(XGCC_BINPATH)/$(XGCC_PREFIX)ranlib \ ./configure \ --prefix=$(XGCC_INST_DIR)/$(XGCC_TARGET64) --static && \ - make clean && make + make clean && make cd $(BUILD_DIR)/zlib-$(VERSION_ZLIB) && \ cp -f libz.a $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib && \ cp -f zlib.h zconf.h $(XGCC_INST_DIR)/$(XGCC_TARGET64)/include chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib/libz.a - chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET64)/include/zlib.h + chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET64)/include/zlib.h chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET64)/include/zconf.h # cd $(BUILD_DIR)/zlib-$(VERSION_ZLIB) && \ @@ -578,7 +589,7 @@ xgcc-zlib: RANLIB=$(XGCC_BINPATH)/$(XGCC_PREFIX)ranlib \ ./configure \ --prefix=$(XGCC_INST_DIR)/$(XGCC_TARGET64) --static && \ - make clean && make + make clean && make cd $(BUILD_DIR)/zlib-$(VERSION_ZLIB) && \ cp -f libz.a $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib32 && \ chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib32/libz.a @@ -595,7 +606,7 @@ xgcc-bzip2: cp -f libbz2.a $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET64)/include/bzlib.h chmod 644 $(XGCC_INST_DIR)/$(XGCC_TARGET64)/lib/libbz2.a - # + # cd $(UNPACK_DIR)/bzip2-$(VERSION_BZ2) && \ export PATH=$(XGCC_BINPATH)/bin:$(PATH) && \ make \ @@ -676,7 +687,7 @@ wingcc-mingw: make $(JOBS) install cd $(WINGCC_INST_DIR) && rm -f mingw && ln -s $(XGCC_TARGET64) mingw -wingcc-pthread: wingcc-pthread-32 wingcc-pthread-64 +wingcc-pthread: wingcc-pthread-32 wingcc-pthread-64 wingcc-pthread-32: rm -Rf $(BUILD_DIR)/winpthreads-32 && mkdir -p $(BUILD_DIR)/winpthreads-32 @@ -685,8 +696,8 @@ wingcc-pthread-32: LDLAGS="-m32 -static-libgcc -static-libstdc++" \ CFLAGS="-m32 -O2 -pipe" \ CXXFLAGS="-m32 -O2 -pipe" \ - CC='x86_64-w64-mingw32-gcc -m32' \ - CCAS='x86_64-w64-mingw32-gcc -m32' \ + CC='x86_64-w64-mingw32-gcc -m32 -fno-expensive-optimizations' \ + CCAS='x86_64-w64-mingw32-gcc -m32 -fno-expensive-optimizations' \ DLLTOOL='x86_64-w64-mingw32-dlltool -m i386' \ RC='x86_64-w64-mingw32-windres -F pe-i386' \ $(UNPACK_DIR)/mingw-w64-v$(VERSION_MINGW)/mingw-w64-libraries/winpthreads/configure \ @@ -759,8 +770,8 @@ wingcc-finish: mv ../tmp/* . ;\ rm -Rf ../tmp ; find $(WINGCC_INST_DIR) -type f -name "*.py" | xargs rm -f - cd $(WINGCC_INST_DIR) && rm -Rf share - cd $(WINGCC_INST_DIR) && rm -f mingw + cd $(WINGCC_INST_DIR) && rm -Rf share + cd $(WINGCC_INST_DIR) && rm -f mingw cd $(WINGCC_INST_DIR) ;\ find . -type f -name "*.exe" | xargs $(XGCC_BINPATH)/$(XGCC_PREFIX)strip; true # @@ -783,7 +794,7 @@ wingcc-finish: cp -f ../../x86_64-w64-mingw32/lib/libgcc_s.a . cd $(WINGCC_INST_DIR)/lib/gcc/$(XGCC_TARGET64)/$(VERSION_GCC)/32 && \ cp -f ../../../x86_64-w64-mingw32/lib32/libgcc_s.a . - + wingcc-reimp: rm -Rf $(BUILD_DIR)/reimp cd $(BUILD_DIR)/ && \ @@ -845,7 +856,7 @@ wingcc-genidl: --prefix=$(WINGCC_INST_DIR) \ --host=$(XGCC_TARGET64) && \ make && \ - make install + make install wingcc-genlib: rm -Rf $(BUILD_DIR)/genlib @@ -857,7 +868,7 @@ wingcc-genlib: --prefix=$(WINGCC_INST_DIR) \ --host=$(XGCC_TARGET64) && \ make && \ - make install + make install wingcc-widl: cd $(UNPACK_DIR)/mingw-w64-v$(VERSION_MINGW)/mingw-w64-tools/widl && \ @@ -871,7 +882,7 @@ wingcc-widl: --prefix=$(WINGCC_INST_DIR) \ --host=$(XGCC_TARGET64) && \ make && \ - make install + make install wingcc-zlib: mkdir -p $(BUILD_DIR) @@ -885,14 +896,14 @@ wingcc-zlib: RANLIB=$(XGCC_BINPATH)/$(XGCC_PREFIX)ranlib \ ./configure \ --prefix=$(WINGCC_INST_DIR)/$(XGCC_TARGET64) --static && \ - make clean && make + make clean && make # cd $(BUILD_DIR)/zlib-$(VERSION_ZLIB) && \ cp -f libz.a $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/lib && \ cp -f zlib.h zconf.h $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/include # chmod 644 $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/lib/libz.a - chmod 644 $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/include/zlib.h + chmod 644 $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/include/zlib.h chmod 644 $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/include/zconf.h # cd $(BUILD_DIR)/zlib-$(VERSION_ZLIB) && \ @@ -902,7 +913,7 @@ wingcc-zlib: RANLIB=$(XGCC_BINPATH)/$(XGCC_PREFIX)ranlib \ ./configure \ --prefix=$(WINGCC_INST_DIR)/$(XGCC_TARGET64) --static && \ - make clean && make + make clean && make cd $(BUILD_DIR)/zlib-$(VERSION_ZLIB) && \ cp -f libz.a $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/lib32 && \ chmod 644 $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/lib32/libz.a @@ -918,7 +929,7 @@ wingcc-bzip2: cp -f libbz2.a $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/lib chmod 644 $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/include/bzlib.h chmod 644 $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/lib/libbz2.a - # + # cd $(UNPACK_DIR)/bzip2-$(VERSION_BZ2) && \ export PATH=$(XGCC_BINPATH)/bin:$(PATH) && \ make \ @@ -928,7 +939,7 @@ wingcc-bzip2: cp -f libbz2.a $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/lib32 chmod 644 $(WINGCC_INST_DIR)/$(XGCC_TARGET64)/lib/libbz2.a -wingcc-gdb: +wingcc-gdb: rm -Rf $(BUILD_DIR)/gdb && mkdir -p $(BUILD_DIR)/gdb cd $(BUILD_DIR)/gdb && \ export PATH=$(XGCC_BINPATH):$(PATH) && \ @@ -978,4 +989,4 @@ fullclean: clean rm -Rf inst.* rm -Rf build.* rm -Rf unpack.* - + diff --git a/PATCHES/0006-Windows-New-feature-to-allow-overriding.patch b/PATCHES/0006-Windows-New-feature-to-allow-overriding.patch index 9899224..432fa18 100644 --- a/PATCHES/0006-Windows-New-feature-to-allow-overriding.patch +++ b/PATCHES/0006-Windows-New-feature-to-allow-overriding.patch @@ -1,22 +1,7 @@ -From d8cd8d0211dcd606a3753a6b3c36c19a7b1672dc Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -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 +diff -ruNb gcc-11.1.0.orig/gcc/config/i386/cygming.opt gcc-11.1.0/gcc/config/i386/cygming.opt +--- gcc-11.1.0.orig/gcc/config/i386/cygming.opt 2021-04-27 12:00:13.000000000 +0200 ++++ gcc-11.1.0/gcc/config/i386/cygming.opt 2021-04-28 14:37:45.671358493 +0200 +@@ -22,6 +22,9 @@ Target RejectNegative Create console application. @@ -26,19 +11,15 @@ index a9074bf..e1d89e2 100644 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 +diff -ruNb gcc-11.1.0.orig/gcc/config/i386/mingw32.h gcc-11.1.0/gcc/config/i386/mingw32.h +--- gcc-11.1.0.orig/gcc/config/i386/mingw32.h 2021-04-27 12:00:13.000000000 +0200 ++++ gcc-11.1.0/gcc/config/i386/mingw32.h 2021-04-28 14:38:47.999199541 +0200 +@@ -177,7 +177,7 @@ #define REAL_LIBGCC_SPEC \ "%{mthreads:-lmingwthrd} -lmingw32 \ " SHARED_LIBGCC_SPEC " \ -- -lmoldname -lmingwex -lmsvcrt" -+ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*}" +- -lmoldname -lmingwex -lmsvcrt -lkernel32" ++ -lmoldname -lmingwex %{!mcrtdll=*:-lmsvcrt} %{mcrtdll=*:-l%*} -lkernel32" #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \ --- -2.7.1 - diff --git a/PATCHES/0025-crt-Undefine-__rdtsc-for-GCC-11.patch b/PATCHES/0025-crt-Undefine-__rdtsc-for-GCC-11.patch new file mode 100644 index 0000000..8fd1dcc --- /dev/null +++ b/PATCHES/0025-crt-Undefine-__rdtsc-for-GCC-11.patch @@ -0,0 +1,27 @@ +From f3e91c4d4fded83dfbced83a9449c5756d3448da Mon Sep 17 00:00:00 2001 +From: Liu Hao +Date: Sat, 10 Apr 2021 20:05:36 +0800 +Subject: [PATCH] crt: Undefine `__rdtsc` for GCC 11 + +Signed-off-by: Liu Hao +--- + mingw-w64-crt/intrincs/rdtsc.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/rdtsc.c +index bf9c03b34..55a31a982 100644 +--- a/mingw-w64-crt/intrincs/rdtsc.c ++++ b/mingw-w64-crt/intrincs/rdtsc.c +@@ -6,6 +6,9 @@ + + #include + ++/* GCC 11 has this as a macro. */ ++#undef __rdtsc ++ + /* Clang has support for MSVC builtins, GCC doesn't */ + #ifndef __has_builtin + #define __has_builtin(x) 0 +-- +2.25.1 + diff --git a/PATCHES/0025-gcc11_1_0_quick_exit.patch b/PATCHES/0025-gcc11_1_0_quick_exit.patch new file mode 100644 index 0000000..c3585b3 --- /dev/null +++ b/PATCHES/0025-gcc11_1_0_quick_exit.patch @@ -0,0 +1,22 @@ +--- a/mingw-w64-headers/crt/stdlib.h ++++ b/mingw-w64-headers/crt/stdlib.h +@@ -387,6 +387,9 @@ + #define _CRT_TERMINATE_DEFINED + void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN; + void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN; ++#ifdef _UCRT ++ void __cdecl __MINGW_NOTHROW quick_exit(int _Code) __MINGW_ATTRIB_NORETURN; ++#endif + + #if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */ + /* C99 function name */ +@@ -420,6 +423,9 @@ + #endif + + int __cdecl atexit(void (__cdecl *)(void)); ++#ifdef _UCRT ++ int __cdecl at_quick_exit(void (__cdecl *)(void)); ++#endif + #ifndef _CRT_ATOF_DEFINED + #define _CRT_ATOF_DEFINED + double __cdecl atof(const char *_String); diff --git a/versions.mk.inc b/versions.mk.inc index 8d2474a..30899e3 100644 --- a/versions.mk.inc +++ b/versions.mk.inc @@ -1,7 +1,7 @@ -SUITE = 1.8.0 +SUITE = 1.9.0 -VERSION_BINUTILS = 2.35 -VERSION_GCC = 10.2.0 +VERSION_BINUTILS = 2.36.1 +VERSION_GCC = 11.1.0 VERSION_MINGW = 8.0.0 VERSION_GMP = 6.2.0 VERSION_MPC = 1.1.0 -- cgit v0.12