mingw-w64-cross-gcc: Update to 9.1.0

This commit is contained in:
Alexey Pavlov
2019-07-04 15:39:17 +03:00
parent 8f1f33aeab
commit 4a7da84bc4
26 changed files with 6612 additions and 14578 deletions

View File

@@ -1,69 +0,0 @@
From bb571d27350ba5e38ae1f2025dc32d826e21e48c Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Wed, 28 May 2014 22:05:17 +0800
Subject: [PATCH 01/21] share mingw fset-stack-executable with cygwin
---
gcc/config/i386/cygming.opt | 4 ++++
gcc/config/i386/cygwin.h | 4 ++++
gcc/config/i386/mingw.opt | 4 ----
libgcc/config.host | 3 +++
4 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gcc/config/i386/cygming.opt b/gcc/config/i386/cygming.opt
index c7e398f..ff63140 100644
--- a/gcc/config/i386/cygming.opt
+++ b/gcc/config/i386/cygming.opt
@@ -50,6 +50,10 @@ muse-libstdc-wrappers
Target Condition({defined (USE_CYGWIN_LIBSTDCXX_WRAPPERS)})
Compile code that relies on Cygwin DLL wrappers to support C++ operator new/delete replacement.
+fset-stack-executable
+Common Report Var(flag_setstackexecutable) Init(1) Optimization
+For nested functions on stack executable permission is set.
+
posix
Driver
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
index 2186937..803fb6c 100644
--- a/gcc/config/i386/cygwin.h
+++ b/gcc/config/i386/cygwin.h
@@ -156,3 +156,7 @@ along with GCC; see the file COPYING3. If not see
/* We should find a way to not have to update this manually. */
#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-16.dll"
+/* Make stack executable to avoid DEP problems with trampolines. */
+#define HAVE_ENABLE_EXECUTE_STACK
+#undef CHECK_EXECUTE_STACK_ENABLED
+#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable
diff --git a/gcc/config/i386/mingw.opt b/gcc/config/i386/mingw.opt
index 322b66c..a0065a6 100644
--- a/gcc/config/i386/mingw.opt
+++ b/gcc/config/i386/mingw.opt
@@ -28,8 +28,4 @@ Wpedantic-ms-format
C ObjC C++ ObjC++ Var(warn_pedantic_ms_format) Init(1) Warning
Warn about none ISO msvcrt scanf/printf width extensions.
-fset-stack-executable
-Common Report Var(flag_setstackexecutable) Init(1) Optimization
-For nested functions on stack executable permission is set.
-
; Need to retain blank line above.
diff --git a/libgcc/config.host b/libgcc/config.host
index 140aa22..ecaabc1 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -313,6 +313,9 @@ case ${host} in
i[34567]86-*-mingw* | x86_64-*-mingw*)
enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
;;
+i[34567]86-*-cygwin* | x86_64-*-cygwin*)
+ enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
+ ;;
*)
enable_execute_stack=enable-execute-stack-empty.c;
;;
--
2.4.5

View File

@@ -1,52 +0,0 @@
diff --git a/Makefile.in b/Makefile.in
index b824e0a..c6b419b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1684,7 +1684,6 @@ install-info-target: maybe-install-info-target-libhsail-rt
install-info-target: maybe-install-info-target-libtermcap
install-info-target: maybe-install-info-target-winsup
install-info-target: maybe-install-info-target-libgloss
-install-info-target: maybe-install-info-target-libffi
install-info-target: maybe-install-info-target-zlib
install-info-target: maybe-install-info-target-rda
install-info-target: maybe-install-info-target-libada
@@ -1770,7 +1769,6 @@ install-pdf-target: maybe-install-pdf-target-libhsail-rt
install-pdf-target: maybe-install-pdf-target-libtermcap
install-pdf-target: maybe-install-pdf-target-winsup
install-pdf-target: maybe-install-pdf-target-libgloss
-install-pdf-target: maybe-install-pdf-target-libffi
install-pdf-target: maybe-install-pdf-target-zlib
install-pdf-target: maybe-install-pdf-target-rda
install-pdf-target: maybe-install-pdf-target-libada
@@ -1856,7 +1854,6 @@ install-html-target: maybe-install-html-target-libhsail-rt
install-html-target: maybe-install-html-target-libtermcap
install-html-target: maybe-install-html-target-winsup
install-html-target: maybe-install-html-target-libgloss
-install-html-target: maybe-install-html-target-libffi
install-html-target: maybe-install-html-target-zlib
install-html-target: maybe-install-html-target-rda
install-html-target: maybe-install-html-target-libada
@@ -1942,7 +1939,6 @@ installcheck-target: maybe-installcheck-target-libhsail-rt
installcheck-target: maybe-installcheck-target-libtermcap
installcheck-target: maybe-installcheck-target-winsup
installcheck-target: maybe-installcheck-target-libgloss
-installcheck-target: maybe-installcheck-target-libffi
installcheck-target: maybe-installcheck-target-zlib
installcheck-target: maybe-installcheck-target-rda
installcheck-target: maybe-installcheck-target-libada
@@ -2610,7 +2606,6 @@ install-target: \
maybe-install-target-libtermcap \
maybe-install-target-winsup \
maybe-install-target-libgloss \
- maybe-install-target-libffi \
maybe-install-target-zlib \
maybe-install-target-rda \
maybe-install-target-libada \
@@ -2716,7 +2711,6 @@ install-strip-target: \
maybe-install-strip-target-libtermcap \
maybe-install-strip-target-winsup \
maybe-install-strip-target-libgloss \
- maybe-install-strip-target-libffi \
maybe-install-strip-target-zlib \
maybe-install-strip-target-rda \
maybe-install-strip-target-libada \

View File

@@ -1,7 +1,7 @@
From 0817191f16ba1318a84ea184887c1119f298bc45 Mon Sep 17 00:00:00 2001
From 923ac76f3406cb3ce680436dd9d4755308295180 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:35:02 +0800
Subject: [PATCH 10/21] Do not version lto plugin on cygwin/mingw
Subject: [PATCH] Do not version lto plugin on cygwin/mingw
Conflicts:
lto-plugin/Makefile.am
@@ -13,10 +13,10 @@ Conflicts:
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/config.host b/gcc/config.host
index 8b7e16d..361de8e 100644
index c65569d..59514ca 100644
--- a/gcc/config.host
+++ b/gcc/config.host
@@ -232,14 +232,14 @@ case ${host} in
@@ -236,7 +236,7 @@ case ${host} in
out_host_hook_obj=host-cygwin.o
host_xmake_file="${host_xmake_file} i386/x-cygwin"
host_exeext=.exe
@@ -25,25 +25,26 @@ index 8b7e16d..361de8e 100644
;;
i[34567]86-*-mingw32*)
host_xm_file=i386/xm-mingw32.h
host_xmake_file="${host_xmake_file} i386/x-mingw32"
@@ -244,7 +244,7 @@ case ${host} in
host_exeext=.exe
out_host_hook_obj=host-mingw32.o
host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
- host_lto_plugin_soname=liblto_plugin-0.dll
+ host_lto_plugin_soname=liblto_plugin.dll
;;
x86_64-*-mingw*)
use_long_long_for_widest_fast_int=yes
@@ -247,7 +247,7 @@ case ${host} in
host_xmake_file="${host_xmake_file} i386/x-mingw32"
@@ -253,7 +253,7 @@ case ${host} in
host_exeext=.exe
out_host_hook_obj=host-mingw32.o
host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
- host_lto_plugin_soname=liblto_plugin-0.dll
+ host_lto_plugin_soname=liblto_plugin.dll
;;
i[34567]86-*-uwin*)
echo "*** UWIN may not be used as a host platform because"
i[34567]86-*-darwin* | x86_64-*-darwin*)
out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index a90a5da..1ebf155 100644
index 28dc210..2e51b32 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -21,7 +21,7 @@ in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
@@ -56,10 +57,10 @@ index a90a5da..1ebf155 100644
libiberty = $(with_libiberty)/libiberty.a
libiberty_noasan = $(with_libiberty)/noasan/libiberty.a
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index 06ef5f3..ec5b3e6 100644
index c69cc32..0a39289 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -264,7 +264,7 @@ libexecsub_LTLIBRARIES = liblto_plugin.la
@@ -265,7 +265,7 @@ libexecsub_LTLIBRARIES = liblto_plugin.la
in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
liblto_plugin_la_SOURCES = lto-plugin.c
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
@@ -69,5 +70,5 @@ index 06ef5f3..ec5b3e6 100644
$(libiberty_noasan)),, $(if $(wildcard \
$(libiberty_pic)),,-Wc,$(libiberty)))
--
2.4.5
2.17.0

View File

@@ -1,23 +1,23 @@
From fb545617895ad517f57367b5b0366b066c28dc3b Mon Sep 17 00:00:00 2001
From a20be7b6dad49a10e4f11f00950e01925a3600fd Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:54:57 +0800
Subject: [PATCH 13/21] skip test for cygwin/mingw
Subject: [PATCH] skip test for cygwin/mingw
---
gcc/testsuite/gcc.target/i386/pr25993.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.target/i386/pr25993.c b/gcc/testsuite/gcc.target/i386/pr25993.c
index b079e25..c30eaf5 100644
index 1e7e933..2b12f97 100644
--- a/gcc/testsuite/gcc.target/i386/pr25993.c
+++ b/gcc/testsuite/gcc.target/i386/pr25993.c
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" } { "*" } { "" } } */
+/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" } { "*" } { "" } } */
-/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" } } */
+/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" } } */
/* { dg-options "-std=c99 -x assembler-with-cpp" } */
#ifndef __ASSEMBLER__
--
2.4.5
2.17.0

View File

@@ -47,41 +47,41 @@ index c8e6512..73e8928 100644
msg = "unhandled signal";
}
-#if ! defined (_WIN64)
-#if !defined (_WIN64)
+#if !defined(_WIN64) && !defined(__CYGWIN__)
/* This call is important as it avoids locking the second time we catch a
signal. Note that this routine is documented as internal to Windows and
should not be used. */
signal; it's equivalent to RtlUnwind (EstablisherFrame, NULL, NULL, 0);
Note that this routine is documented as internal to Windows and should
@@ -203,9 +207,9 @@ __gnat_SEH_error_handler (struct _EXCEPTION_RECORD* ExceptionRecord,
Raise_From_Signal_Handler (exception, msg);
}
-#endif /* !(defined (_WIN64) && defined (__SEH__)) */
+#endif /* !(defined (__x86_64__) && defined (__SEH__)) */
-#if defined (_WIN64)
+#if defined (__x86_64__)
/* On x86_64 windows exception mechanism is no more based on a chained list
of handlers addresses on the stack. Instead unwinding information is used
to retrieve the exception handler (similar to ZCX GCC mechanism). So in
/* On x86-64/Windows the EH mechanism is no more based on a chained list of
handlers addresses on the stack. Instead unwinding information is used
@@ -258,7 +262,7 @@ void __gnat_install_SEH_handler (void *eh ATTRIBUTE_UNUSED)
just above. */
{
}
-#else /* defined (_WIN64) */
+#else /* defined (__x86_64__) */
/* Install the Win32 SEH exception handler. Note that the caller must have
allocated 8 bytes on the stack and pass the pointer to this stack
space. This is needed as the SEH exception handler must be on the stack of
/* Install the Win32 SEH exception handler. Note that the caller must have
allocated 8 bytes on the stack and pass the pointer to this stack space.
@@ -291,7 +295,7 @@ __gnat_install_SEH_handler (void *ER)
}
#endif
-#else /* defined (_WIN32) */
+#else /* defined (_WIN32) || defined(__CYGWIN__) */
/* For all non Windows targets we provide a dummy SEH install handler. */
/* For all non-Windows targets we provide a dummy SEH install handler. */
void __gnat_install_SEH_handler (void *eh ATTRIBUTE_UNUSED)
{
diff --git a/gcc/ada/system-cygwin-x86_64.ads b/gcc/ada/system-cygwin-x86_64.ads
new file mode 100644
index 0000000..9305ec1

View File

@@ -1,3 +1,26 @@
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 7a57019..6feeaf9 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -755,7 +755,7 @@
# Default shared object option. Note that we rely on the fact that the "soname"
# option will always be present and last in this flag, so that we can have
-# $(SO_OPTS)libgnat-x.xx
+# $(SO_OPTS)$(soprefix)gnat-x.xx
SO_OPTS = -Wl,-soname,
@@ -2026,6 +2026,9 @@
GMEM_LIB = gmemlib
EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
+ ifeq ($(strip $(filter-out cygwin%,$(target_os))),)
+ soprefix = cyg
+ endif
soext = .dll
LIBRARY_VERSION := $(LIB_VERSION)
endif
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 7a57019..6feeaf9 100644
--- a/gcc/ada/gcc-interface/Makefile.in
@@ -10,25 +33,6 @@ index 7a57019..6feeaf9 100644
# program_transform_name and objdir are set by configure.ac.
program_transform_name =
@@ -373,7 +374,7 @@ EH_MECHANISM=
# Default shared object option. Note that we rely on the fact that the "soname"
# option will always be present and last in this flag, so that we can have
-# $(SO_OPTS)libgnat-x.xx
+# $(SO_OPTS)$(soprefix)gnat-x.xx
SO_OPTS = -Wl,-soname,
@@ -1847,6 +1848,9 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
GMEM_LIB = gmemlib
EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
+ ifeq ($(strip $(filter-out cygwin%,$(target_os))),)
+ soprefix = cyg
+ endif
soext = .dll
LIBRARY_VERSION := $(LIB_VERSION)
endif
@@ -2686,16 +2690,16 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs
# Also install the .dSYM directories if they exist (these directories
# contain the debug information for the shared libraries on darwin)

View File

@@ -23,11 +23,11 @@ index 138eeb1..f688e84 100644
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 \
@@ -473,7 +472,7 @@ clean-toolexeclibLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
}
libitm.la: $(libitm_la_OBJECTS) $(libitm_la_DEPENDENCIES) $(EXTRA_libitm_la_DEPENDENCIES)
- $(libitm_la_LINK) -rpath $(toolexeclibdir) $(libitm_la_OBJECTS) $(libitm_la_LIBADD) $(LIBS)
+ $(CXXLINK) $(libitm_la_LDFLAGS) -rpath $(toolexeclibdir) $(libitm_la_OBJECTS) $(libitm_la_LIBADD) $(LIBS)
- $(AM_V_GEN)$(libitm_la_LINK) -rpath $(toolexeclibdir) $(libitm_la_OBJECTS) $(libitm_la_LIBADD) $(LIBS)
+ $(AM_V_GEN)$(CXXLINK) $(libitm_la_LDFLAGS) -rpath $(toolexeclibdir) $(libitm_la_OBJECTS) $(libitm_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -143,7 +143,7 @@ index a6c06b5..a4ba223 100644
+#if !defined (HAVE_ELF_STYLE_WEAKREF) && !defined(PIC)
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 (*) (void *)) { return; }
void *__cxa_begin_catch (void *) { return NULL; }
void __cxa_end_catch (void) { return; }
void __cxa_tm_cleanup (void *, void *, unsigned int) { return; }

View File

@@ -1,7 +1,7 @@
This was just a bit outdated...
--- origsrc/gcc-5.3.0/libstdc++-v3/acinclude.m4 2015-11-24 07:25:07.000000000 -0600
+++ src/gcc-5.3.0/libstdc++-v3/acinclude.m4 2016-04-01 00:21:40.077426000 -0500
--- 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
@@ -13,8 +13,8 @@ This was just a bit outdated...
;;
darwin*)
ac_has_nanosleep=yes
--- origsrc/gcc-5.3.0/libstdc++-v3/configure 2016-03-31 21:24:38.558164300 -0500
+++ src/gcc-5.3.0/libstdc++-v3/configure 2016-04-01 00:26:14.110723800 -0500
--- 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

View File

@@ -1,5 +1,5 @@
--- origsrc/gcc-6.4.0/gcc/glimits.h 2016-01-04 08:30:50.652828000 -0600
+++ src/gcc-6.4.0/gcc/glimits.h 2017-11-13 18:46:28.887539100 -0600
--- gcc-6.4.0/gcc/glimits.h 2016-01-04 08:30:50.652828000 -0600
+++ gcc-6.4.0/gcc/glimits.h 2017-11-13 18:46:28.887539100 -0600
@@ -111,7 +111,7 @@
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
#endif

View File

@@ -1,5 +1,5 @@
--- origsrc/gcc-6.4.0/gcc/config/i386/cygwin.h 2017-11-03 00:47:46.634665300 -0500
+++ src/gcc-6.4.0/gcc/config/i386/cygwin.h 2018-01-15 16:36:17.677500200 -0600
--- gcc-6.4.0/gcc/config/i386/cygwin.h 2017-11-03 00:47:46.634665300 -0500
+++ gcc-6.4.0/gcc/config/i386/cygwin.h 2018-01-15 16:36:17.677500200 -0600
@@ -24,14 +24,12 @@
builtin_define ("__CYGWIN__"); \
if (!TARGET_64BIT) \

View File

@@ -0,0 +1,11 @@
--- gcc-8.3.0/gcc/ada/raise-gcc.c 2018-01-11 16:55:25.000000000 +0800
+++ gcc-8.3.0/gcc/ada/raise-gcc.c 2019-04-03 20:46:23.784233200 +0800
@@ -32,6 +32,8 @@
/* Code related to the integration of the GCC mechanism for exception
handling. */
+#include "adaint.h"
+
#ifndef IN_RTS
/* For gnat1/gnatbind compilation: use host headers. */
# include "config.h"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,55 @@
--- a/gcc/diagnostic-color.c 2018-01-03 16:03:58.000000000 +0600
+++ b/gcc/diagnostic-color.c 2018-08-02 16:33:22.679146900 +0600
@@ -22,6 +22,7 @@
#ifdef __MINGW32__
# include <windows.h>
+# include <winternl.h>
#endif
#include "color-macros.h"
@@ -208,10 +209,42 @@
to care about it either... */
HANDLE h;
DWORD m;
-
+ bool ret = false;
h = GetStdHandle (STD_ERROR_HANDLE);
- return (h != INVALID_HANDLE_VALUE) && (h != NULL)
+ ret = (h != INVALID_HANDLE_VALUE) && (h != NULL)
&& GetConsoleMode (h, &m);
+ if (!ret){
+ HMODULE ntdll = GetModuleHandle ("ntdll.dll");
+ if (ntdll != INVALID_HANDLE_VALUE){
+
+ typedef NTSTATUS NTAPI func_NtQueryObject (HANDLE, OBJECT_INFORMATION_CLASS,
+ PVOID, ULONG, PULONG);
+ func_NtQueryObject *fNtQueryObject =
+ (func_NtQueryObject*) GetProcAddress (ntdll, "NtQueryObject");
+ if (fNtQueryObject){
+
+ ULONG s = 0xffff * sizeof (WCHAR);
+ OBJECT_NAME_INFORMATION *oni = (OBJECT_NAME_INFORMATION*) xmalloc (s);
+ ULONG len;
+ /* mintty uses a named pipe like "ptyNNNN-to-master". */
+ if (!fNtQueryObject (h, ObjectNameInformation, oni, s, &len))
+ {
+ wchar_t namedPipe[] = L"\\Device\\NamedPipe\\";
+ size_t l1 = sizeof (namedPipe) / 2 - 1;
+ wchar_t toMaster[] = L"-to-master";
+ size_t l2 = sizeof (toMaster) / 2 - 1;
+ USHORT name_length = oni->Name.Length / 2;
+ if (name_length > l1 + l2 &&
+ !memcmp (oni->Name.Buffer, namedPipe, l1 * 2) &&
+ !memcmp (oni->Name.Buffer + (name_length - l2), toMaster, l2 * 2))
+ ret = true;
+ }
+
+ free (oni);
+ }
+ }
+ }
+ return ret;
#else
char const *t = getenv ("TERM");
return t && strcmp (t, "dumb") != 0 && isatty (STDERR_FILENO);

View File

@@ -0,0 +1,235 @@
--- gcc-9-branch/gcc/ada/exp_ch9.adb 2019/04/25 17:59:56 270580
+++ gcc-9-branch/gcc/ada/exp_ch9.adb 2019/06/17 07:35:02 272374
@@ -8258,18 +8258,17 @@
Proc : Entity_Id;
begin
- -- Try to use System.Relative_Delays.Delay_For only if available. This
- -- is the implementation used on restricted platforms when Ada.Calendar
- -- is not available.
+ -- Try to use Ada.Calendar.Delays.Delay_For if available.
- if RTE_Available (RO_RD_Delay_For) then
- Proc := RTE (RO_RD_Delay_For);
+ if RTE_Available (RO_CA_Delay_For) then
+ Proc := RTE (RO_CA_Delay_For);
- -- Otherwise, use Ada.Calendar.Delays.Delay_For and emit an error
- -- message if not available.
+ -- Otherwise, use System.Relative_Delays.Delay_For and emit an error
+ -- message if not available. This is the implementation used on
+ -- restricted platforms when Ada.Calendar is not available.
else
- Proc := RTE (RO_CA_Delay_For);
+ Proc := RTE (RO_RD_Delay_For);
end if;
Rewrite (N,
Index: gcc-9-branch/gcc/ada/sem_ch5.adb
===================================================================
--- gcc-9-branch/gcc/ada/sem_ch5.adb (revision 337119)
+++ gcc-9-branch/gcc/ada/sem_ch5.adb (working copy)
@@ -3367,8 +3367,6 @@
-- The following exception is raised by routine Prepare_Loop_Statement
-- to avoid further analysis of a transformed loop.
- Skip_Analysis : exception;
-
function Disable_Constant (N : Node_Id) return Traverse_Result;
-- If N represents an E_Variable entity, set Is_True_Constant To False
@@ -3376,11 +3374,12 @@
-- Helper for Analyze_Loop_Statement, to unset Is_True_Constant on
-- variables referenced within an OpenACC construct.
- procedure Prepare_Loop_Statement (Iter : Node_Id);
+ procedure Prepare_Loop_Statement
+ (Iter : Node_Id;
+ Stop_Processing : out Boolean);
-- Determine whether loop statement N with iteration scheme Iter must be
- -- transformed prior to analysis, and if so, perform it. The routine
- -- raises Skip_Analysis to prevent further analysis of the transformed
- -- loop.
+ -- transformed prior to analysis, and if so, perform it.
+ -- If Stop_Processing is set to True, should stop further processing.
----------------------
-- Disable_Constant --
@@ -3402,7 +3401,10 @@
-- Prepare_Loop_Statement --
----------------------------
- procedure Prepare_Loop_Statement (Iter : Node_Id) is
+ procedure Prepare_Loop_Statement
+ (Iter : Node_Id;
+ Stop_Processing : out Boolean)
+ is
function Has_Sec_Stack_Default_Iterator
(Cont_Typ : Entity_Id) return Boolean;
pragma Inline (Has_Sec_Stack_Default_Iterator);
@@ -3422,21 +3424,27 @@
-- Determine whether arbitrary statement Stmt is the sole statement
-- wrapped within some block, excluding pragmas.
- procedure Prepare_Iterator_Loop (Iter_Spec : Node_Id);
+ procedure Prepare_Iterator_Loop
+ (Iter_Spec : Node_Id;
+ Stop_Processing : out Boolean);
pragma Inline (Prepare_Iterator_Loop);
-- Prepare an iterator loop with iteration specification Iter_Spec
-- for transformation if needed.
+ -- If Stop_Processing is set to True, should stop further processing.
- procedure Prepare_Param_Spec_Loop (Param_Spec : Node_Id);
+ procedure Prepare_Param_Spec_Loop
+ (Param_Spec : Node_Id;
+ Stop_Processing : out Boolean);
pragma Inline (Prepare_Param_Spec_Loop);
-- Prepare a discrete loop with parameter specification Param_Spec
-- for transformation if needed.
+ -- If Stop_Processing is set to True, should stop further processing.
procedure Wrap_Loop_Statement (Manage_Sec_Stack : Boolean);
- pragma Inline (Wrap_Loop_Statement);
- pragma No_Return (Wrap_Loop_Statement);
+ pragma Inline (Wrap_Loop_Statement);
-- Wrap loop statement N within a block. Flag Manage_Sec_Stack must
-- be set when the block must mark and release the secondary stack.
+ -- Should stop further processing after calling this procedure.
------------------------------------
-- Has_Sec_Stack_Default_Iterator --
@@ -3512,12 +3520,17 @@
-- Prepare_Iterator_Loop --
---------------------------
- procedure Prepare_Iterator_Loop (Iter_Spec : Node_Id) is
+ procedure Prepare_Iterator_Loop
+ (Iter_Spec : Node_Id;
+ Stop_Processing : out Boolean)
+ is
Cont_Typ : Entity_Id;
Nam : Node_Id;
Nam_Copy : Node_Id;
begin
+ Stop_Processing := False;
+
-- The iterator specification has syntactic errors. Transform the
-- loop into an infinite loop in order to safely perform at least
-- some minor analysis. This check must come first.
@@ -3525,9 +3538,8 @@
if Error_Posted (Iter_Spec) then
Set_Iteration_Scheme (N, Empty);
Analyze (N);
+ Stop_Processing := True;
- raise Skip_Analysis;
-
-- Nothing to do when the loop is already wrapped in a block
elsif Is_Wrapped_In_Block (N) then
@@ -3586,6 +3598,7 @@
(Cont_Typ, Name_First)
or else Is_Sec_Stack_Iteration_Primitive
(Cont_Typ, Name_Next));
+ Stop_Processing := True;
end if;
end if;
end Prepare_Iterator_Loop;
@@ -3594,7 +3607,10 @@
-- Prepare_Param_Spec_Loop --
-----------------------------
- procedure Prepare_Param_Spec_Loop (Param_Spec : Node_Id) is
+ procedure Prepare_Param_Spec_Loop
+ (Param_Spec : Node_Id;
+ Stop_Processing : out Boolean)
+ is
High : Node_Id;
Low : Node_Id;
Rng : Node_Id;
@@ -3602,6 +3618,7 @@
Rng_Typ : Entity_Id;
begin
+ Stop_Processing := False;
Rng := Discrete_Subtype_Definition (Param_Spec);
-- Nothing to do when the loop is already wrapped in a block
@@ -3635,11 +3652,10 @@
-- on the secondary stack. Note that the loop must be wrapped
-- only when such a call exists.
- if Has_Sec_Stack_Call (Low)
- or else
- Has_Sec_Stack_Call (High)
+ if Has_Sec_Stack_Call (Low) or else Has_Sec_Stack_Call (High)
then
Wrap_Loop_Statement (Manage_Sec_Stack => True);
+ Stop_Processing := True;
end if;
-- Otherwise the parameter specification appears in the form
@@ -3676,6 +3692,7 @@
and then Needs_Finalization (Rng_Typ))
then
Wrap_Loop_Statement (Manage_Sec_Stack => True);
+ Stop_Processing := True;
end if;
end if;
end Prepare_Param_Spec_Loop;
@@ -3703,8 +3720,6 @@
Rewrite (N, Blk);
Analyze (N);
-
- raise Skip_Analysis;
end Wrap_Loop_Statement;
-- Local variables
@@ -3715,11 +3730,13 @@
-- Start of processing for Prepare_Loop_Statement
begin
+ Stop_Processing := False;
+
if Present (Iter_Spec) then
- Prepare_Iterator_Loop (Iter_Spec);
+ Prepare_Iterator_Loop (Iter_Spec, Stop_Processing);
elsif Present (Param_Spec) then
- Prepare_Param_Spec_Loop (Param_Spec);
+ Prepare_Param_Spec_Loop (Param_Spec, Stop_Processing);
end if;
end Prepare_Loop_Statement;
@@ -3818,7 +3835,15 @@
-- wrapped within a block in order to manage the secondary stack.
if Present (Iter) then
- Prepare_Loop_Statement (Iter);
+ declare
+ Stop_Processing : Boolean;
+ begin
+ Prepare_Loop_Statement (Iter, Stop_Processing);
+
+ if Stop_Processing then
+ return;
+ end if;
+ end;
end if;
-- Kill current values on entry to loop, since statements in the body of
@@ -3992,10 +4017,6 @@
if Is_OpenAcc_Environment (Stmt) then
Disable_Constants (Stmt);
end if;
-
- exception
- when Skip_Analysis =>
- null;
end Analyze_Loop_Statement;
----------------------------

View File

@@ -1,40 +0,0 @@
From cfe4caf51c829a6bd746566a0b205354fa042dc3 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexey.pawlow@gmail.com>
Date: Wed, 5 Aug 2015 23:36:19 +0100
Subject: [PATCH 08/15] Prettify linking -no-undefined
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
cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
libcaf_single_la_SOURCES = caf/single.c
-libcaf_single_la_LDFLAGS = -static
+libcaf_single_la_LDFLAGS = -static -no-undefined
libcaf_single_la_DEPENDENCIES = caf/libcaf.h
libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS)
diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in
index 0f60e6e..8473026 100644
--- a/libgfortran/Makefile.in
+++ b/libgfortran/Makefile.in
@@ -615,7 +615,7 @@ libgfortranbegin_la_LINK = $(LINK) $(libgfortranbegin_la_LDFLAGS)
cafexeclib_LTLIBRARIES = libcaf_single.la
cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
libcaf_single_la_SOURCES = caf/single.c
-libcaf_single_la_LDFLAGS = -static
+libcaf_single_la_LDFLAGS = -static -no-undefined
libcaf_single_la_DEPENDENCIES = caf/libcaf.h
libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS)
@IEEE_SUPPORT_TRUE@fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude
--
2.8.1

View File

@@ -1,44 +0,0 @@
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,154 +0,0 @@
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://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
index aa17378..631d9c4 100644
--- a/gcc/config/i386/host-mingw32.c
+++ b/gcc/config/i386/host-mingw32.c
@@ -42,9 +42,6 @@ static size_t mingw32_gt_pch_alloc_granularity (void);
static inline void w32_error(const char*, const char*, int, const char*);
-/* FIXME: Is this big enough? */
-static const size_t pch_VA_max_size = 128 * 1024 * 1024;
-
/* Granularity for reserving address space. */
static size_t va_granularity = 0x10000;
@@ -86,9 +83,6 @@ static void *
mingw32_gt_pch_get_address (size_t size, int)
{
void* res;
- size = (size + va_granularity - 1) & ~(va_granularity - 1);
- if (size > pch_VA_max_size)
- return NULL;
/* FIXME: We let system determine base by setting first arg to NULL.
Allocating at top of available address space avoids unnecessary
@@ -98,7 +92,7 @@ mingw32_gt_pch_get_address (size_t size, int)
If we allocate at bottom we need to reserve the address as early
as possible and at the same point in each invocation. */
- res = VirtualAlloc (NULL, pch_VA_max_size,
+ res = VirtualAlloc (NULL, size,
MEM_RESERVE | MEM_TOP_DOWN,
PAGE_NOACCESS);
if (!res)
@@ -148,7 +142,7 @@ mingw32_gt_pch_use_address (void *addr, size_t size, int fd,
/* Offset must be also be a multiple of allocation granularity for
this to work. We can't change the offset. */
- if ((offset & (va_granularity - 1)) != 0 || size > pch_VA_max_size)
+ if ((offset & (va_granularity - 1)) != 0)
return -1;
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 03fbe7d..3a5df8a 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -603,7 +603,9 @@ gt_pch_restore (FILE *f)
size_t i;
struct mmap_info mmi;
int result;
-
+ long pch_tabs_off;
+ long pch_data_off;
+
/* 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)
for (rti = *rt; rti->base != NULL; rti++)
memset (rti->base, 0, rti->stride);
- /* Read in all the scalar variables. */
+ /* We need to read tables after mapping, or fatal_error will
+ segfault when gt_pch_use_address returns -1. Skip them for now. */
+ pch_tabs_off = ftell(f);
+
+ /* Skip all the scalar variables. */
for (rt = gt_pch_scalar_rtab; *rt; rt++)
for (rti = *rt; rti->base != NULL; rti++)
- if (fread (rti->base, rti->stride, 1, f) != 1)
- fatal_error (input_location, "can%'t read PCH file: %m");
+ if (fseek (f, rti->stride, SEEK_CUR) != 0)
+ fatal_error (input_location, "can%'t read PCH file: %m");
- /* Read in all the global pointers, in 6 easy loops. */
+ /* Skip all the global pointers. */
for (rt = gt_ggc_rtab; *rt; rt++)
for (rti = *rt; rti->base != NULL; rti++)
for (i = 0; i < rti->nelt; i++)
- if (fread ((char *)rti->base + rti->stride * i,
- sizeof (void *), 1, f) != 1)
- fatal_error (input_location, "can%'t read PCH file: %m");
-
+ if (fseek (f, sizeof (void *), SEEK_CUR) != 0)
+ fatal_error (input_location, "can%'t read PCH file: %m");
+
+ /* mmi still has to be read now. */
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)
if (result == 0)
{
if (fseek (f, mmi.offset, SEEK_SET) != 0
- || fread (mmi.preferred_base, mmi.size, 1, f) != 1)
- fatal_error (input_location, "can%'t read PCH file: %m");
+ || fread (mmi.preferred_base, mmi.size, 1, f) != 1)
+ fatal_error (input_location, "can%'t read PCH file: %m");
}
else if (fseek (f, mmi.offset + mmi.size, SEEK_SET) != 0)
fatal_error (input_location, "can%'t read PCH file: %m");
+
+ /* File mapping done, read tables now. */
+ pch_data_off = ftell(f);
+
+ if (fseek (f, pch_tabs_off, SEEK_SET) != 0)
+ fatal_error (input_location, "can%'t read PCH file: %m");
+ /* Read in all the scalar variables. */
+ for (rt = gt_pch_scalar_rtab; *rt; rt++)
+ for (rti = *rt; rti->base != NULL; rti++)
+ if (fread (rti->base, rti->stride, 1, f) != 1)
+ fatal_error (input_location, "can%'t read PCH file: %m");
+
+ /* Read in all the global pointers, in 6 easy loops. */
+ for (rt = gt_ggc_rtab; *rt; rt++)
+ for (rti = *rt; rti->base != NULL; rti++)
+ for (i = 0; i < rti->nelt; i++)
+ if (fread ((char *)rti->base + rti->stride * i,
+ sizeof (void *), 1, f) != 1)
+ fatal_error (input_location, "can%'t read PCH file: %m");
+
+ if (fseek (f, pch_data_off, SEEK_SET) != 0)
+ fatal_error (input_location, "can%'t read PCH file: %m");
+
ggc_pch_read (f, mmi.preferred_base);
gt_pch_restore_stringpool ();
--
2.8.1

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys.h gcc-6.3.0/gcc/config/i386/msys.h
--- gcc-6.3.0-orig/gcc/config/i386/msys.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-6.3.0/gcc/config/i386/msys.h 2017-01-24 12:04:34.338454000 +0300
@@ -0,0 +1,175 @@
diff -Naur gcc-9.1.0-orig/gcc/config/i386/msys.h gcc-9.1.0/gcc/config/i386/msys.h
--- gcc-9.1.0-orig/gcc/config/i386/msys.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-9.1.0/gcc/config/i386/msys.h 2019-07-04 09:29:53.731598700 +0300
@@ -0,0 +1,160 @@
+/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows32, using a Unix style C library and tools.
+ Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 1995-2019 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
@@ -25,18 +25,16 @@ diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys.h gcc-6.3.0/gcc/config/i386/msys.
+#define EXTRA_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__CYGWIN__"); \
+ builtin_define ("__CYGWIN__"); \
+ builtin_define ("__MSYS__"); \
+ if (!TARGET_64BIT) \
+ builtin_define ("__CYGWIN32__"); \
+ builtin_define ("__unix__"); \
+ builtin_define ("__unix"); \
+ builtin_define_std ("unix"); \
+ } \
+ while (0)
+
+#undef CPP_SPEC
+#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
+ %{!ansi:-Dunix} \
+ %{pthread:-D_REENTRANT} \
+ %{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
+ %{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
@@ -60,13 +58,6 @@ diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys.h gcc-6.3.0/gcc/config/i386/msys.
+ 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 msys-2.0.dll, so we leave it. Profiling is handled
@@ -116,9 +107,6 @@ diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys.h gcc-6.3.0/gcc/config/i386/msys.
+ --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)
+
@@ -156,7 +144,7 @@ diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys.h gcc-6.3.0/gcc/config/i386/msys.
+
+/* Every program on MSYS links against msys-2.0.dll which contains
+ the pthread routines. There is no need to explicitly link them
+ and the -pthread flag is not recognized. */
+ and the -pthread flag is accepted only for compatibility. */
+#undef GOMP_SELF_SPECS
+#define GOMP_SELF_SPECS ""
+#undef GTM_SELF_SPECS
@@ -170,21 +158,18 @@ diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys.h gcc-6.3.0/gcc/config/i386/msys.
+#endif
+#define LIBGCC_SONAME "msys-gcc_s" LIBGCC_EH_EXTN "-1.dll"
+
+/* We should find a way to not have to update this manually. */
+#define LIBGCJ_SONAME "msys-gcj" /*LIBGCC_EH_EXTN*/ "-16.dll"
+
+/* Make stack executable to avoid DEP problems with trampolines. */
+#define HAVE_ENABLE_EXECUTE_STACK
+#undef CHECK_EXECUTE_STACK_ENABLED
+#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable
diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys-w64.h gcc-6.3.0/gcc/config/i386/msys-w64.h
--- gcc-6.3.0-orig/gcc/config/i386/msys-w64.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-6.3.0/gcc/config/i386/msys-w64.h 2017-01-24 12:04:34.354054000 +0300
diff -Naur gcc-9.1.0-orig/gcc/config/i386/msys-w64.h gcc-9.1.0/gcc/config/i386/msys-w64.h
--- gcc-9.1.0-orig/gcc/config/i386/msys-w64.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-9.1.0/gcc/config/i386/msys-w64.h 2019-07-04 09:28:09.788616100 +0300
@@ -0,0 +1,84 @@
+/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows 32/64 via MSYS runtime, using GNU tools and
+ the Windows API Library.
+ Copyright (C) 2013-2015 Free Software Foundation, Inc.
+ Copyright (C) 2013-2019 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
@@ -265,16 +250,16 @@ diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys-w64.h gcc-6.3.0/gcc/config/i386/m
+
+#undef LIBGCC_SONAME
+#define LIBGCC_SONAME "msys-gcc_s-seh-1.dll"
diff -Naur gcc-6.3.0-orig/gcc/config/i386/t-msys-w64 gcc-6.3.0/gcc/config/i386/t-msys-w64
--- gcc-6.3.0-orig/gcc/config/i386/t-msys-w64 1970-01-01 03:00:00.000000000 +0300
+++ gcc-6.3.0/gcc/config/i386/t-msys-w64 2017-01-24 12:04:34.354054000 +0300
diff -Naur gcc-9.1.0-orig/gcc/config/i386/t-msys-w64 gcc-9.1.0/gcc/config/i386/t-msys-w64
--- gcc-9.1.0-orig/gcc/config/i386/t-msys-w64 1970-01-01 03:00:00.000000000 +0300
+++ gcc-9.1.0/gcc/config/i386/t-msys-w64 2019-07-04 09:28:09.788616100 +0300
@@ -0,0 +1,3 @@
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64
+MULTILIB_OSDIRNAMES = ../lib ../lib32
diff -Naur gcc-6.3.0-orig/gcc/config.build gcc-6.3.0/gcc/config.build
--- gcc-6.3.0-orig/gcc/config.build 2016-01-04 17:30:50.000000000 +0300
+++ gcc-6.3.0/gcc/config.build 2017-01-24 12:04:34.354054000 +0300
diff -Naur gcc-9.1.0-orig/gcc/config.build gcc-9.1.0/gcc/config.build
--- gcc-9.1.0-orig/gcc/config.build 2019-01-01 15:31:55.000000000 +0300
+++ gcc-9.1.0/gcc/config.build 2019-07-04 09:28:09.788616100 +0300
@@ -60,6 +60,10 @@
build_xm_file=i386/xm-cygwin.h
build_exeext=.exe
@@ -286,10 +271,10 @@ diff -Naur gcc-6.3.0-orig/gcc/config.build gcc-6.3.0/gcc/config.build
i[34567]86-*-mingw32* | x86_64-*-mingw*)
build_xm_file=i386/xm-mingw32.h
build_exeext=.exe
diff -Naur gcc-6.3.0-orig/gcc/config.gcc gcc-6.3.0/gcc/config.gcc
--- gcc-6.3.0-orig/gcc/config.gcc 2017-01-24 12:01:43.334712400 +0300
+++ gcc-6.3.0/gcc/config.gcc 2017-01-24 12:04:34.354054000 +0300
@@ -1702,6 +1702,37 @@
diff -Naur gcc-9.1.0-orig/gcc/config.gcc gcc-9.1.0/gcc/config.gcc
--- gcc-9.1.0-orig/gcc/config.gcc 2019-07-04 09:00:42.422639700 +0300
+++ gcc-9.1.0/gcc/config.gcc 2019-07-04 09:34:04.845239700 +0300
@@ -1877,6 +1877,38 @@
use_gcc_stdint=wrap
tm_defines="${tm_defines} TARGET_CYGWIN64=1"
;;
@@ -299,7 +284,7 @@ diff -Naur gcc-6.3.0-orig/gcc/config.gcc gcc-6.3.0/gcc/config.gcc
+ tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
+ target_gtfiles="\$(srcdir)/config/i386/winnt.c"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
+ extra_objs="winnt.o winnt-stubs.o"
+ extra_objs="${extra_objs} winnt.o winnt-stubs.o"
+ c_target_objs="${c_target_objs} msformat-c.o"
+ cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
+ if test x$enable_threads = xyes; then
@@ -315,7 +300,7 @@ diff -Naur gcc-6.3.0-orig/gcc/config.gcc gcc-6.3.0/gcc/config.gcc
+ tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-msys-w64"
+ target_gtfiles="\$(srcdir)/config/i386/winnt.c"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
+ extra_objs="winnt.o winnt-stubs.o"
+ extra_objs="${extra_objs} winnt.o winnt-stubs.o"
+ c_target_objs="${c_target_objs} msformat-c.o"
+ cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
+ if test x$enable_threads = xyes; then
@@ -323,11 +308,12 @@ diff -Naur gcc-6.3.0-orig/gcc/config.gcc gcc-6.3.0/gcc/config.gcc
+ fi
+ use_gcc_stdint=wrap
+ default_use_cxa_atexit=yes
+ tm_defines="${tm_defines} TARGET_CYGWIN64=1"
+ ;;
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"
xm_file=i386/xm-mingw32.h
@@ -4420,6 +4451,8 @@
@@ -4925,6 +4957,8 @@
;;
i[34567]86-*-cygwin* | x86_64-*-cygwin*)
;;
@@ -336,9 +322,9 @@ diff -Naur gcc-6.3.0-orig/gcc/config.gcc gcc-6.3.0/gcc/config.gcc
i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
diff -Naur gcc-6.3.0-orig/gcc/config.host gcc-6.3.0/gcc/config.host
--- gcc-6.3.0-orig/gcc/config.host 2017-01-24 11:59:20.670797800 +0300
+++ gcc-6.3.0/gcc/config.host 2017-01-24 12:04:34.369654000 +0300
diff -Naur gcc-9.1.0-orig/gcc/config.host gcc-9.1.0/gcc/config.host
--- gcc-9.1.0-orig/gcc/config.host 2019-07-04 09:00:42.032639000 +0300
+++ gcc-9.1.0/gcc/config.host 2019-07-04 09:28:09.788616100 +0300
@@ -234,6 +234,13 @@
host_exeext=.exe
host_lto_plugin_soname=cyglto_plugin.dll
@@ -353,9 +339,9 @@ diff -Naur gcc-6.3.0-orig/gcc/config.host gcc-6.3.0/gcc/config.host
i[34567]86-*-mingw32*)
host_xm_file=i386/xm-mingw32.h
host_xmake_file="${host_xmake_file} i386/x-mingw32"
diff -Naur gcc-6.3.0-orig/libgcc/config/i386/t-msys gcc-6.3.0/libgcc/config/i386/t-msys
--- gcc-6.3.0-orig/libgcc/config/i386/t-msys 1970-01-01 03:00:00.000000000 +0300
+++ gcc-6.3.0/libgcc/config/i386/t-msys 2017-01-24 12:04:34.385254000 +0300
diff -Naur gcc-9.1.0-orig/libgcc/config/i386/t-msys gcc-9.1.0/libgcc/config/i386/t-msys
--- gcc-9.1.0-orig/libgcc/config/i386/t-msys 1970-01-01 03:00:00.000000000 +0300
+++ gcc-9.1.0/libgcc/config/i386/t-msys 2019-07-04 09:28:09.804216100 +0300
@@ -0,0 +1,19 @@
+# If we are building next to winsup, this will let us find the real
+# limits.h when building libgcc2. Otherwise, winsup must be installed
@@ -376,10 +362,10 @@ diff -Naur gcc-6.3.0-orig/libgcc/config/i386/t-msys gcc-6.3.0/libgcc/config/i386
+# We'd like to use SHLIB_SONAME here too, and we can, since
+# we don't rely on shlib_base_name substitution for it.
+SHLIB_MKMAP_OPTS = -v pe_dll=$(SHLIB_SONAME)
diff -Naur gcc-6.3.0-orig/libgcc/config.host gcc-6.3.0/libgcc/config.host
--- gcc-6.3.0-orig/libgcc/config.host 2017-01-24 11:56:37.708704400 +0300
+++ gcc-6.3.0/libgcc/config.host 2017-01-24 12:04:34.385254000 +0300
@@ -324,6 +324,9 @@
diff -Naur gcc-9.1.0-orig/libgcc/config.host gcc-9.1.0/libgcc/config.host
--- gcc-9.1.0-orig/libgcc/config.host 2019-01-17 15:29:13.000000000 +0300
+++ gcc-9.1.0/libgcc/config.host 2019-07-04 09:28:09.804216100 +0300
@@ -337,6 +337,9 @@
i[34567]86-*-cygwin* | x86_64-*-cygwin*)
enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
;;
@@ -389,7 +375,7 @@ diff -Naur gcc-6.3.0-orig/libgcc/config.host gcc-6.3.0/libgcc/config.host
*)
enable_execute_stack=enable-execute-stack-empty.c;
;;
@@ -698,6 +701,45 @@
@@ -753,6 +756,45 @@
# 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 t-crtfm t-dfprules i386/t-chkstk"
;;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,828 @@
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/abi/bitfield3.C gcc-9.1.0/gcc/testsuite/g++.dg/abi/bitfield3.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/abi/bitfield3.C 2017-04-28 16:41:35.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/abi/bitfield3.C 2019-07-04 09:42:25.327518700 +0300
@@ -3,7 +3,7 @@
// { dg-options "-O2" }
// Cygwin and mingw default to MASK_ALIGN_DOUBLE. Override to ensure
// 4-byte alignment.
-// { dg-additional-options "-mno-align-double" { target i?86-*-cygwin* i?86-*-mingw* } }
+// { dg-additional-options "-mno-align-double" { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* } }
// As for mingw target the ms-bitfield switch is activated by default,
// make sure for this test that it is disabled.
// { dg-additional-options "-mno-ms-bitfields" { target i?86-*-mingw* } }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/abi/rtti3.C gcc-9.1.0/gcc/testsuite/g++.dg/abi/rtti3.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/abi/rtti3.C 2017-06-17 18:32:28.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/abi/rtti3.C 2019-07-04 09:42:25.327518700 +0300
@@ -2,7 +2,7 @@
// necessarily the type info object
// { dg-require-weak "" }
-// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } }
+// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin *-*-msys } }
// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* hppa*-*-hpux* } } } } }
// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* } } } } }
// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZTSPP1A" { target { *-*-darwin* } } } }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/abi/thunk4.C gcc-9.1.0/gcc/testsuite/g++.dg/abi/thunk4.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/abi/thunk4.C 2017-06-17 18:32:28.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/abi/thunk4.C 2019-07-04 09:42:25.327518700 +0300
@@ -1,5 +1,5 @@
// { dg-require-weak "" }
-// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } }
+// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin *-*-msys } }
// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c gcc-9.1.0/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c 2016-10-14 01:26:36.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c 2019-07-04 09:42:25.327518700 +0300
@@ -46,8 +46,8 @@
const char *dg_options[] = {
"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
-"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
-"/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* } } */\n",
+"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* *-*-msys* } } */\n",
+"/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* i?86-*-msys* } } */\n",
"/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
#define NDG_OPTIONS (sizeof (dg_options) / sizeof (dg_options[0]))
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C gcc-9.1.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C 2016-08-09 07:33:58.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C 2019-07-04 09:42:25.327518700 +0300
@@ -1,7 +1,7 @@
// Test for conversion from stateless lambda to function pointer.
// { dg-do compile { target c++11_only } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-hpux10* } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-msys *-*-hpux10* } } } } }
inline void f()
{
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C gcc-9.1.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C 2016-09-14 16:37:23.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C 2019-07-04 09:42:25.327518700 +0300
@@ -12,7 +12,7 @@
// The call operator of that type is _ZZ1giENKUlvE_clEv.
// { dg-final { scan-assembler "_ZZ1giENKUlvE_clEv" } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1giENKUlvE_clEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1giENKUlvE_clEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-msys } } } } }
algo([=]{return n+bef();});
// The captured entities do not participate in <lambda-sig>
@@ -34,7 +34,7 @@
// Type: ZN1S1fEiiEd0_UlvE_
// Operator: _ZZN1S1fEiiEd0_NKUlvE_clEv
// { dg-final { scan-assembler "_ZZN1S1fEiiEd0_NKUlvE_clEv" } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZN1S1fEiiEd0_NKUlvE_clEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZN1S1fEiiEd0_NKUlvE_clEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-msys } } } } }
[]{return 1;}()
// Type: ZN1S1fEiiEd0_UlvE0_
// Operator: _ZZN1S1fEiiEd0_NKUlvE0_clEv
@@ -56,7 +56,7 @@
// Type of lambda in intializer of R<int>::x: N1RIiE1xMUlvE_E
// Corresponding operator(): _ZNK1RIiE1xMUlvE_clEv
// { dg-final { scan-assembler "_ZNK1RIiE1xMUlvE_clEv" } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZNK1RIiE1xMUlvE_clEv" { target { ! { *-*-mingw* *-*-cygwin } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZNK1RIiE1xMUlvE_clEv" { target { ! { *-*-mingw* *-*-cygwin *-*-msys } } } } }
void bar()
{
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllexport1.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllexport1.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllexport1.C 2010-10-10 23:25:09.000000000 +0400
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllexport1.C 2019-07-04 09:42:25.327518700 +0300
@@ -1,5 +1,5 @@
// Test that inline functions are exported with -fkeep-inline-functions.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw*} }
// { dg-options -fkeep-inline-functions }
__attribute__((dllexport)) inline int foo (int a) { return a;}
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllexport3.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllexport3.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllexport3.C 2010-10-10 23:25:09.000000000 +0400
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllexport3.C 2019-07-04 09:42:25.327518700 +0300
@@ -1,5 +1,5 @@
// PR c++/42870
-// { dg-do compile { target i?86-*-cygwin *-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin i?86-*-msys *-*-mingw* } }
// { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZN2SaD1Ev" } }
#define ATTRIBUTE __attribute__ ((dllexport))
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllexport-MI1.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllexport-MI1.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllexport-MI1.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllexport-MI1.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw*} }
// Test that non-virtual MI thunks are exported.
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport1.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport1.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport1.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport1.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,5 +1,5 @@
// PR c++/7910
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// { dg-options { -Wall -W } }
class __attribute__((dllimport)) Foo
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport10.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport10.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport10.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport10.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,7 +1,7 @@
// PR c++/5287, c++/11021
// Inherit a virtual method from a dllimport'd base class.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
struct __attribute__((dllimport)) A
{
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport11.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport11.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport11.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport11.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,6 +1,6 @@
// PR target/23589
// Template member functions do not get dllimport status of class.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
struct __attribute__((dllimport)) Foo
{
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport12.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport12.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport12.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport12.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,7 +1,7 @@
// PR target/27650
// Don't use dllimport semantics on virtual methods when initializing
// vtables
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// Use import lib thunk for vtable entry of explicitly virtual method,
struct base
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport13.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport13.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport13.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport13.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,7 +1,7 @@
// PR c++/34749
// Ensure dllimport is handled correctly for friends
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
int __declspec (dllimport) bar();
int __declspec (dllimport) baz();
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport2.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport2.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport2.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport2.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// PR c++/9738 Dllimport attribute is overriden by later definition/redeclaration
void __attribute__((dllimport)) Bar(void);
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport3.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport3.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport3.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport3.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// PR 10148 Dllimport attribute of object is overriden by later
// redefinition without attribute.
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport4.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport4.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport4.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport4.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,5 +1,5 @@
// Report error if dllimport attribute in definition itself.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
__attribute__((dllimport)) void bar () { } // { dg-error "definition" }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport5.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport5.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport5.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport5.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// Report error if static symbol definition has dllimport attribute.
__attribute__((dllimport))
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport6.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport6.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport6.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport6.C 2019-07-04 09:42:25.343118800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// Mark class static members as dllimport.
struct Baz
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport7.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport7.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport7.C 2017-04-19 09:55:33.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport7.C 2019-07-04 09:42:25.358718800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// Report errors on definition of dllimport'd static data member .
@@ -19,7 +19,7 @@
};
const int Bar::three = 3; // { dg-warning "redeclared without dllimport" }
-// { dg-error "definition of static data" "C++ specific error" { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } .-1 }
+// { dg-error "definition of static data" "C++ specific error" { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } .-1 }
const Baz Bar::null_baz; // { dg-warning "redeclared without dllimport" }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport8.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport8.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport8.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport8.C 2019-07-04 09:42:25.358718800 +0300
@@ -2,7 +2,7 @@
// Ignore dllimport of static members if marked inlined.
// or if definition follows declaration in dllimported class.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// { dg-options { -Wall -W } }
struct __attribute__((dllimport)) Foo
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport9.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport9.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport9.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport9.C 2019-07-04 09:42:25.358718800 +0300
@@ -1,5 +1,5 @@
// Handle dllimport attribute for functions declared inline.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// { dg-options { -W } }
inline __attribute__((dllimport)) void bar() { } // { dg-warning "inline" }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport-initialized.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport-initialized.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport-initialized.C 2019-01-11 12:02:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport-initialized.C 2019-07-04 09:47:40.366072100 +0300
@@ -1,3 +1,3 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
__attribute__((dllimport)) int i __attribute__((unused)) = 0; // { dg-error "32:definition of .int i. is marked .dllimport." }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport-MI1.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport-MI1.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/dllimport-MI1.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/dllimport-MI1.C 2019-07-04 09:42:25.358718800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
// Test handling of MI thunks in dllimported classes.
// To build the dll and client app:
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/selectany1.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/selectany1.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/selectany1.C 2011-01-07 17:12:43.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/selectany1.C 2019-07-04 09:42:25.358718800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-pc-cygwin } }
+// { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } }
// { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
// Check that selectany attribute puts symbols into link-once sections.
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/selectany2.C gcc-9.1.0/gcc/testsuite/g++.dg/ext/selectany2.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/ext/selectany2.C 2015-10-02 11:08:38.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/ext/selectany2.C 2019-07-04 09:42:25.358718800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-pc-cygwin } }
+// { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } }
// { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
// Check for errors with invalid usage of selectany attribute.
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/opt/vt1.C gcc-9.1.0/gcc/testsuite/g++.dg/opt/vt1.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/opt/vt1.C 2017-06-17 18:32:28.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/opt/vt1.C 2019-07-04 09:42:25.358718800 +0300
@@ -2,7 +2,7 @@
// { dg-do compile { target fpic } }
// { dg-options "-O2 -fpic -fno-rtti" }
// { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } }
-// { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin } }
+// { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin *-*-msys } }
// Origin: Jakub Jelinek <jakub@redhat.com>
struct S
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.dg/template/spec35.C gcc-9.1.0/gcc/testsuite/g++.dg/template/spec35.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.dg/template/spec35.C 2016-09-14 16:37:23.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/g++.dg/template/spec35.C 2019-07-04 09:42:25.358718800 +0300
@@ -24,6 +24,6 @@
// { dg-final { scan-assembler-not ".glob(a|)l\[\t \]*_?_Z2f1IiEvT_" } }
f1(0); // Expected to have static linkage
- // { dg-final { scan-assembler ".weak(_definition)?\[\t \]*_?_Z2f2IiEvT_" { target { ! { *-*-mingw* *-*-cygwin } } } } }
+ // { dg-final { scan-assembler ".weak(_definition)?\[\t \]*_?_Z2f2IiEvT_" { target { ! { *-*-mingw* *-*-cygwin *-*-msys } } } } }
f2(0); // Expected to have weak global linkage
}
diff -Naur gcc-9.1.0-orig/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C gcc-9.1.0/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
--- gcc-9.1.0-orig/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C 2012-03-12 19:35:56.000000000 +0400
+++ gcc-9.1.0/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C 2019-07-04 09:42:25.358718800 +0300
@@ -1,4 +1,4 @@
-// { dg-do run { xfail i?86-pc-cygwin } }
+// { dg-do run { xfail i?86-pc-cygwin i?86-pc-msys } }
// Test that attributes weak and alias coexist.
// { dg-require-weak "" }
// { dg-require-alias "" }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/bf-ms-attrib.c gcc-9.1.0/gcc/testsuite/gcc.dg/bf-ms-attrib.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/bf-ms-attrib.c 2016-06-22 00:57:20.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/bf-ms-attrib.c 2019-07-04 09:42:25.358718800 +0300
@@ -3,7 +3,7 @@
posted to GCC-patches
http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */
-/* { dg-do run { target *-*-mingw* *-*-cygwin* } } */
+/* { dg-do run { target *-*-mingw* *-*-cygwin* *-*-msys* } } */
/* We don't want the default "pedantic-errors" in this case, since we're
testing nonstandard stuff to begin with. */
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/bf-ms-layout-3.c gcc-9.1.0/gcc/testsuite/gcc.dg/bf-ms-layout-3.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/bf-ms-layout-3.c 2016-06-22 00:57:20.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/bf-ms-layout-3.c 2019-07-04 09:42:25.358718800 +0300
@@ -1,5 +1,5 @@
/* Test for MS bitfield layout */
-/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target *-*-mingw* *-*-cygwin* *-*-msys* i?86-*-* x86_64-*-* } } */
extern void abort();
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/bf-no-ms-layout.c gcc-9.1.0/gcc/testsuite/gcc.dg/bf-no-ms-layout.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/bf-no-ms-layout.c 2016-06-22 00:57:20.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/bf-no-ms-layout.c 2019-07-04 09:42:25.374318800 +0300
@@ -5,7 +5,7 @@
posted to GCC-patches
http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */
-/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-darwin } } */
+/* { dg-do run { target *-*-mingw* *-*-cygwin* *-*-msys* i?86-*-darwin } } */
/* { dg-options "-mno-ms-bitfields" } */
#include <stddef.h>
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/dll-3.c gcc-9.1.0/gcc/testsuite/gcc.dg/dll-3.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/dll-3.c 2010-10-10 23:25:09.000000000 +0400
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/dll-3.c 2019-07-04 09:42:25.374318800 +0300
@@ -1,7 +1,7 @@
/* Ensure dllexport overrides dllimport. */
/* { dg-do compile { target arm*-*-pe* } } */
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
/* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw*} } */
__declspec (dllimport) int foo1 ();
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/dll-4.c gcc-9.1.0/gcc/testsuite/gcc.dg/dll-4.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/dll-4.c 2010-10-10 23:25:09.000000000 +0400
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/dll-4.c 2019-07-04 09:42:25.374318800 +0300
@@ -1,5 +1,5 @@
/* { dg-do compile { target arm*-*-pe* } } */
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
/* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } } */
__declspec (dllimport) int foo1;
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/dll-5.c gcc-9.1.0/gcc/testsuite/gcc.dg/dll-5.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/dll-5.c 2010-10-10 23:25:09.000000000 +0400
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/dll-5.c 2019-07-04 09:42:25.374318800 +0300
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
/* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } } */
/* { dg-do compile { target arm*-*-pe* } } */
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/dll-8.c gcc-9.1.0/gcc/testsuite/gcc.dg/dll-8.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/dll-8.c 2012-04-10 07:15:22.000000000 +0400
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/dll-8.c 2019-07-04 09:42:25.374318800 +0300
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
/* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw*} } */
/* { dg-options "-O3 -fwhole-program" } */
/* { dg-final { scan-assembler "foo1" } } */
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/graphite/run-id-1.c gcc-9.1.0/gcc/testsuite/gcc.dg/graphite/run-id-1.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/graphite/run-id-1.c 2018-01-08 14:50:14.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/graphite/run-id-1.c 2019-07-04 09:42:25.374318800 +0300
@@ -1,4 +1,4 @@
-/* { dg-options "-Wl,--stack,12582912" { target *-*-mingw* *-*-cygwin* } } */
+/* { dg-options "-Wl,--stack,12582912" { target *-*-mingw* *-*-cygwin* *-*-msys* } } */
/* { dg-require-effective-target size32plus } */
/* { dg-require-stack-size "4*1000*1000" } */
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/lto/20090914-2_0.c gcc-9.1.0/gcc/testsuite/gcc.dg/lto/20090914-2_0.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/lto/20090914-2_0.c 2017-06-17 18:32:28.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/lto/20090914-2_0.c 2019-07-04 09:42:25.374318800 +0300
@@ -1,7 +1,7 @@
/* { dg-lto-do run } */
/* { dg-skip-if "x86 only" { ! { x86_64-*-* i?86-*-* } } } */
/* { dg-skip-if "no .type" { *-*-darwin* } } */
-/* { dg-skip-if "no @function" { *-*-mingw* *-*-cygwin* } } */
+/* { dg-skip-if "no @function" { *-*-mingw* *-*-cygwin* *-*-msys* } } */
/* Doesn't work without this dummy function with -fwhopr. */
int foo(void) { }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c gcc-9.1.0/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c 2019-01-17 15:37:57.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c 2019-07-04 09:44:03.014890300 +0300
@@ -48,10 +48,10 @@
/* AMD GCN loads symbol addresses as hi/lo pairs, and then reuses that for
each jump. */
-/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* x86_64-*-mingw* visium-*-* nvptx*-*-* pdp11*-*-* msp430-*-* amdgcn*-*-* } } } */
+/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* i?86-*-msys* x86_64-*-mingw* visium-*-* nvptx*-*-* pdp11*-*-* msp430-*-* amdgcn*-*-* } } } */
/* { dg-final { scan-assembler-times "foo,%r" 5 { target hppa*-*-* } } } */
/* { dg-final { scan-assembler-times "= foo" 5 { target ia64*-*-* } } } */
-/* { dg-final { scan-assembler-times "call\[ \t\]*_foo" 5 { target i?86-*-mingw* i?86-*-cygwin* } } } */
+/* { dg-final { scan-assembler-times "call\[ \t\]*_foo" 5 { target i?86-*-mingw* i?86-*-cygwin* i?86-*-msys* } } } */
/* { dg-final { scan-assembler-times "call\[ \t\]*foo" 5 { target x86_64-*-mingw* } } } */
/* { dg-final { scan-assembler-times "jsr|bsrf|blink\ttr?,r18" 5 { target sh*-*-* } } } */
/* { dg-final { scan-assembler-times "Jsr \\\$r" 5 { target cris-*-* } } } */
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c gcc-9.1.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c 2016-05-20 22:52:50.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c 2019-07-04 09:42:25.374318800 +0300
@@ -10,4 +10,4 @@
/* There should be a reference to conststaticvariable since it may
may be overriden at link time. */
-/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { xfail { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { xfail { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/fastcall-1.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/fastcall-1.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/fastcall-1.c 2008-01-26 12:31:30.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/fastcall-1.c 2019-07-04 09:42:25.389918800 +0300
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-mingw32* i?86-*-cygwin* } } */
+/* { dg-do compile { target i?86-*-mingw32* i?86-*-cygwin* i?86-*-msys* } } */
/* { dg-options "-std=gnu89" } */
void
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pad-4.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/pad-4.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pad-4.c 2017-06-17 18:32:28.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/pad-4.c 2019-07-04 09:42:25.389918800 +0300
@@ -2,7 +2,7 @@
/* { dg-require-effective-target ia32 } */
/* { dg-require-effective-target fpic } */
/* { dg-skip-if "" { *-*-* } { "-march=*" } { "-march=atom" } } */
-/* { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin } } */
+/* { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin *-*-msys } } */
/* { dg-options "-O2 -fomit-frame-pointer -march=atom -fPIC" } */
/* { dg-final { scan-assembler-times "nop" 8 } } */
/* { dg-final { scan-assembler-not "rep" } } */
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pic-1.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/pic-1.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pic-1.c 2017-06-17 18:32:28.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/pic-1.c 2019-07-04 09:42:25.389918800 +0300
@@ -2,7 +2,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */
/* { dg-require-effective-target fpic } */
-/* { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin } } */
+/* { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin *-*-msys } } */
/* { dg-options "-fPIC" } */
/* Test verifies that %ebx is no longer fixed when generating PIC code on i686. */
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr25993.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr25993.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr25993.c 2019-07-04 09:00:42.173039300 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr25993.c 2019-07-04 09:42:25.389918800 +0300
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" } } */
+/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" "*-*-msys*" } } */
/* { dg-options "-std=c99 -x assembler-with-cpp" } */
#ifndef __ASSEMBLER__
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr40906-1.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr40906-1.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr40906-1.c 2017-08-29 20:21:21.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr40906-1.c 2019-07-04 09:42:25.389918800 +0300
@@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-require-effective-target ia32 } */
/* { dg-options "-O2 -fomit-frame-pointer -fno-asynchronous-unwind-tables -mpush-args" } */
-/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
void abort (void);
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr40906-2.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr40906-2.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr40906-2.c 2017-08-29 20:21:21.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr40906-2.c 2019-07-04 09:42:25.389918800 +0300
@@ -1,7 +1,7 @@
/* { dg-do run } */
/* { dg-require-effective-target ia32 } */
/* { dg-options "-O2 -Wno-psabi -fomit-frame-pointer -fno-asynchronous-unwind-tables -mpush-args -m128bit-long-double" } */
-/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
void abort (void);
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr46226.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr46226.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr46226.c 2017-08-29 20:21:21.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr46226.c 2019-07-04 09:42:25.389918800 +0300
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-options "-Os -fomit-frame-pointer -fno-asynchronous-unwind-tables" } */
-/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
extern void abort(void);
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr56564-1.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr56564-1.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr56564-1.c 2017-08-29 21:28:32.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr56564-1.c 2019-07-04 09:42:25.389918800 +0300
@@ -1,6 +1,6 @@
/* PR target/56564 */
/* { dg-do compile { target { fpic && lp64 } } } */
-/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-darwin* } } */
+/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-msys* *-*-darwin* } } */
/* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
struct S { long a, b; } s = { 5, 6 };
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr56564-3.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr56564-3.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/pr56564-3.c 2017-08-29 21:28:32.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/pr56564-3.c 2019-07-04 09:42:25.389918800 +0300
@@ -1,6 +1,6 @@
/* PR target/56564 */
/* { dg-do compile { target { fpic && lp64 } } } */
-/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-darwin* } } */
+/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-msys* *-*-darwin* } } */
/* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
__thread struct S { long a, b; } s = { 5, 6 };
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/sse-10.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/sse-10.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/sse-10.c 2017-08-29 20:21:21.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/sse-10.c 2019-07-04 09:42:25.389918800 +0300
@@ -1,7 +1,7 @@
/* PR 17930 */
/* { dg-do run } */
/* { dg-options "-O1 -msse2 -mfpmath=sse -fno-omit-frame-pointer" } */
-/* { dg-additional-options "-mno-accumulate-outgoing-args -mno-omit-leaf-frame-pointer" { target { ! { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-additional-options "-mno-accumulate-outgoing-args -mno-omit-leaf-frame-pointer" { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
/* { dg-require-effective-target sse2 } */
#include "sse2-check.h"
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/stack-realign-win.c gcc-9.1.0/gcc/testsuite/gcc.target/i386/stack-realign-win.c
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/i386/stack-realign-win.c 2016-02-28 17:36:41.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/i386/stack-realign-win.c 2019-07-04 09:42:25.389918800 +0300
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-mingw* *-*-cygwin* } } */
+/* { dg-do compile { target *-*-mingw* *-*-cygwin* *-*-msys* } } */
/* { dg-require-effective-target ia32 } */
/* { dg-options "-msse -O" } */
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp gcc-9.1.0/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
--- gcc-9.1.0-orig/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp 2019-01-01 15:31:55.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp 2019-07-04 09:42:25.405518900 +0300
@@ -144,7 +144,7 @@
runtest_ms_sysv "$cflags" "$gen_opts"
# Skip unsupported -mcall-ms2sysv-xlogues on Windows
- if { ![istarget *-*-cygwin*] && ![istarget *-*-mingw*] } {
+ if { ![istarget *-*-cygwin*] && ![istarget *-*-msys*] && ![istarget *-*-mingw*] } {
runtest_ms_sysv "-mcall-ms2sysv-xlogues$cflags" "$gen_opts"
}
}
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 gcc-9.1.0/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90
--- gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2019-01-17 15:37:57.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 2019-07-04 09:43:13.375603100 +0300
@@ -16,9 +16,9 @@
call test(aa)
end
-! { dg-final { scan-assembler-times "\[ \t\]\[$,_0-9\]*myBindC" 1 { target { ! { hppa*-*-* s390*-*-* *-*-cygwin* amdgcn*-*-* } } } } }
+! { dg-final { scan-assembler-times "\[ \t\]\[$,_0-9\]*myBindC" 1 { target { ! { hppa*-*-* s390*-*-* *-*-cygwin* *-*-msys* amdgcn*-*-* } } } } }
! { dg-final { scan-assembler-times "myBindC,%r2" 1 { target { hppa*-*-* } } } }
-! { dg-final { scan-assembler-times "call\tmyBindC" 1 { target { *-*-cygwin* } } } }
+! { dg-final { scan-assembler-times "call\tmyBindC" 1 { target { *-*-cygwin* *-*-msys* } } } }
! { dg-final { scan-assembler-times "brasl\t%r\[0-9\]*,myBindC" 1 { target { s390*-*-* } } } }
! { dg-final { scan-assembler-times "add_u32\t\[sv\]\[0-9\]*, \[sv\]\[0-9\]*, myBindC@rel32@lo" 1 { target { amdgcn*-*-* } } } }
! { dg-final { scan-tree-dump-times "cfi_desc_to_gfc_desc \\\(&parm\\." 1 "original" } }
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/chmod_1.f90 gcc-9.1.0/gcc/testsuite/gfortran.dg/chmod_1.f90
--- gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/chmod_1.f90 2018-02-17 17:05:34.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gfortran.dg/chmod_1.f90 2019-07-04 09:42:25.405518900 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* spu-*-* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* spu-*-* } } } }
! { dg-options "-std=gnu" }
! See PR38956. Test fails on cygwin when user has Administrator rights
implicit none
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/chmod_2.f90 gcc-9.1.0/gcc/testsuite/gfortran.dg/chmod_2.f90
--- gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/chmod_2.f90 2018-02-17 17:05:34.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gfortran.dg/chmod_2.f90 2019-07-04 09:42:25.405518900 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* spu-*-* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* spu-*-* } } } }
! { dg-options "-std=gnu" }
! See PR38956. Test fails on cygwin when user has Administrator rights
implicit none
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/chmod_3.f90 gcc-9.1.0/gcc/testsuite/gfortran.dg/chmod_3.f90
--- gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/chmod_3.f90 2018-02-17 17:05:34.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gfortran.dg/chmod_3.f90 2019-07-04 09:42:25.405518900 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* spu-*-* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* spu-*-* } } } }
! { dg-options "-std=gnu -fdefault-integer-8" }
! See PR38956. Test fails on cygwin when user has Administrator rights
implicit none
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 gcc-9.1.0/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
--- gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 2018-02-17 17:05:34.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 2019-07-04 09:42:25.421118900 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { xfail *-*-darwin[89]* *-*-cygwin* spu-*-* powerpc-ibm-aix* } }
+! { dg-do run { xfail *-*-darwin[89]* *-*-cygwin* *-*-msys* spu-*-* powerpc-ibm-aix* } }
! Test XFAILed on these platforms because the system's printf() lacks
! proper support for denormals.
!
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/open_errors.f90 gcc-9.1.0/gcc/testsuite/gfortran.dg/open_errors.f90
--- gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/open_errors.f90 2018-02-17 17:05:34.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gfortran.dg/open_errors.f90 2019-07-04 09:42:25.421118900 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* spu-*-* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* spu-*-* } } } }
! PR30005 Enhanced error messages for OPEN
! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
! See PR38956. Test fails on cygwin when user has Administrator rights
diff -Naur gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/winapi.f90 gcc-9.1.0/gcc/testsuite/gfortran.dg/winapi.f90
--- gcc-9.1.0-orig/gcc/testsuite/gfortran.dg/winapi.f90 2018-02-17 17:05:34.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/gfortran.dg/winapi.f90 2019-07-04 09:42:25.421118900 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target *-*-cygwin* *-*-mingw* } }
+! { dg-do run { target *-*-cygwin* *-*-msys* *-*-mingw* } }
! { dg-options "-lkernel32" }
! Test case provided by Dennis Wassel.
diff -Naur gcc-9.1.0-orig/gcc/testsuite/lib/g++.exp gcc-9.1.0/gcc/testsuite/lib/g++.exp
--- gcc-9.1.0-orig/gcc/testsuite/lib/g++.exp 2019-01-01 15:31:55.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/lib/g++.exp 2019-07-04 09:42:25.421118900 +0300
@@ -205,7 +205,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
- if { [ishost "*-*-cygwin*"] } {
+ if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-9.1.0-orig/gcc/testsuite/lib/gcc-dg.exp gcc-9.1.0/gcc/testsuite/lib/gcc-dg.exp
--- gcc-9.1.0-orig/gcc/testsuite/lib/gcc-dg.exp 2019-02-15 10:52:50.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/lib/gcc-dg.exp 2019-07-04 09:42:25.421118900 +0300
@@ -40,7 +40,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
-if { [ishost "*-*-cygwin*"] } {
+if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-9.1.0-orig/gcc/testsuite/lib/gfortran.exp gcc-9.1.0/gcc/testsuite/lib/gfortran.exp
--- gcc-9.1.0-orig/gcc/testsuite/lib/gfortran.exp 2019-01-01 15:31:55.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/lib/gfortran.exp 2019-07-04 09:42:25.421118900 +0300
@@ -161,7 +161,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
- if { [ishost "*-*-cygwin*"] } {
+ if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-9.1.0-orig/gcc/testsuite/lib/objc.exp gcc-9.1.0/gcc/testsuite/lib/objc.exp
--- gcc-9.1.0-orig/gcc/testsuite/lib/objc.exp 2019-01-01 15:31:55.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/lib/objc.exp 2019-07-04 09:42:25.421118900 +0300
@@ -105,7 +105,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
- if { [ishost "*-*-cygwin*"] } {
+ if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-9.1.0-orig/gcc/testsuite/lib/options.exp gcc-9.1.0/gcc/testsuite/lib/options.exp
--- gcc-9.1.0-orig/gcc/testsuite/lib/options.exp 2019-01-01 15:31:55.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/lib/options.exp 2019-07-04 09:42:25.421118900 +0300
@@ -20,7 +20,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
-if { [ishost "*-*-cygwin*"] } {
+if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-9.1.0-orig/gcc/testsuite/lib/target-libpath.exp gcc-9.1.0/gcc/testsuite/lib/target-libpath.exp
--- gcc-9.1.0-orig/gcc/testsuite/lib/target-libpath.exp 2019-01-01 15:31:55.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/lib/target-libpath.exp 2019-07-04 09:42:25.421118900 +0300
@@ -171,7 +171,7 @@
} else {
setenv DYLD_LIBRARY_PATH "$ld_library_path"
}
- if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+ if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
if { $orig_path_saved } {
setenv PATH "$ld_library_path:$orig_path"
} else {
@@ -277,7 +277,7 @@
if { [istarget *-*-darwin*] } {
set shlib_ext "dylib"
- } elseif { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+ } elseif { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
set shlib_ext "dll"
} elseif { [istarget hppa*-*-hpux*] } {
set shlib_ext "sl"
diff -Naur gcc-9.1.0-orig/gcc/testsuite/lib/target-supports.exp gcc-9.1.0/gcc/testsuite/lib/target-supports.exp
--- gcc-9.1.0-orig/gcc/testsuite/lib/target-supports.exp 2019-04-23 17:39:50.000000000 +0300
+++ gcc-9.1.0/gcc/testsuite/lib/target-supports.exp 2019-07-04 09:42:25.436718900 +0300
@@ -300,7 +300,7 @@
# Windows targets Cygwin and MingW32 support it
- if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+ if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
return 1
}
@@ -649,6 +649,11 @@
return 0
}
+ # MSYS does not support -p.
+ if { [istarget *-*-msys*] && $test_what == "-p" } {
+ return 0
+ }
+
# uClibc does not have gcrt1.o.
if { [check_effective_target_uclibc]
&& ($test_what == "-p" || $test_what == "-pg") } {
@@ -1060,7 +1065,7 @@
# for trivial code, 0 otherwise.
proc check_effective_target_pe_aligned_commons {} {
- if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+ if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
return [check_no_compiler_messages pe_aligned_commons object {
int foo;
} "-mpe-aligned-commons"]
@@ -2465,7 +2470,7 @@
# Returns true iff "mkfifo" is available on the target system.
proc check_mkfifo_available {} {
- if { [istarget *-*-cygwin*] } {
+ if { [istarget *-*-cygwin*] || [istarget *-*-msys*] } {
# Cygwin has mkfifo, but support is incomplete.
return 0
}
@@ -7378,7 +7383,7 @@
proc check_effective_target_automatic_stack_alignment { } {
# Ordinarily x86 supports automatic stack alignment ...
if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then {
- if { [istarget *-*-mingw*] || [istarget *-*-cygwin*] } {
+ if { [istarget *-*-mingw*] || [istarget *-*-cygwin*] || [istarget *-*-msys*] } {
# ... except Win64 SEH doesn't. Succeed for Win32 though.
return [check_effective_target_ilp32];
}
diff -Naur gcc-9.1.0-orig/libffi/testsuite/lib/target-libpath.exp gcc-9.1.0/libffi/testsuite/lib/target-libpath.exp
--- gcc-9.1.0-orig/libffi/testsuite/lib/target-libpath.exp 2015-01-12 19:19:59.000000000 +0300
+++ gcc-9.1.0/libffi/testsuite/lib/target-libpath.exp 2019-07-04 09:42:25.436718900 +0300
@@ -175,7 +175,7 @@
} else {
setenv DYLD_LIBRARY_PATH "$ld_library_path"
}
- if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+ if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
if { $orig_path_saved } {
setenv PATH "$ld_library_path:$orig_path"
} else {
@@ -271,7 +271,7 @@
if { [ istarget *-*-darwin* ] } {
set shlib_ext "dylib"
- } elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-mingw* ] } {
+ } elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-msys* ] || [ istarget *-*-mingw* ] } {
set shlib_ext "dll"
} elseif { [ istarget hppa*-*-hpux* ] } {
set shlib_ext "sl"
diff -Naur gcc-9.1.0-orig/libgomp/testsuite/lib/libgomp.exp gcc-9.1.0/libgomp/testsuite/lib/libgomp.exp
--- gcc-9.1.0-orig/libgomp/testsuite/lib/libgomp.exp 2019-02-22 13:51:35.000000000 +0300
+++ gcc-9.1.0/libgomp/testsuite/lib/libgomp.exp 2019-07-04 09:42:25.436718900 +0300
@@ -82,7 +82,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
- if { [ishost "*-*-cygwin*"] } {
+ if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}
diff -Naur gcc-9.1.0-orig/libstdc++-v3/testsuite/lib/libstdc++.exp gcc-9.1.0/libstdc++-v3/testsuite/lib/libstdc++.exp
--- gcc-9.1.0-orig/libstdc++-v3/testsuite/lib/libstdc++.exp 2019-04-10 17:46:03.000000000 +0300
+++ gcc-9.1.0/libstdc++-v3/testsuite/lib/libstdc++.exp 2019-07-04 09:42:25.436718900 +0300
@@ -113,7 +113,7 @@
# Many hosts now default to a non-ASCII C locale, however, so
# they can set a charset encoding here if they need.
- if { [ishost "*-*-cygwin*"] } {
+ if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
setenv LC_ALL C.ASCII
setenv LANG C.ASCII
}

View File

@@ -1,72 +0,0 @@
diff -Naur gcc-6.3.0-orig/gcc/config/i386/cygwin.h gcc-6.3.0/gcc/config/i386/cygwin.h
--- gcc-6.3.0-orig/gcc/config/i386/cygwin.h 2017-01-24 11:59:41.138236300 +0300
+++ gcc-6.3.0/gcc/config/i386/cygwin.h 2017-01-24 12:05:25.522747400 +0300
@@ -56,6 +56,10 @@
fvtable-verify=std:vtv_end.o%s} \
crtend.o%s"
+/* There is a bug when building i686 dw-2 exceptions
+ where gcc_s gets stripped which this works around */
+#define PREVENT_STRIP_REG_FRAME_INFO "--undefined=___deregister_frame_info --undefined=___register_frame_info"
+
/* 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
@@ -66,7 +70,7 @@
%{static|static-libgcc:-lgcc -lgcc_eh} \
%{!static: \
%{!static-libgcc: \
- -lgcc_s -lgcc \
+ -lgcc_s " PREVENT_STRIP_REG_FRAME_INFO " -lgcc \
} \
} "
#else
diff -Naur gcc-6.3.0-orig/gcc/config/i386/mingw32.h gcc-6.3.0/gcc/config/i386/mingw32.h
--- gcc-6.3.0-orig/gcc/config/i386/mingw32.h 2016-04-08 16:47:37.000000000 +0300
+++ gcc-6.3.0/gcc/config/i386/mingw32.h 2017-01-24 12:05:25.538347400 +0300
@@ -120,6 +120,10 @@
%{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \
%(shared_libgcc_undefs)"
+/* There is a bug when building i686 dw-2 exceptions
+ where gcc_s gets stripped which this works around */
+#define PREVENT_STRIP_REG_FRAME_INFO "--undefined=___deregister_frame_info --undefined=___register_frame_info"
+
/* Include in the mingw32 libraries with libgcc */
#ifdef ENABLE_SHARED_LIBGCC
#define SHARED_LIBGCC_SPEC " \
@@ -128,9 +132,9 @@
%{!static-libgcc: \
%{!shared: \
%{!shared-libgcc:-lgcc -lgcc_eh} \
- %{shared-libgcc:-lgcc_s -lgcc} \
+ %{shared-libgcc:-lgcc_s " PREVENT_STRIP_REG_FRAME_INFO " -lgcc} \
} \
- %{shared:-lgcc_s -lgcc} \
+ %{shared:-lgcc_s " PREVENT_STRIP_REG_FRAME_INFO " -lgcc} \
} \
} "
#else
diff -Naur gcc-6.3.0-orig/gcc/config/i386/msys.h gcc-6.3.0/gcc/config/i386/msys.h
--- gcc-6.3.0-orig/gcc/config/i386/msys.h 2017-01-24 12:04:53.694488600 +0300
+++ gcc-6.3.0/gcc/config/i386/msys.h 2017-01-24 12:05:25.538347400 +0300
@@ -63,6 +63,10 @@
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/w32api/"
+/* There is a bug when building i686 dw-2 exceptions
+ where gcc_s gets stripped which this works around */
+#define PREVENT_STRIP_REG_FRAME_INFO "--undefined=___deregister_frame_info --undefined=___register_frame_info"
+
/* 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 msys-2.0.dll, so we leave it. Profiling is handled
@@ -73,7 +77,7 @@
%{static|static-libgcc:-lgcc -lgcc_eh} \
%{!static: \
%{!static-libgcc: \
- -lgcc_s -lgcc \
+ -lgcc_s " PREVENT_STRIP_REG_FRAME_INFO " -lgcc \
} \
} "
#else

View File

@@ -3,8 +3,8 @@
_realname=gcc
_mingw_suff=mingw-w64-cross
pkgname=("${_mingw_suff}-${_realname}")
pkgver=7.3.0
pkgrel=2
pkgver=9.1.0
pkgrel=1
pkgdesc="Cross GCC for the MinGW-w64"
arch=('i686' 'x86_64')
url="https://gcc.gnu.org"
@@ -20,8 +20,6 @@ makedepends=("gcc" 'lndir' "gmp-devel" "mpc-devel" "zlib-devel" "isl-devel")
#checkdepends=('dejagnu')
options=('!strip' 'staticlibs' '!emptydirs' '!buildflags')
source=(https://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/gcc-${pkgver}.tar.gz
0001-share-mingw-fset-stack-executable-with-cygwin.patch
0007-Avoid-installing-libffi-V2.patch
0009-Cygwin-uses-sysv-ABI-on-x86_64-V2.patch
0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch
0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch
@@ -32,57 +30,43 @@ source=(https://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/gcc-${pkgver}.tar.gz
0016-fix-some-implicit-declaration-warnings.patch
0017-__cxa-atexit-for-Cygwin.patch
0018-prevent-modules-from-being-unloaded-before-their-dto.patch
0019-Cygwin-doesn-t-do-text-mode-translations-for-file-ha.patch
0020-cygwin-uses-cyg-lib-prefix-v3.patch
0022-libgomp-soname-cygwin-mingw.patch
0024-libitm-weak-symbols.patch
0025-enable-libcilkrts-V2.patch
0028-g++-time.patch
0029-gcc-specs.patch
0030-newlib-ftm.patch
0031-define_std-unix.patch
0032-fix-ada-malloc-error.patch
0130-libstdc++-in-out.patch
0240-prettify-linking-no-undefined.mingw.patch
0408-gcc-6-branch-Windows-New-feature-to-allow-overriding.patch
0410-fix-using-large-pch.patch
0415-disable-weak-refs-in-libstdc++.patch
0950-7.3.0-configure-msys2.patch
0951-7.3.0-msys2-spec.patch
0953-7.3.0-testsuite-msys2.patch
0955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch
pr86138.patch)
sha256sums=('fa06e455ca198ddc11ea4ddf2a394cf7cfb66aa7e0ab98cc1184189f1d405870'
'e2583724bbc9ac16a5a3927b79a05c006d43fd70fe0e598b5d402fb66080e308'
'25ba33a68cefd1921d35b796a2dc033bae22b33527b8b81b04dddb3e0dee5920'
0140-gcc-8.2.0-diagnostic-color.patch
0150-ada-fix-pr80590.patch
0950-9.1.0-configure-msys2.patch
0951-9.1.0-msys2-spec.patch
0953-9.1.0-testsuite-msys2.patch)
sha256sums=('be303f7a8292982a35381489f5a9178603cbe9a4715ee4fa4a815d6bcd2b658d'
'24bdd964c6479251af5a275965db42ed867599cd2d84ecb526397395e201cda4'
'b77b6045aabba3aaae58d578d0b2ffc56ce70907f39a280fa964c9fcbd88bdad'
'817361b4b301ca3f578d0d24b899691273a4ca9e20a91790a74efddc91c1130e'
'7ad412357429a2e2376ec673d0e0a0d2ab4e3a162db532818bc76d55835f35d6'
'cf33d6ff5e32ed35146117c9bd3d78bb9bf228abad73e5c2b44f006bf8cf0fc8'
'79db6a8951c3c07d9df26863a2bcfc607606211f6eb813c156b4f46123ecbbdc'
'ac7e9e08ea8b2b4b5fdb394e217ce9081352fe07746e19b9374a753ebf89a4a2'
'4922110c9bb7959a453d62e0107aee7c58c1e146540f930f55466c72f24f72a7'
'8227d3857cac3846d7436cd6867a7a89d36686d3219820215f72deb40ab44792'
'84c8127f2e70f26a6bf0f7ff1fe06df4814096bc02f5fc19291a729c740887d7'
'4d3030238181a6d28c1aff5e5b43db6d82517f3412309175e162f5da63f7cd00'
'0e6a373a0911d81656d9bfd2d93085b817266538600eab14965f1bafb034bac8'
'a277245cf7ccf6e3bd83a79945ff26ea5e41fb3ecf7fe0a473b2ec64d8c5b101'
'54a0e45c09ac70b7932cde3e86b6156c1fec459c69ece53141921adcb8a75e6e'
'277907dd3982c61dcd8d739231e49afebf3841cf687fc1fcf3e2ffbba419c904'
'0607c207a49ee337585f451cbdeb95131f45500361a494a88cfb304a4e18ace5'
'00e528e198183799c00167cacc1a7b1cb9505ae93ef89e581632ffaae20080f2'
'9daf3accc664d5a2b6f93354a1e8807d19c640e627dc2977111aab17b766542e'
'5ac69b7933d576133618c4367fa54faf89e11231228f54c9ab8ce4c5fb221a49'
'77f1ff3c35cf54c0698e80156a0b4ee0f6f87892e5b45bdafb36096c61e87fdf'
'5c981e03ee5f34129ab06e3e4aab0bd190bf9d454d98513ac68b39e01f0b039d'
'e1b56aa9c8786b5491ec3f6522498f4381fe78c6117b87ae0daeb7741e111a98'
'e767610ddf54d2f277fef89e355728f31dbe9fe920eccd082942fbadfd3c1409'
'd5dd17d7a97e8295a2ea6caa6b10f0ab384a8c1874283524242897086c07cb26'
'018e6ef8f431c0cebbc0c01a7acc28270ba5a827904540f6b5f1c22b4955a1dd'
'd1e10cd2ef5594c34acead334bb93af500e00699ba673edc8916da22a572677d'
'0decbbebda7ceac91da5d3dec9b7330f406a4358fa150560f08ff6f54739035f'
'09f27e0dae8d962f2a46a33a9891f2d14303629bb40f91ed8c5824c90da653a9'
'd075205468c4518d7eb5d38c6c95c4bcc07b9788521cce41467b7396f44cfcb8'
'e41e326ecfb555f527c769599537bfe312c2a7cfb899519620bfe873c228f0cb'
'07e82b66cc4ef6f3c711525f9d91037777cad8a9f81ccf9dcecbb56193401eba'
'89e00457776fb1cae1b020c6f835012a8617996a0d0710a4b12e9804aeda27df'
'c2126ca50487d84fa9aaf0a64bc03df8dbc0bccc2dd5be1b5f1e277c9ad7c0aa')
'e8e4fa17a86b7c00426699173973faafdd585a84499a5acc95ee7701723ed82b'
'041ec7903f3285d28a4c2949fbda7b830e9e32c7883de3649c53bf595df037a0'
'081457942bab05b4583718dd9bef50cb42032c43a8ded6ad633d6993e4dd05c1'
'ebd467d7cf1997d8feecb053ed83d93e199a39a0af3f01b2e343f8e23a654630'
'd08df78b4c8cfaee819bea41ca61f0b69a9afd00605230541139d35baf9d6f1f'
'a526cfab91a1499be92c824c7f2185a013a38dbdfbeabe63ecbe84451e07b021'
'e467f0ac68b349de826c79b00a45c5ad9e7c5a55d06b9b9fa7afd94c597f6376'
'acc5437045005e2aeaca81f6b988c65b319a3ebcd8919218faeca74837f4b12b'
'a77df7aed55abad81c607497571284d3fc5b1cb69befe5afdc9b0eee23597025'
'259d025fec7b527a1044c798051e2d074088eca4b382eebff433d6deecabd282'
'6f62bf968154323ef531716e086fe6132e5d3d7fc496e7159e3c59e436658bff')
_threads="win32"
_targets="i686-w64-mingw32 x86_64-w64-mingw32" #armv7-w64-mingw32
@@ -131,14 +115,8 @@ prepare() {
gcc/config/i386/msys-w64.h \
gcc/config/i386/t-msys-w64 > /dev/null 2>&1 | true
# Upstream patches
apply_patch_with_msg \
pr86138.patch
# Cygwin patches
apply_patch_with_msg \
0001-share-mingw-fset-stack-executable-with-cygwin.patch \
0007-Avoid-installing-libffi-V2.patch \
0009-Cygwin-uses-sysv-ABI-on-x86_64-V2.patch \
0010-Do-not-version-lto-plugin-on-cygwin-mingw.patch \
0011-add-dummy-pthread-tsaware-and-large-address-aware-fo.patch \
@@ -152,89 +130,85 @@ prepare() {
0020-cygwin-uses-cyg-lib-prefix-v3.patch \
0022-libgomp-soname-cygwin-mingw.patch \
0024-libitm-weak-symbols.patch \
0025-enable-libcilkrts-V2.patch
apply_patch_p2_with_msg \
0028-g++-time.patch \
0030-newlib-ftm.patch \
0031-define_std-unix.patch
0028-g++-time.patch \
0030-newlib-ftm.patch \
0031-define_std-unix.patch \
0032-fix-ada-malloc-error.patch
# MINGW patches
apply_patch_with_msg 0130-libstdc++-in-out.patch \
0240-prettify-linking-no-undefined.mingw.patch \
0408-gcc-6-branch-Windows-New-feature-to-allow-overriding.patch \
0410-fix-using-large-pch.patch \
0415-disable-weak-refs-in-libstdc++.patch
0140-gcc-8.2.0-diagnostic-color.patch \
0150-ada-fix-pr80590.patch
# MSYS2 Patches
apply_patch_with_msg \
0950-7.3.0-configure-msys2.patch \
0951-7.3.0-msys2-spec.patch \
0953-7.3.0-testsuite-msys2.patch \
0955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch
0950-9.1.0-configure-msys2.patch \
0951-9.1.0-msys2-spec.patch \
0953-9.1.0-testsuite-msys2.patch
}
build() {
for _target in ${_targets}; do
mkdir -p ${srcdir}/gcc-build-${_target} && cd ${srcdir}/gcc-build-${_target}
mkdir -p ${srcdir}/gcc-build-${_target} && cd ${srcdir}/gcc-build-${_target}
local _langs="c,lto,c++"
case "${_target}" in
i686*)
local _conf="--disable-sjlj-exceptions --with-dwarf2"
local _arch=i686
_langs="${_langs} fortran"
;;
local _langs="c,lto,c++"
case "${_target}" in
i686*)
local _conf="--disable-sjlj-exceptions --with-dwarf2"
local _arch=i686
_langs="${_langs} fortran"
;;
x86_64*)
local _arch=x86-64
local _conf=""
_langs="${_langs} fortran"
;;
esac
x86_64*)
local _arch=x86-64
local _conf=""
_langs="${_langs} fortran"
;;
esac
# use built-in SSP with Cygwin 2.10
# FIXME: --disable-libssp should suffice in GCC 8
export gcc_cv_libc_provides_ssp=yes
# configure tries to test SUSv4-compliant behaviour of
# realpath(..., NULL) via _XOPEN_VERSION
export glibcxx_cv_realpath=yes
../${_realname}-${pkgver}/configure \
--prefix=/opt \
--build=${CHOST} \
--host=${CHOST} \
--target=${_target} \
--libexecdir=/opt/lib \
--disable-bootstrap \
--with-arch=${_arch} \
--with-tune=generic \
--enable-languages=${_langs} \
--enable-shared --enable-static \
--enable-threads=${_threads} \
--enable-graphite \
--enable-fully-dynamic-string \
--enable-libstdcxx-time=yes \
--disable-libstdcxx-pch \
--disable-libstdcxx-debug \
--enable-cloog-backend=isl \
--enable-version-specific-runtime-libs \
--disable-isl-version-check \
--enable-lto \
--enable-libgomp \
--disable-multilib \
--enable-checking=release \
--disable-rpath \
--disable-win32-registry \
--disable-werror \
--disable-symvers \
--with-libiconv \
--with-system-zlib \
--with-{gmp,mpfr,mpc,isl}=/usr \
--with-gnu-as --with-gnu-ld \
${_conf} \
CFLAGS="-O2 -pipe" \
CXXFALGS="-O2 -pipe"
make all
# use built-in SSP with Cygwin 2.10
# FIXME: --disable-libssp should suffice in GCC 8
export gcc_cv_libc_provides_ssp=yes
# configure tries to test SUSv4-compliant behaviour of
# realpath(..., NULL) via _XOPEN_VERSION
export glibcxx_cv_realpath=yes
../${_realname}-${pkgver}/configure \
--prefix=/opt \
--build=${CHOST} \
--host=${CHOST} \
--target=${_target} \
--libexecdir=/opt/lib \
--disable-bootstrap \
--with-arch=${_arch} \
--with-tune=generic \
--enable-languages=${_langs} \
--enable-shared --enable-static \
--enable-threads=${_threads} \
--enable-graphite \
--enable-fully-dynamic-string \
--enable-libstdcxx-time=yes \
--disable-libstdcxx-pch \
--disable-libstdcxx-debug \
--enable-cloog-backend=isl \
--enable-version-specific-runtime-libs \
--disable-isl-version-check \
--enable-lto \
--enable-libgomp \
--disable-multilib \
--enable-checking=release \
--disable-rpath \
--disable-win32-registry \
--disable-werror \
--disable-symvers \
--with-libiconv \
--with-system-zlib \
--with-{gmp,mpfr,mpc,isl}=/usr \
--with-gnu-as --with-gnu-ld \
${_conf} \
CFLAGS="-O2 -pipe" \
CXXFALGS="-O2 -pipe"
make all
done
}

View File

@@ -1,176 +0,0 @@
From 2cca047791a52015d63fd42e9791ed7dc237099d Mon Sep 17 00:00:00 2001
From: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 22 Jun 2018 15:58:38 +0000
Subject: [PATCH] PR libstdc++/86138 prevent implicit instantiation of COW
empty rep
The explicit instantiation declarations for std::basic_string are
disabled for C++17 (and later) so that basic_string symbols get
implicitly instantiated in every translation unit that needs them. On
targets that don't support STB_GNU_UNIQUE this leads to multiple copies
of the empty rep symbol for COW strings. In order to detect whether a
COW string needs to deallocate its storage it compares the address with
the empty rep. When there are multiple copies of the empty rep object
the address is not unique, and so string destructors try to delete the
empty rep, which crashes.
In order to guarantee uniqueness of the _S_empty_rep_storage symbol this
patch adds an explicit instantiation declaration for just that symbol.
This means the other symbols are still implicitly instantiated in C++17
code, but for the empty rep the definition in the library gets used.
Separately, there is no need for C++17 code to implicitly instantiate
the I/O functions for strings, so this also restores the explicit
instantiation declarations for those functions.
Backport from mainline
2018-06-22 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/86138
* include/bits/basic_string.tcc:
[__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
(basic_string<char>::_Rep::_S_empty_rep_storage)
(basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
instantiation declarations.
[__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
explicit instantiation declarations.
* testsuite/21_strings/basic_string/cons/char/86138.cc: New.
* testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@261907 138bc75d-0d04-0410-961f-82ee72b054a4
---
libstdc++-v3/ChangeLog | 16 ++++++++++
libstdc++-v3/include/bits/basic_string.tcc | 25 ++++++++++++++--
.../basic_string/cons/char/86138.cc | 30 +++++++++++++++++++
.../basic_string/cons/wchar_t/86138.cc | 30 +++++++++++++++++++
4 files changed, 98 insertions(+), 3 deletions(-)
create mode 100644 libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
create mode 100644 libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
index 41b7fa196b0..d185a54aaf0 100644
--- a/libstdc++-v3/include/bits/basic_string.tcc
+++ b/libstdc++-v3/include/bits/basic_string.tcc
@@ -1597,8 +1597,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
-#if _GLIBCXX_EXTERN_TEMPLATE > 0 && __cplusplus <= 201402L
+#if _GLIBCXX_EXTERN_TEMPLATE > 0
+ // The explicit instantiations definitions in src/c++11/string-inst.cc
+ // are compiled as C++14, so the new C++17 members aren't instantiated.
+ // Until those definitions are compiled as C++17 suppress the declaration,
+ // so C++17 code will implicitly instantiate std::string and std::wstring
+ // as needed.
+# if __cplusplus <= 201402L
extern template class basic_string<char>;
+# elif ! _GLIBCXX_USE_CXX11_ABI
+ // Still need to prevent implicit instantiation of the COW empty rep,
+ // to ensure the definition in libstdc++.so is unique (PR 86138).
+ extern template basic_string<char>::size_type
+ basic_string<char>::_Rep::_S_empty_rep_storage[];
+# endif
+
extern template
basic_istream<char>&
operator>>(basic_istream<char>&, string&);
@@ -1613,7 +1626,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
getline(basic_istream<char>&, string&);
#ifdef _GLIBCXX_USE_WCHAR_T
+# if __cplusplus <= 201402L
extern template class basic_string<wchar_t>;
+# elif ! _GLIBCXX_USE_CXX11_ABI
+ extern template basic_string<wchar_t>::size_type
+ basic_string<wchar_t>::_Rep::_S_empty_rep_storage[];
+# endif
+
extern template
basic_istream<wchar_t>&
operator>>(basic_istream<wchar_t>&, wstring&);
@@ -1626,8 +1645,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
extern template
basic_istream<wchar_t>&
getline(basic_istream<wchar_t>&, wstring&);
-#endif
-#endif
+#endif // _GLIBCXX_USE_WCHAR_T
+#endif // _GLIBCXX_EXTERN_TEMPLATE > 0
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
new file mode 100644
index 00000000000..a85fd9c82c9
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/86138.cc
@@ -0,0 +1,30 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do compile { target c++1z } }
+// { dg-final { scan-assembler-not "_ZNSs4_Rep20_S_empty_rep_storageE:" } }
+
+#undef _GLIBCXX_USE_CXX11_ABI
+#define _GLIBCXX_USE_CXX11_ABI 0
+#include <string>
+
+void
+test01(std::string* s)
+{
+ s->~basic_string();
+}
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
new file mode 100644
index 00000000000..d77922976d0
--- /dev/null
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/86138.cc
@@ -0,0 +1,30 @@
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++17" }
+// { dg-do compile { target c++1z } }
+// { dg-final { scan-assembler-not "_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE:" } }
+
+#undef _GLIBCXX_USE_CXX11_ABI
+#define _GLIBCXX_USE_CXX11_ABI 0
+#include <string>
+
+void
+test01(std::wstring* s)
+{
+ s->~basic_string();
+}
--
2.18.0