mingw-w64 cross gcc: Update to 4.9.2

This commit is contained in:
Alexpux 2014-10-31 20:38:37 +03:00
parent be46bc8dfa
commit 9871e944fc
33 changed files with 5229 additions and 1045 deletions

View File

@ -1,5 +1,6 @@
--- origsrc/gcc-4.7.2/gcc/ada//a-intnam-cygwin.ads 1970-01-01 00:00:00.000000000 +0000
+++ src/gcc-4.7.2/gcc/ada//a-intnam-cygwin.ads 2012-11-01 21:17:31.000000000 +0000
diff -Naur gcc-4.9.1-orig/gcc/ada/a-intnam-cygwin.ads gcc-4.9.1/gcc/ada/a-intnam-cygwin.ads
--- gcc-4.9.1-orig/gcc/ada/a-intnam-cygwin.ads 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/ada/a-intnam-cygwin.ads 2014-10-29 15:53:39.106200000 +0300
@@ -0,0 +1,170 @@
+------------------------------------------------------------------------------
+-- --
@ -171,9 +172,10 @@
+ System.OS_Interface.SIGPWR; -- Power failure
+
+end Ada.Interrupts.Names;
--- origsrc/gcc-4.7.2/gcc/ada//gcc-interface/Makefile.in 2012-11-02 15:16:49.765625000 +0000
+++ src/gcc-4.7.2/gcc/ada//gcc-interface/Makefile.in 2012-11-01 21:17:31.000000000 +0000
@@ -191,6 +191,13 @@ TARGET_ADA_SRCS =
diff -Naur gcc-4.9.1-orig/gcc/ada/gcc-interface/Makefile.in gcc-4.9.1/gcc/ada/gcc-interface/Makefile.in
--- gcc-4.9.1-orig/gcc/ada/gcc-interface/Makefile.in 2014-05-17 13:13:12.000000000 +0300
+++ gcc-4.9.1/gcc/ada/gcc-interface/Makefile.in 2014-10-29 15:53:39.106200000 +0300
@@ -203,6 +203,13 @@
# Type of tools build we are doing; default is not compiling tools.
TOOLSCASE =
@ -187,7 +189,7 @@
# Multilib handling
MULTISUBDIR =
RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
@@ -1583,6 +1590,12 @@ ifeq ($(strip $(filter-out avr none powe
@@ -1659,6 +1666,12 @@
# Cygwin/Mingw32
ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
@ -200,7 +202,7 @@
# Cygwin provides a full Posix environment, and so we use the default
# versions of s-memory and g-socthi rather than the Windows-specific
# MinGW versions. Ideally we would use all the default versions for
@@ -1651,24 +1664,24 @@ ifeq ($(strip $(filter-out cygwin% mingw
@@ -1727,24 +1740,24 @@
ifeq ($(strip $(MULTISUBDIR)),/32)
LIBGNAT_TARGET_PAIRS += \
$(X86_TARGET_PAIRS) \
@ -229,7 +231,7 @@
SO_OPTS = -m32 -Wl,-soname,
endif
endif
@@ -1677,7 +1690,14 @@ ifeq ($(strip $(filter-out cygwin% mingw
@@ -1753,7 +1766,14 @@
s-win32.o s-winext.o g-regist.o g-sse.o g-ssvety.o
EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
EXTRA_LIBGNAT_SRCS+=mingw32.h
@ -245,7 +247,7 @@
# ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
# auto-import support for array/record will be done.
@@ -1687,10 +1707,11 @@ ifeq ($(strip $(filter-out cygwin% mingw
@@ -1763,10 +1783,11 @@
endif
TOOLS_TARGET_PAIRS= \
@ -259,7 +261,7 @@
EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
soext = .dll
@@ -2425,7 +2446,7 @@ gnatlink-re: ../stamp-tools link.o targe
@@ -2641,7 +2662,7 @@
true; \
fi
@ -268,7 +270,7 @@
# Create the directory before deleting it, in case the directory is
# a list of directories (as it may be on VMS). This ensures we are
# deleting the right one.
@@ -2472,6 +2493,46 @@ install-gnatlib: ../stamp-gnatlib-$(RTSD
@@ -2688,6 +2709,46 @@
cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
@ -315,7 +317,7 @@
../stamp-gnatlib2-$(RTSDIR):
$(RM) $(RTSDIR)/s-*.ali
$(RM) $(RTSDIR)/s-*$(objext)
@@ -2672,20 +2733,20 @@ gnatlib-shared-win32:
@@ -2880,20 +2941,20 @@
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \
gnatlib
@ -342,9 +344,10 @@
gnatlib-shared-darwin:
$(MAKE) $(FLAGS_TO_PASS) \
--- origsrc/gcc-4.7.2/gcc/ada//gsocket.h 2012-11-02 15:16:49.781250000 +0000
+++ src/gcc-4.7.2/gcc/ada//gsocket.h 2012-11-01 21:17:31.000000000 +0000
@@ -204,7 +204,7 @@
diff -Naur gcc-4.9.1-orig/gcc/ada/gsocket.h gcc-4.9.1/gcc/ada/gsocket.h
--- gcc-4.9.1-orig/gcc/ada/gsocket.h 2012-11-06 12:41:56.000000000 +0300
+++ gcc-4.9.1/gcc/ada/gsocket.h 2014-10-29 15:53:39.106200000 +0300
@@ -199,7 +199,7 @@
#endif
#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || \
@ -352,9 +355,10 @@
+ defined (_WIN32) || defined (__APPLE__) || defined (__CYGWIN__)
# define HAVE_THREAD_SAFE_GETxxxBYyyy 1
#elif defined (sgi) || defined (linux) || defined (__GLIBC__) || \
--- origsrc/gcc-4.7.2/gcc/ada//indepsw-cygwin.adb 1970-01-01 00:00:00.000000000 +0000
+++ src/gcc-4.7.2/gcc/ada//indepsw-cygwin.adb 2012-11-01 21:17:31.000000000 +0000
#elif defined (linux) || defined (__GLIBC__) || \
diff -Naur gcc-4.9.1-orig/gcc/ada/indepsw-cygwin.adb gcc-4.9.1/gcc/ada/indepsw-cygwin.adb
--- gcc-4.9.1-orig/gcc/ada/indepsw-cygwin.adb 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/ada/indepsw-cygwin.adb 2014-10-29 15:53:39.106200000 +0300
@@ -0,0 +1,67 @@
+------------------------------------------------------------------------------
+-- --
@ -423,9 +427,10 @@
+ end Is_Supported;
+
+end Indepsw;
--- origsrc/gcc-4.7.2/gcc/ada//initialize.c 2012-11-02 15:16:50.031250000 +0000
+++ src/gcc-4.7.2/gcc/ada//initialize.c 2012-11-01 21:17:31.000000000 +0000
@@ -348,6 +348,40 @@ __gnat_initialize (void *eh ATTRIBUTE_UN
diff -Naur gcc-4.9.1-orig/gcc/ada/initialize.c gcc-4.9.1/gcc/ada/initialize.c
--- gcc-4.9.1-orig/gcc/ada/initialize.c 2013-02-06 15:01:20.000000000 +0300
+++ gcc-4.9.1/gcc/ada/initialize.c 2014-10-29 15:53:39.106200000 +0300
@@ -297,6 +297,40 @@
__main ();
}
@ -466,8 +471,9 @@
#else
/* For all other versions of GNAT, the initialize routine and handler
--- origsrc/gcc-4.7.2/gcc/ada//mlib-tgt-specific-cygwin.adb 1970-01-01 00:00:00.000000000 +0000
+++ src/gcc-4.7.2/gcc/ada//mlib-tgt-specific-cygwin.adb 2012-11-01 21:17:31.000000000 +0000
diff -Naur gcc-4.9.1-orig/gcc/ada/mlib-tgt-specific-cygwin.adb gcc-4.9.1/gcc/ada/mlib-tgt-specific-cygwin.adb
--- gcc-4.9.1-orig/gcc/ada/mlib-tgt-specific-cygwin.adb 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/ada/mlib-tgt-specific-cygwin.adb 2014-10-29 15:53:39.121800000 +0300
@@ -0,0 +1,162 @@
+------------------------------------------------------------------------------
+-- --
@ -631,8 +637,9 @@
+ Library_Major_Minor_Id_Supported_Ptr :=
+ Library_Major_Minor_Id_Supported'Access;
+end MLib.Tgt.Specific;
--- origsrc/gcc-4.7.2/gcc/ada//s-gloloc-cygwin.adb 1970-01-01 00:00:00.000000000 +0000
+++ src/gcc-4.7.2/gcc/ada//s-gloloc-cygwin.adb 2012-11-01 21:17:31.000000000 +0000
diff -Naur gcc-4.9.1-orig/gcc/ada/s-gloloc-cygwin.adb gcc-4.9.1/gcc/ada/s-gloloc-cygwin.adb
--- gcc-4.9.1-orig/gcc/ada/s-gloloc-cygwin.adb 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/ada/s-gloloc-cygwin.adb 2014-10-29 15:53:39.121800000 +0300
@@ -0,0 +1,107 @@
+------------------------------------------------------------------------------
+-- --
@ -741,8 +748,9 @@
+ end Release_Lock;
+
+end System.Global_Locks;
--- origsrc/gcc-4.7.2/gcc/ada//s-osinte-cygwin.ads 1970-01-01 00:00:00.000000000 +0000
+++ src/gcc-4.7.2/gcc/ada//s-osinte-cygwin.ads 2012-11-01 21:17:31.000000000 +0000
diff -Naur gcc-4.9.1-orig/gcc/ada/s-osinte-cygwin.ads gcc-4.9.1/gcc/ada/s-osinte-cygwin.ads
--- gcc-4.9.1-orig/gcc/ada/s-osinte-cygwin.ads 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/ada/s-osinte-cygwin.ads 2014-10-29 15:53:39.121800000 +0300
@@ -0,0 +1,951 @@
+------------------------------------------------------------------------------
+-- --
@ -1695,8 +1703,9 @@
+ end record;
+
+end System.OS_Interface;
--- origsrc/gcc-4.7.2/gcc/ada//s-taprop-cygwin.adb 1970-01-01 00:00:00.000000000 +0000
+++ src/gcc-4.7.2/gcc/ada//s-taprop-cygwin.adb 2012-11-01 21:17:31.000000000 +0000
diff -Naur gcc-4.9.1-orig/gcc/ada/s-taprop-cygwin.adb gcc-4.9.1/gcc/ada/s-taprop-cygwin.adb
--- gcc-4.9.1-orig/gcc/ada/s-taprop-cygwin.adb 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/ada/s-taprop-cygwin.adb 2014-10-29 15:53:39.137400000 +0300
@@ -0,0 +1,1337 @@
+------------------------------------------------------------------------------
+-- --
@ -3035,9 +3044,10 @@
+ end Initialize;
+
+end System.Task_Primitives.Operations;
--- origsrc/gcc-4.7.2/gcc/ada//sysdep.c 2012-11-02 15:16:50.062500000 +0000
+++ src/gcc-4.7.2/gcc/ada//sysdep.c 2012-11-02 15:50:59.968750000 +0000
@@ -311,7 +311,7 @@ getc_immediate_common (FILE *stream,
diff -Naur gcc-4.9.1-orig/gcc/ada/sysdep.c gcc-4.9.1/gcc/ada/sysdep.c
--- gcc-4.9.1-orig/gcc/ada/sysdep.c 2014-01-20 18:23:37.000000000 +0300
+++ gcc-4.9.1/gcc/ada/sysdep.c 2014-10-29 15:53:39.137400000 +0300
@@ -317,7 +317,7 @@
int waiting)
{
#if defined (linux) || defined (sun) \
@ -3046,7 +3056,7 @@
|| defined (_AIX) || (defined (__svr4__) && defined (i386)) \
|| defined (__Lynx__) || defined (__FreeBSD__) || defined (__OpenBSD__) \
|| defined (__GLIBC__) || defined (__APPLE__)
@@ -592,6 +592,18 @@ rts_get_nShowCmd (void)
@@ -598,6 +598,18 @@
}
#endif /* WINNT */
@ -3065,8 +3075,9 @@
#ifdef VMS
/* This gets around a problem with using the old threads library on VMS 7.0. */
--- origsrc/gcc-4.7.2/gcc/ada//system-cygwin.ads 1970-01-01 00:00:00.000000000 +0000
+++ src/gcc-4.7.2/gcc/ada//system-cygwin.ads 2012-11-01 21:17:31.000000000 +0000
diff -Naur gcc-4.9.1-orig/gcc/ada/system-cygwin.ads gcc-4.9.1/gcc/ada/system-cygwin.ads
--- gcc-4.9.1-orig/gcc/ada/system-cygwin.ads 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/ada/system-cygwin.ads 2014-10-29 15:53:39.153000000 +0300
@@ -0,0 +1,198 @@
+------------------------------------------------------------------------------
+-- --

View File

@ -1,6 +1,7 @@
--- origsrc/gcc-4.7.2/boehm-gc/win32_threads.c 2009-05-17 21:07:18.000000000 +0100
+++ src/gcc-4.7.2/boehm-gc/win32_threads.c 2013-03-31 19:34:57.203125000 +0100
@@ -707,6 +707,54 @@ void * GC_start_routine(void * arg)
diff -Naur gcc-4.9.1-orig/boehm-gc/win32_threads.c gcc-4.9.1/boehm-gc/win32_threads.c
--- gcc-4.9.1-orig/boehm-gc/win32_threads.c 2009-05-17 23:07:18.000000000 +0300
+++ gcc-4.9.1/boehm-gc/win32_threads.c 2014-10-29 15:54:43.939800000 +0300
@@ -707,6 +707,54 @@
return(result);
}

View File

@ -1,6 +1,7 @@
--- origsrc/gcc-4.7.2/gcc/config/i386//cygming.opt 2011-04-01 15:43:22.000000000 +0100
+++ src/gcc-4.7.2/gcc/config/i386//cygming.opt 2012-11-01 20:56:56.406250000 +0000
@@ -50,6 +50,10 @@ muse-libstdc-wrappers
diff -Naur gcc-4.9.1-orig/gcc/config/i386/cygming.opt gcc-4.9.1/gcc/config/i386/cygming.opt
--- gcc-4.9.1-orig/gcc/config/i386/cygming.opt 2014-01-03 01:23:26.000000000 +0300
+++ gcc-4.9.1/gcc/config/i386/cygming.opt 2014-10-29 15:55:08.837400000 +0300
@@ -50,6 +50,10 @@
Target Condition({defined (USE_CYGWIN_LIBSTDCXX_WRAPPERS)})
Compile code that relies on Cygwin DLL wrappers to support C++ operator new/delete replacement
@ -11,19 +12,21 @@
posix
Driver
--- origsrc/gcc-4.7.2/gcc/config/i386//cygwin.h 2012-11-01 20:55:58.250000000 +0000
+++ src/gcc-4.7.2/gcc/config/i386//cygwin.h 2012-11-01 20:11:22.000000000 +0000
@@ -140,3 +140,7 @@ along with GCC; see the file COPYING3.
diff -Naur gcc-4.9.1-orig/gcc/config/i386/cygwin.h gcc-4.9.1/gcc/config/i386/cygwin.h
--- gcc-4.9.1-orig/gcc/config/i386/cygwin.h 2014-04-23 12:46:13.000000000 +0300
+++ gcc-4.9.1/gcc/config/i386/cygwin.h 2014-10-29 15:55:08.853000000 +0300
@@ -145,3 +145,7 @@
/* We should find a way to not have to update this manually. */
#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-13.dll"
#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-15.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
--- origsrc/gcc-4.7.2/gcc/config/i386//mingw.opt 2011-04-01 15:43:22.000000000 +0100
+++ src/gcc-4.7.2/gcc/config/i386//mingw.opt 2012-11-01 20:57:00.296875000 +0000
@@ -28,8 +28,4 @@ Wpedantic-ms-format
diff -Naur gcc-4.9.1-orig/gcc/config/i386/mingw.opt gcc-4.9.1/gcc/config/i386/mingw.opt
--- gcc-4.9.1-orig/gcc/config/i386/mingw.opt 2014-01-03 01:23:26.000000000 +0300
+++ gcc-4.9.1/gcc/config/i386/mingw.opt 2014-10-29 15:55:08.853000000 +0300
@@ -28,8 +28,4 @@
C ObjC C++ ObjC++ Var(warn_pedantic_ms_format) Init(1) Warning
Warn about none ISO msvcrt scanf/printf width extensions
@ -32,9 +35,10 @@
-For nested functions on stack executable permission is set.
-
; Need to retain blank line above.
--- origsrc/gcc-4.7.2/libgcc//config.host 2012-11-01 20:55:58.234375000 +0000
+++ src/gcc-4.7.2/libgcc//config.host 2012-11-01 20:11:20.000000000 +0000
@@ -273,6 +273,9 @@ case ${host} in
diff -Naur gcc-4.9.1-orig/libgcc/config.host gcc-4.9.1/libgcc/config.host
--- gcc-4.9.1-orig/libgcc/config.host 2014-03-27 18:40:31.000000000 +0300
+++ gcc-4.9.1/libgcc/config.host 2014-10-29 15:55:08.853000000 +0300
@@ -308,6 +308,9 @@
i[34567]86-*-mingw* | x86_64-*-mingw*)
enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
;;

View File

@ -1,6 +1,7 @@
--- origsrc/gcc-4.7.2/libjava/classpath/examples/gnu/classpath/examples/awt/HintingDemo.java 2011-01-12 03:46:05.000000000 +0800
+++ src/gcc-4.7.2/libjava/classpath/examples/gnu/classpath/examples/awt/HintingDemo.java 2013-02-26 19:38:52.015694500 +0800
@@ -211,7 +211,7 @@ public class HintingDemo extends JFrame
diff -Naur gcc-4.9.1-orig/libjava/classpath/examples/gnu/classpath/examples/awt/HintingDemo.java gcc-4.9.1/libjava/classpath/examples/gnu/classpath/examples/awt/HintingDemo.java
--- gcc-4.9.1-orig/libjava/classpath/examples/gnu/classpath/examples/awt/HintingDemo.java 2011-01-11 22:46:05.000000000 +0300
+++ gcc-4.9.1/libjava/classpath/examples/gnu/classpath/examples/awt/HintingDemo.java 2014-10-29 15:55:34.187400000 +0300
@@ -211,7 +211,7 @@
HintingDemo()
{
@ -9,9 +10,10 @@
loadFont(file);
setLayout(new BorderLayout());
chooser = new Chooser();
--- origsrc/gcc-4.7.2/libjava/classpath/gnu/java/awt/peer/ClasspathDesktopPeer.java 2011-01-12 03:46:05.000000000 +0800
+++ src/gcc-4.7.2/libjava/classpath/gnu/java/awt/peer/ClasspathDesktopPeer.java 2013-02-26 19:39:24.817859900 +0800
@@ -58,7 +58,7 @@ public class ClasspathDesktopPeer
diff -Naur gcc-4.9.1-orig/libjava/classpath/gnu/java/awt/peer/ClasspathDesktopPeer.java gcc-4.9.1/libjava/classpath/gnu/java/awt/peer/ClasspathDesktopPeer.java
--- gcc-4.9.1-orig/libjava/classpath/gnu/java/awt/peer/ClasspathDesktopPeer.java 2011-01-11 22:46:05.000000000 +0300
+++ gcc-4.9.1/libjava/classpath/gnu/java/awt/peer/ClasspathDesktopPeer.java 2014-10-29 15:55:34.187400000 +0300
@@ -58,7 +58,7 @@
implements DesktopPeer
{
/** This is the fallback browser, if no desktop was detected. */
@ -20,9 +22,10 @@
/** gnu.java.awt.peer.Desktop.html.command */
protected static final String _BROWSE = "html";
--- origsrc/gcc-4.7.2/libjava/classpath/gnu/java/awt/peer/ClasspathFontPeer.java 2011-01-12 03:46:05.000000000 +0800
+++ src/gcc-4.7.2/libjava/classpath/gnu/java/awt/peer/ClasspathFontPeer.java 2013-02-26 19:38:52.027696100 +0800
@@ -158,6 +158,8 @@ public abstract class ClasspathFontPeer
diff -Naur gcc-4.9.1-orig/libjava/classpath/gnu/java/awt/peer/ClasspathFontPeer.java gcc-4.9.1/libjava/classpath/gnu/java/awt/peer/ClasspathFontPeer.java
--- gcc-4.9.1-orig/libjava/classpath/gnu/java/awt/peer/ClasspathFontPeer.java 2011-01-11 22:46:05.000000000 +0300
+++ gcc-4.9.1/libjava/classpath/gnu/java/awt/peer/ClasspathFontPeer.java 2014-10-29 15:55:34.187400000 +0300
@@ -158,6 +158,8 @@
protected static boolean isLogicalFontName(String name)
{
@ -31,7 +34,7 @@
String uname = name.toUpperCase ();
return (uname.equals ("SANSSERIF") ||
uname.equals ("SERIF") ||
@@ -165,6 +167,7 @@ public abstract class ClasspathFontPeer
@@ -165,6 +167,7 @@
uname.equals ("DIALOG") ||
uname.equals ("DIALOGINPUT") ||
uname.equals ("DEFAULT"));
@ -39,8 +42,9 @@
}
protected static String logicalFontNameToFaceName (String name)
--- origsrc/gcc-4.7.2/libjava/classpath/resource/gnu/java/awt/font/fonts.properties 2007-10-21 20:06:09.000000000 +0800
+++ src/gcc-4.7.2/libjava/classpath/resource/gnu/java/awt/font/fonts.properties 2013-02-26 19:38:52.039697600 +0800
diff -Naur gcc-4.9.1-orig/libjava/classpath/resource/gnu/java/awt/font/fonts.properties gcc-4.9.1/libjava/classpath/resource/gnu/java/awt/font/fonts.properties
--- gcc-4.9.1-orig/libjava/classpath/resource/gnu/java/awt/font/fonts.properties 2007-10-21 15:06:09.000000000 +0300
+++ gcc-4.9.1/libjava/classpath/resource/gnu/java/awt/font/fonts.properties 2014-10-29 15:55:34.203000000 +0300
@@ -36,20 +36,20 @@
# exception statement from your version.
@ -74,4 +78,3 @@
# List of aliases.
Dialog/a=FreeSans

View File

@ -0,0 +1,12 @@
diff -Naur gcc-4.9.1-orig/libjava/gnu/java/nio/channels/natFileChannelPosix.cc gcc-4.9.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc
--- gcc-4.9.1-orig/libjava/gnu/java/nio/channels/natFileChannelPosix.cc 2007-04-03 04:05:50.000000000 +0300
+++ gcc-4.9.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc 2014-10-29 15:56:00.052200000 +0300
@@ -386,7 +386,7 @@
#if defined (FIONREAD)
r = ::ioctl (fd, FIONREAD, &num);
- if (r == -1 && errno == ENOTTY)
+ if (r == -1 && (errno == ENOTTY || errno == EINVAL))
{
// If the ioctl doesn't work, we don't care.
r = 0;

View File

@ -0,0 +1,60 @@
diff -Naur gcc-4.9.1-orig/libjava/classpath/configure gcc-4.9.1/libjava/classpath/configure
--- gcc-4.9.1-orig/libjava/classpath/configure 2013-09-20 12:47:52.000000000 +0300
+++ gcc-4.9.1/libjava/classpath/configure 2014-10-29 15:56:24.996600000 +0300
@@ -3180,7 +3180,7 @@
cp_module=""
;;
*)
- cp_module="-module"
+ cp_module="-module -avoid-version"
;;
esac
diff -Naur gcc-4.9.1-orig/libjava/classpath/configure.ac gcc-4.9.1/libjava/classpath/configure.ac
--- gcc-4.9.1-orig/libjava/classpath/configure.ac 2013-05-23 00:25:59.000000000 +0300
+++ gcc-4.9.1/libjava/classpath/configure.ac 2014-10-29 15:56:25.012200000 +0300
@@ -64,7 +64,7 @@
cp_module=""
;;
*)
- cp_module="-module"
+ cp_module="-module -avoid-version"
;;
esac
diff -Naur gcc-4.9.1-orig/libjava/include/posix.h gcc-4.9.1/libjava/include/posix.h
--- gcc-4.9.1-orig/libjava/include/posix.h 2012-03-12 18:35:56.000000000 +0300
+++ gcc-4.9.1/libjava/include/posix.h 2014-10-29 15:56:25.012200000 +0300
@@ -42,11 +42,17 @@
#include <java/util/Properties.h>
// Prefix and suffix for shared libraries.
+#ifdef __CYGWIN__
+#define _Jv_platform_solib_prefix "cyg"
+#else
#define _Jv_platform_solib_prefix "lib"
+#endif
#if defined(__APPLE__) && defined(__MACH__)
#define _Jv_platform_solib_suffix ".dylib"
#elif defined(HPUX) && defined(HP_PA)
#define _Jv_platform_solib_suffix ".sl"
+#elif defined(__CYGWIN__)
+#define _Jv_platform_solib_suffix ".dll"
#else
#define _Jv_platform_solib_suffix ".so"
#endif
diff -Naur gcc-4.9.1-orig/libjava/java/net/natVMURLConnection.cc gcc-4.9.1/libjava/java/net/natVMURLConnection.cc
--- gcc-4.9.1-orig/libjava/java/net/natVMURLConnection.cc 2009-12-02 01:05:25.000000000 +0300
+++ gcc-4.9.1/libjava/java/net/natVMURLConnection.cc 2014-10-29 15:56:25.012200000 +0300
@@ -32,7 +32,11 @@
java::net::VMURLConnection::init ()
{
#if defined (HAVE_MAGIC_T) && defined (HAVE_MAGIC_H) && defined (USE_LTDL)
+#ifdef __CYGWIN__
+ lt_dlhandle handle = lt_dlopenext ("cygmagic-1.dll");
+#else
lt_dlhandle handle = lt_dlopenext ("libmagic.so");
+#endif
if (!handle)
return;

View File

@ -0,0 +1,21 @@
diff -Naur gcc-4.9.1-orig/gcc/config/i386/cygwin.h gcc-4.9.1/gcc/config/i386/cygwin.h
--- gcc-4.9.1-orig/gcc/config/i386/cygwin.h 2014-10-29 15:55:32.783400000 +0300
+++ gcc-4.9.1/gcc/config/i386/cygwin.h 2014-10-29 15:56:50.674200000 +0300
@@ -143,7 +143,7 @@
#define LIBGCC_SONAME "cyggcc_s" LIBGCC_EH_EXTN "-1.dll"
/* We should find a way to not have to update this manually. */
-#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-15.dll"
+#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-16.dll"
/* Make stack executable to avoid DEP problems with trampolines. */
#define HAVE_ENABLE_EXECUTE_STACK
diff -Naur gcc-4.9.1-orig/gcc/config/i386/mingw32.h gcc-4.9.1/gcc/config/i386/mingw32.h
--- gcc-4.9.1-orig/gcc/config/i386/mingw32.h 2014-04-23 12:46:13.000000000 +0300
+++ gcc-4.9.1/gcc/config/i386/mingw32.h 2014-10-29 15:56:50.674200000 +0300
@@ -246,4 +246,4 @@
#define LIBGCC_SONAME "libgcc_s" LIBGCC_EH_EXTN "-1.dll"
/* We should find a way to not have to update this manually. */
-#define LIBGCJ_SONAME "libgcj" /*LIBGCC_EH_EXTN*/ "-13.dll"
+#define LIBGCJ_SONAME "libgcj" /*LIBGCC_EH_EXTN*/ "-14.dll"

View File

@ -1,35 +1,6 @@
--- origsrc/gcc-4.8-20130310/libatomic/Makefile.am 2013-01-14 12:16:23.000000000 -0600
+++ src/gcc-4.8-20130310/libatomic/Makefile.am 2013-03-17 05:10:55.958313400 -0500
@@ -66,7 +66,7 @@
endif
libatomic_version_info = -version-info $(libtool_VERSION)
-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
fenv.c
--- origsrc/gcc-4.8-20130310/libatomic/Makefile.in 2013-03-10 17:37:36.000000000 -0500
+++ src/gcc-4.8-20130310/libatomic/Makefile.in 2013-03-17 05:13:32.732280300 -0500
@@ -244,6 +244,7 @@
libtool_VERSION = @libtool_VERSION@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@
@@ -285,7 +286,7 @@
@LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = $(top_srcdir)/libatomic.map
@LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = libatomic.map-sun
libatomic_version_info = -version-info $(libtool_VERSION)
-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
fenv.c
--- origsrc/gcc-4.8-20130310/libatomic/aclocal.m4 2013-03-10 17:37:36.000000000 -0500
+++ src/gcc-4.8-20130310/libatomic/aclocal.m4 2013-03-17 05:09:13.598458700 -0500
diff -Naur gcc-4.9.1-orig/libatomic/aclocal.m4 gcc-4.9.1/libatomic/aclocal.m4
--- gcc-4.9.1-orig/libatomic/aclocal.m4 2014-07-16 13:06:03.000000000 +0300
+++ gcc-4.9.1/libatomic/aclocal.m4 2014-10-29 15:57:15.369000000 +0300
@@ -993,6 +993,7 @@
m4_include([../config/acx.m4])
m4_include([../config/depstand.m4])
@ -38,8 +9,9 @@
m4_include([../config/multi.m4])
m4_include([../config/override.m4])
m4_include([../config/stdint.m4])
--- origsrc/gcc-4.8-20130310/libatomic/configure 2013-03-10 17:37:36.000000000 -0500
+++ src/gcc-4.8-20130310/libatomic/configure 2013-03-17 05:29:38.288507000 -0500
diff -Naur gcc-4.9.1-orig/libatomic/configure gcc-4.9.1/libatomic/configure
--- gcc-4.9.1-orig/libatomic/configure 2014-07-16 13:06:03.000000000 +0300
+++ gcc-4.9.1/libatomic/configure 2014-10-29 15:57:15.384600000 +0300
@@ -627,6 +627,7 @@
MAINTAINER_MODE_TRUE
enable_static
@ -48,7 +20,7 @@
CPP
OTOOL64
OTOOL
@@ -11013,7 +11014,7 @@
@@ -11106,7 +11107,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
@ -57,7 +29,7 @@
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11119,7 +11120,7 @@
@@ -11212,7 +11213,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
@ -66,7 +38,7 @@
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11357,6 +11358,28 @@
@@ -11450,6 +11451,28 @@
@ -95,8 +67,9 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
--- origsrc/gcc-4.8-20130310/libatomic/configure.ac 2013-01-14 12:16:23.000000000 -0600
+++ src/gcc-4.8-20130310/libatomic/configure.ac 2013-03-17 05:29:30.655070400 -0500
diff -Naur gcc-4.9.1-orig/libatomic/configure.ac gcc-4.9.1/libatomic/configure.ac
--- gcc-4.9.1-orig/libatomic/configure.ac 2014-01-03 01:24:30.000000000 +0300
+++ gcc-4.9.1/libatomic/configure.ac 2014-10-29 15:57:15.478200000 +0300
@@ -143,6 +143,7 @@
# Configure libtool
@ -105,9 +78,10 @@
AC_SUBST(enable_shared)
AC_SUBST(enable_static)
AM_MAINTAINER_MODE
--- origsrc/gcc-4.8-20130310/libatomic/configure.tgt 2013-01-14 12:16:23.000000000 -0600
+++ src/gcc-4.8-20130310/libatomic/configure.tgt 2013-03-17 04:50:09.727033000 -0500
@@ -108,7 +108,7 @@
diff -Naur gcc-4.9.1-orig/libatomic/configure.tgt gcc-4.9.1/libatomic/configure.tgt
--- gcc-4.9.1-orig/libatomic/configure.tgt 2014-01-03 01:24:30.000000000 +0300
+++ gcc-4.9.1/libatomic/configure.tgt 2014-10-29 15:57:15.478200000 +0300
@@ -103,7 +103,7 @@
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
| *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
| *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
@ -116,3 +90,35 @@
# POSIX system. The OS is supported.
config_path="${config_path} posix"
;;
diff -Naur gcc-4.9.1-orig/libatomic/Makefile.am gcc-4.9.1/libatomic/Makefile.am
--- gcc-4.9.1-orig/libatomic/Makefile.am 2014-01-03 01:24:30.000000000 +0300
+++ gcc-4.9.1/libatomic/Makefile.am 2014-10-29 15:57:15.478200000 +0300
@@ -66,7 +66,7 @@
endif
libatomic_version_info = -version-info $(libtool_VERSION)
-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
fenv.c
diff -Naur gcc-4.9.1-orig/libatomic/Makefile.in gcc-4.9.1/libatomic/Makefile.in
--- gcc-4.9.1-orig/libatomic/Makefile.in 2014-07-16 13:06:03.000000000 +0300
+++ gcc-4.9.1/libatomic/Makefile.in 2014-10-29 15:57:15.478200000 +0300
@@ -244,6 +244,7 @@
libtool_VERSION = @libtool_VERSION@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@
@@ -285,7 +286,7 @@
@LIBAT_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = $(top_srcdir)/libatomic.map
@LIBAT_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBAT_BUILD_VERSIONED_SHLIB_TRUE@libatomic_version_dep = libatomic.map-sun
libatomic_version_info = -version-info $(libtool_VERSION)
-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
fenv.c

View File

@ -1,9 +1,7 @@
Only the convenience library is used in libjava, and the bundled version
is usually a few releases behind the standalone version.
--- origsrc/gcc-4.7.2/Makefile.in 2012-08-06 09:34:27.000000000 -0500
+++ src/gcc-4.7.2/Makefile.in 2013-03-10 21:27:05.825568600 -0500
@@ -1573,7 +1573,6 @@ install-info-target: maybe-install-info-
diff -Naur gcc-4.9.1-orig/Makefile.in gcc-4.9.1/Makefile.in
--- gcc-4.9.1-orig/Makefile.in 2014-04-04 23:53:48.000000000 +0300
+++ gcc-4.9.1/Makefile.in 2014-10-29 15:57:41.779800000 +0300
@@ -1606,7 +1606,6 @@
install-info-target: maybe-install-info-target-libtermcap
install-info-target: maybe-install-info-target-winsup
install-info-target: maybe-install-info-target-libgloss
@ -11,7 +9,7 @@ is usually a few releases behind the standalone version.
install-info-target: maybe-install-info-target-libjava
install-info-target: maybe-install-info-target-zlib
install-info-target: maybe-install-info-target-boehm-gc
@@ -1651,7 +1650,6 @@ install-pdf-target: maybe-install-pdf-ta
@@ -1689,7 +1688,6 @@
install-pdf-target: maybe-install-pdf-target-libtermcap
install-pdf-target: maybe-install-pdf-target-winsup
install-pdf-target: maybe-install-pdf-target-libgloss
@ -19,7 +17,7 @@ is usually a few releases behind the standalone version.
install-pdf-target: maybe-install-pdf-target-libjava
install-pdf-target: maybe-install-pdf-target-zlib
install-pdf-target: maybe-install-pdf-target-boehm-gc
@@ -1729,7 +1727,6 @@ install-html-target: maybe-install-html-
@@ -1772,7 +1770,6 @@
install-html-target: maybe-install-html-target-libtermcap
install-html-target: maybe-install-html-target-winsup
install-html-target: maybe-install-html-target-libgloss
@ -27,7 +25,7 @@ is usually a few releases behind the standalone version.
install-html-target: maybe-install-html-target-libjava
install-html-target: maybe-install-html-target-zlib
install-html-target: maybe-install-html-target-boehm-gc
@@ -1807,7 +1804,6 @@ installcheck-target: maybe-installcheck-
@@ -1855,7 +1852,6 @@
installcheck-target: maybe-installcheck-target-libtermcap
installcheck-target: maybe-installcheck-target-winsup
installcheck-target: maybe-installcheck-target-libgloss
@ -35,7 +33,7 @@ is usually a few releases behind the standalone version.
installcheck-target: maybe-installcheck-target-libjava
installcheck-target: maybe-installcheck-target-zlib
installcheck-target: maybe-installcheck-target-boehm-gc
@@ -2402,7 +2398,6 @@ install-target: \
@@ -2481,7 +2477,6 @@
maybe-install-target-libtermcap \
maybe-install-target-winsup \
maybe-install-target-libgloss \
@ -43,7 +41,7 @@ is usually a few releases behind the standalone version.
maybe-install-target-libjava \
maybe-install-target-zlib \
maybe-install-target-boehm-gc \
@@ -2500,7 +2495,6 @@ install-strip-target: \
@@ -2584,7 +2579,6 @@
maybe-install-strip-target-libtermcap \
maybe-install-strip-target-winsup \
maybe-install-strip-target-libgloss \

View File

@ -1,5 +1,6 @@
--- origsrc/gcc-4.8-20130310/libffi/src/x86/ffi.c 2012-12-26 10:28:02.000000000 -0600
+++ src/gcc-4.8-20130310/libffi/src/x86/ffi.c 2013-03-15 12:36:44.543127800 -0500
diff -Naur gcc-4.9.1-orig/libffi/src/x86/ffi.c gcc-4.9.1/libffi/src/x86/ffi.c
--- gcc-4.9.1-orig/libffi/src/x86/ffi.c 2012-12-26 19:28:02.000000000 +0300
+++ gcc-4.9.1/libffi/src/x86/ffi.c 2014-10-29 15:58:06.942600000 +0300
@@ -28,7 +28,7 @@
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */

View File

@ -1,6 +1,7 @@
--- origsrc/gcc-4.8.0/gcc/builtin-attrs.def 2013-01-10 14:38:27.000000000 -0600
+++ src/gcc-4.8.0/gcc/builtin-attrs.def 2013-03-24 03:12:36.171830700 -0500
@@ -107,6 +107,7 @@ DEF_ATTR_IDENT (ATTR_TYPEGENERIC, "type
diff -Naur gcc-4.9.1-orig/gcc/builtin-attrs.def gcc-4.9.1/gcc/builtin-attrs.def
--- gcc-4.9.1-orig/gcc/builtin-attrs.def 2014-01-03 01:23:26.000000000 +0300
+++ gcc-4.9.1/gcc/builtin-attrs.def 2014-10-29 15:58:31.980600000 +0300
@@ -108,6 +108,7 @@
DEF_ATTR_IDENT (ATTR_TM_REGPARM, "*tm regparm")
DEF_ATTR_IDENT (ATTR_TM_TMPURE, "transaction_pure")
DEF_ATTR_IDENT (ATTR_RETURNS_TWICE, "returns_twice")
@ -8,7 +9,7 @@
DEF_ATTR_TREE_LIST (ATTR_NOVOPS_LIST, ATTR_NOVOPS, ATTR_NULL, ATTR_NULL)
@@ -254,6 +255,8 @@ DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHRO
@@ -259,6 +260,8 @@
ATTR_TM_REGPARM, ATTR_NULL, ATTR_CONST_NOTHROW_LIST)
DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_RT_LIST,
ATTR_RETURNS_TWICE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
@ -17,8 +18,9 @@
/* Same attributes used for BUILT_IN_MALLOC except with TM_PURE thrown in. */
DEF_ATTR_TREE_LIST (ATTR_TMPURE_MALLOC_NOTHROW_LIST,
--- origsrc/gcc-4.8.0/gcc/gtm-builtins.def 2012-01-25 14:32:57.000000000 -0600
+++ src/gcc-4.8.0/gcc/gtm-builtins.def 2013-03-24 03:11:58.649684600 -0500
diff -Naur gcc-4.9.1-orig/gcc/gtm-builtins.def gcc-4.9.1/gcc/gtm-builtins.def
--- gcc-4.9.1-orig/gcc/gtm-builtins.def 2013-08-28 20:42:19.000000000 +0300
+++ gcc-4.9.1/gcc/gtm-builtins.def 2014-10-29 15:58:31.980600000 +0300
@@ -1,5 +1,5 @@
DEF_TM_BUILTIN (BUILT_IN_TM_START, "_ITM_beginTransaction",
- BT_FN_UINT32_UINT32_VAR, ATTR_TM_NOTHROW_RT_LIST)
@ -26,39 +28,10 @@
DEF_TM_BUILTIN (BUILT_IN_TM_COMMIT, "_ITM_commitTransaction",
BT_FN_VOID, ATTR_TM_NOTHROW_LIST)
--- origsrc/gcc-4.8-20130310/libitm/Makefile.am 2012-02-14 07:14:27.000000000 -0600
+++ src/gcc-4.8-20130310/libitm/Makefile.am 2013-03-17 04:58:44.672486200 -0500
@@ -54,7 +54,7 @@
# want or need libstdc++.
libitm_la_DEPENDENCIES = $(libitm_version_dep)
libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS)
-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
+libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) $(lt_host_flags)
libitm_la_SOURCES = \
aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc barrier.cc beginend.cc \
--- origsrc/gcc-4.8-20130310/libitm/Makefile.in 2013-03-10 17:37:36.000000000 -0500
+++ src/gcc-4.8-20130310/libitm/Makefile.in 2013-03-17 05:12:23.653329200 -0500
@@ -279,6 +279,7 @@
link_itm = @link_itm@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@
@@ -329,7 +330,7 @@
# want or need libstdc++.
libitm_la_DEPENDENCIES = $(libitm_version_dep)
libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS)
-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
+libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) $(lt_host_flags)
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 \
retry.cc rwlock.cc useraction.cc util.cc sjlj.S tls.cc \
--- origsrc/gcc-4.8-20130310/libitm/aclocal.m4 2013-03-10 17:37:36.000000000 -0500
+++ src/gcc-4.8-20130310/libitm/aclocal.m4 2013-03-17 03:01:59.966866400 -0500
@@ -996,6 +996,7 @@ m4_include([../config/depstand.m4])
diff -Naur gcc-4.9.1-orig/libitm/aclocal.m4 gcc-4.9.1/libitm/aclocal.m4
--- gcc-4.9.1-orig/libitm/aclocal.m4 2014-07-16 13:06:03.000000000 +0300
+++ gcc-4.9.1/libitm/aclocal.m4 2014-10-29 15:58:31.980600000 +0300
@@ -996,6 +996,7 @@
m4_include([../config/enable.m4])
m4_include([../config/futex.m4])
m4_include([../config/lead-dot.m4])
@ -66,9 +39,10 @@
m4_include([../config/mmap.m4])
m4_include([../config/multi.m4])
m4_include([../config/override.m4])
--- origsrc/gcc-4.8-20130310/libitm/configure 2013-03-10 17:37:36.000000000 -0500
+++ src/gcc-4.8-20130310/libitm/configure 2013-03-17 03:02:07.416876700 -0500
@@ -630,6 +630,7 @@ MAINTAINER_MODE_FALSE
diff -Naur gcc-4.9.1-orig/libitm/configure gcc-4.9.1/libitm/configure
--- gcc-4.9.1-orig/libitm/configure 2014-07-16 13:06:03.000000000 +0300
+++ gcc-4.9.1/libitm/configure 2014-10-29 15:58:31.996200000 +0300
@@ -630,6 +630,7 @@
MAINTAINER_MODE_TRUE
enable_static
enable_shared
@ -76,7 +50,7 @@
CXXCPP
CPP
OTOOL64
@@ -15139,6 +15140,28 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
@@ -15145,6 +15146,28 @@
@ -105,9 +79,10 @@
--- origsrc/gcc-4.8-20130310/libitm/configure.ac 2013-02-03 11:46:11.000000000 -0600
+++ src/gcc-4.8-20130310/libitm/configure.ac 2013-03-17 02:56:04.926376500 -0500
@@ -147,6 +147,7 @@ AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_
diff -Naur gcc-4.9.1-orig/libitm/configure.ac gcc-4.9.1/libitm/configure.ac
--- gcc-4.9.1-orig/libitm/configure.ac 2014-01-03 01:26:00.000000000 +0300
+++ gcc-4.9.1/libitm/configure.ac 2014-10-29 15:58:31.996200000 +0300
@@ -147,6 +147,7 @@
# Configure libtool
AM_PROG_LIBTOOL
@ -115,9 +90,10 @@
AC_SUBST(enable_shared)
AC_SUBST(enable_static)
--- origsrc/gcc-4.7.2/libitm/configure.tgt 2012-02-13 15:51:44.000000000 -0600
+++ src/gcc-4.7.2/libitm/configure.tgt 2013-03-05 05:39:29.757102000 -0600
@@ -131,7 +131,7 @@ case "${target}" in
diff -Naur gcc-4.9.1-orig/libitm/configure.tgt gcc-4.9.1/libitm/configure.tgt
--- gcc-4.9.1-orig/libitm/configure.tgt 2014-01-03 01:26:00.000000000 +0300
+++ gcc-4.9.1/libitm/configure.tgt 2014-10-29 15:58:31.996200000 +0300
@@ -140,7 +140,7 @@
*-*-gnu* | *-*-k*bsd*-gnu \
| *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \
| *-*-solaris2* | *-*-sysv4* | *-*-hpux11* \
@ -126,9 +102,10 @@
# POSIX system. The OS is supported.
;;
--- origsrc/gcc-4.8.0/libitm/libitm.h 2013-02-03 11:46:11.000000000 -0600
+++ src/gcc-4.8.0/libitm/libitm.h 2013-03-24 03:08:50.036896600 -0500
@@ -45,6 +45,7 @@ extern "C" {
diff -Naur gcc-4.9.1-orig/libitm/libitm.h gcc-4.9.1/libitm/libitm.h
--- gcc-4.9.1-orig/libitm/libitm.h 2014-01-03 01:26:00.000000000 +0300
+++ gcc-4.9.1/libitm/libitm.h 2014-10-29 15:58:31.996200000 +0300
@@ -45,6 +45,7 @@
#define ITM_NORETURN __attribute__((noreturn))
#define ITM_PURE __attribute__((transaction_pure))
@ -136,7 +113,7 @@
/* The following are externally visible definitions and functions, though
only very few of these should be called by user code. */
@@ -136,7 +137,7 @@ typedef uint64_t _ITM_transactionId_t; /
@@ -145,7 +146,7 @@
extern _ITM_transactionId_t _ITM_getTransactionId(void) ITM_REGPARM;
@ -145,8 +122,9 @@
extern void _ITM_abortTransaction(_ITM_abortReason) ITM_REGPARM ITM_NORETURN;
--- origsrc/gcc-4.8.0/libitm/libitm_i.h 2013-02-03 11:46:11.000000000 -0600
+++ src/gcc-4.8.0/libitm/libitm_i.h 2013-03-24 03:38:48.084780000 -0500
diff -Naur gcc-4.9.1-orig/libitm/libitm_i.h gcc-4.9.1/libitm/libitm_i.h
--- gcc-4.9.1-orig/libitm/libitm_i.h 2014-01-03 01:26:00.000000000 +0300
+++ gcc-4.9.1/libitm/libitm_i.h 2014-10-29 15:58:31.996200000 +0300
@@ -39,8 +39,10 @@
#include "local_type_traits"
#include "local_atomic"
@ -158,7 +136,7 @@
#include "common.h"
@@ -281,7 +283,7 @@ struct gtm_thread
@@ -289,7 +291,7 @@
// Invoked from assembly language, thus the "asm" specifier on
// the name, avoiding complex name mangling.
static uint32_t begin_transaction(uint32_t, const gtm_jmpbuf *)
@ -167,7 +145,7 @@
// In eh_cpp.cc
void revert_cpp_exceptions (gtm_transaction_cp *cp = 0);
@@ -318,7 +320,7 @@ namespace GTM HIDDEN {
@@ -322,7 +324,7 @@
extern uint64_t gtm_spin_count_var;
extern "C" uint32_t GTM_longjmp (uint32_t, const gtm_jmpbuf *, uint32_t)
@ -176,3 +154,35 @@
extern "C" void GTM_LB (const void *, size_t) ITM_REGPARM;
diff -Naur gcc-4.9.1-orig/libitm/Makefile.am gcc-4.9.1/libitm/Makefile.am
--- gcc-4.9.1-orig/libitm/Makefile.am 2014-01-13 22:36:17.000000000 +0300
+++ gcc-4.9.1/libitm/Makefile.am 2014-10-29 15:58:31.996200000 +0300
@@ -54,7 +54,7 @@
# want or need libstdc++.
libitm_la_DEPENDENCIES = $(libitm_version_dep)
libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS)
-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
+libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) $(lt_host_flags)
libitm_la_SOURCES = \
aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc barrier.cc beginend.cc \
diff -Naur gcc-4.9.1-orig/libitm/Makefile.in gcc-4.9.1/libitm/Makefile.in
--- gcc-4.9.1-orig/libitm/Makefile.in 2014-07-16 13:06:03.000000000 +0300
+++ gcc-4.9.1/libitm/Makefile.in 2014-10-29 15:58:31.996200000 +0300
@@ -279,6 +279,7 @@
link_itm = @link_itm@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
mandir = @mandir@
mkdir_p = @mkdir_p@
multi_basedir = @multi_basedir@
@@ -329,7 +330,7 @@
# want or need libstdc++.
libitm_la_DEPENDENCIES = $(libitm_version_dep)
libitm_la_LINK = $(LINK) $(libitm_la_LDFLAGS)
-libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script)
+libitm_la_LDFLAGS = $(libitm_version_info) $(libitm_version_script) $(lt_host_flags)
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 \
retry.cc rwlock.cc useraction.cc util.cc sjlj.S tls.cc \

View File

@ -1,6 +1,7 @@
--- origsrc/gcc-4.8-20130310/gcc/config.host 2013-03-17 02:15:46.575313400 -0500
+++ src/gcc-4.8-20130310/gcc/config.host 2013-03-17 03:10:31.035640300 -0500
@@ -219,14 +219,14 @@ case ${host} in
diff -Naur gcc-4.9.1-orig/gcc/config.host gcc-4.9.1/gcc/config.host
--- gcc-4.9.1-orig/gcc/config.host 2014-01-03 01:23:26.000000000 +0300
+++ gcc-4.9.1/gcc/config.host 2014-10-29 15:58:56.191800000 +0300
@@ -219,14 +219,14 @@
out_host_hook_obj=host-cygwin.o
host_xmake_file="${host_xmake_file} i386/x-cygwin"
host_exeext=.exe
@ -17,7 +18,7 @@
;;
x86_64-*-mingw*)
use_long_long_for_widest_fast_int=yes
@@ -234,7 +234,7 @@ case ${host} in
@@ -234,7 +234,7 @@
host_xmake_file="${host_xmake_file} i386/x-mingw32"
host_exeext=.exe
out_host_hook_obj=host-mingw32.o
@ -26,9 +27,10 @@
;;
i[34567]86-*-uwin*)
echo "*** UWIN may not be used as a host platform because"
--- origsrc/gcc-4.8-20130310/lto-plugin/Makefile.am 2011-08-10 03:48:37.000000000 -0500
+++ src/gcc-4.8-20130310/lto-plugin/Makefile.am 2013-03-17 03:11:08.995692600 -0500
@@ -22,7 +22,7 @@
diff -Naur gcc-4.9.1-orig/lto-plugin/Makefile.am gcc-4.9.1/lto-plugin/Makefile.am
--- gcc-4.9.1-orig/lto-plugin/Makefile.am 2014-03-17 16:04:12.000000000 +0300
+++ gcc-4.9.1/lto-plugin/Makefile.am 2014-10-29 15:58:56.191800000 +0300
@@ -24,7 +24,7 @@
$(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
@ -37,9 +39,10 @@
$(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
--- origsrc/gcc-4.8-20130310/lto-plugin/Makefile.in 2011-08-10 03:48:37.000000000 -0500
+++ src/gcc-4.8-20130310/lto-plugin/Makefile.in 2013-03-17 03:12:11.625779100 -0500
@@ -242,7 +242,7 @@
diff -Naur gcc-4.9.1-orig/lto-plugin/Makefile.in gcc-4.9.1/lto-plugin/Makefile.in
--- gcc-4.9.1-orig/lto-plugin/Makefile.in 2014-03-17 16:04:12.000000000 +0300
+++ gcc-4.9.1/lto-plugin/Makefile.in 2014-10-29 15:58:56.191800000 +0300
@@ -245,7 +245,7 @@
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \

View File

@ -1,26 +1,7 @@
--- gcc/config.gcc 2012-09-12 04:03:54.000000000 -0500
+++ gcc/config.gcc 2013-03-11 03:41:03.674656700 -0500
@@ -1438,7 +1438,7 @@
xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
target_gtfiles="\$(srcdir)/config/i386/winnt.c"
- extra_options="${extra_options} i386/cygming.opt"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
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"
@@ -1596,7 +1596,7 @@
xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
target_gtfiles="\$(srcdir)/config/i386/winnt.c"
- extra_options="${extra_options} i386/cygming.opt"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
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"
--- gcc/config/i386/cygwin.h (revision 196430)
+++ gcc/config/i386/cygwin.h (working copy)
@@ -18,7 +18,7 @@
diff -Naur gcc-4.9.1-orig/gcc/config/i386/cygwin.h gcc-4.9.1/gcc/config/i386/cygwin.h
--- gcc-4.9.1-orig/gcc/config/i386/cygwin.h 2014-10-29 15:57:13.855800000 +0300
+++ gcc-4.9.1/gcc/config/i386/cygwin.h 2014-10-29 15:59:20.434200000 +0300
@@ -31,7 +31,7 @@
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
@ -29,7 +10,7 @@
%{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
%{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
"
@@ -71,12 +80,14 @@
@@ -77,12 +77,14 @@
#undef LIB_SPEC
#define LIB_SPEC "\
%{pg:-lgmon} \
@ -44,7 +25,7 @@
#define CXX_WRAP_SPEC_LIST " \
--wrap _Znwj \
--wrap _Znaj \
@@ -115,7 +126,9 @@
@@ -120,7 +122,9 @@
%{shared: --shared} %{mdll:--dll} \
%{static:-Bstatic} %{!static:-Bdynamic} \
%{shared|mdll: --enable-auto-image-base -e __cygwin_dll_entry@12} \
@ -55,8 +36,9 @@
/* Binutils does not handle weak symbols from dlls correctly. For now,
do not use them unnecessarily in gthr-posix.h. */
--- gcc/config/i386/cygwin.opt 1969-12-31 18:00:00.000000000 -0600
+++ gcc/config/i386/cygwin.opt 2013-03-11 03:36:36.556378400 -0500
diff -Naur gcc-4.9.1-orig/gcc/config/i386/cygwin.opt gcc-4.9.1/gcc/config/i386/cygwin.opt
--- gcc-4.9.1-orig/gcc/config/i386/cygwin.opt 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/config/i386/cygwin.opt 2014-10-29 15:59:20.434200000 +0300
@@ -0,0 +1,27 @@
+; Cygwin-specific options.
+
@ -85,3 +67,24 @@
+Driver
+
+; Retain blank line above
diff -Naur gcc-4.9.1-orig/gcc/config.gcc gcc-4.9.1/gcc/config.gcc
--- gcc-4.9.1-orig/gcc/config.gcc 2014-06-16 11:15:35.000000000 +0300
+++ gcc-4.9.1/gcc/config.gcc 2014-10-29 15:59:20.449800000 +0300
@@ -1581,7 +1581,7 @@
xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
target_gtfiles="\$(srcdir)/config/i386/winnt.c"
- extra_options="${extra_options} i386/cygming.opt"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
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"
@@ -1596,7 +1596,7 @@
xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
target_gtfiles="\$(srcdir)/config/i386/winnt.c"
- extra_options="${extra_options} i386/cygming.opt"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
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"

View File

@ -0,0 +1,122 @@
diff -Naur gcc-4.9.1-orig/gcc/config/i386/cygwin.h gcc-4.9.1/gcc/config/i386/cygwin.h
--- gcc-4.9.1-orig/gcc/config/i386/cygwin.h 2014-10-29 15:59:43.007400000 +0300
+++ gcc-4.9.1/gcc/config/i386/cygwin.h 2014-10-29 15:59:44.286600000 +0300
@@ -40,7 +40,7 @@
#define STARTFILE_SPEC "\
%{!shared: %{!mdll: crt0%O%s \
%{pg:gcrt0%O%s}}}\
- crtbegin.o%s"
+ %{shared:crtbeginS.o%s;:crtbegin.o%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
diff -Naur gcc-4.9.1-orig/gcc/config.gcc gcc-4.9.1/gcc/config.gcc
--- gcc-4.9.1-orig/gcc/config.gcc 2014-10-29 15:59:43.007400000 +0300
+++ gcc-4.9.1/gcc/config.gcc 2014-10-29 15:59:44.302200000 +0300
@@ -1589,6 +1589,7 @@
thread_file='posix'
fi
use_gcc_stdint=wrap
+ default_use_cxa_atexit=yes
;;
x86_64-*-cygwin*)
need_64bit_isa=yes
@@ -1897,6 +1898,7 @@
with_headers=yes
fi
use_gcc_stdint=wrap
+ default_use_cxa_atexit=yes
;;
microblaze*-linux*)
case $target in
diff -Naur gcc-4.9.1-orig/libgcc/config/i386/cygming-crtbegin.c gcc-4.9.1/libgcc/config/i386/cygming-crtbegin.c
--- gcc-4.9.1-orig/libgcc/config/i386/cygming-crtbegin.c 2014-04-30 21:09:06.000000000 +0300
+++ gcc-4.9.1/libgcc/config/i386/cygming-crtbegin.c 2014-10-29 15:59:44.302200000 +0300
@@ -110,6 +110,23 @@
= { };
#endif
+#ifdef __CYGWIN__
+/* Declare the __dso_handle variable. It should have a unique value
+ in every shared-object; in a main program its value is zero. The
+ object should in any case be protected. This means the instance
+ in one DSO or the main program is not used in another object. The
+ dynamic linker takes care of this. */
+
+#ifdef CRTSTUFFS_O
+extern void *__ImageBase;
+void *__dso_handle = &__ImageBase;
+#else
+void *__dso_handle = 0;
+#endif
+
+#endif /* __CYGWIN__ */
+
+
/* Pull in references from libgcc.a(unwind-dw2-fde.o) in the
startfile. These are referenced by a ctor and dtor in crtend.o. */
extern void __gcc_register_frame (void);
@@ -155,6 +172,13 @@
register_class_fn (__JCR_LIST__);
}
#endif
+
+#if DEFAULT_USE_CXA_ATEXIT
+ /* If we use the __cxa_atexit method to register C++ dtors
+ at object construction, also use atexit to register eh frame
+ info cleanup. */
+ atexit(__gcc_deregister_frame);
+#endif /* DEFAULT_USE_CXA_ATEXIT */
}
void
diff -Naur gcc-4.9.1-orig/libgcc/config/i386/cygming-crtend.c gcc-4.9.1/libgcc/config/i386/cygming-crtend.c
--- gcc-4.9.1-orig/libgcc/config/i386/cygming-crtend.c 2014-01-03 01:25:22.000000000 +0300
+++ gcc-4.9.1/libgcc/config/i386/cygming-crtend.c 2014-10-29 15:59:44.302200000 +0300
@@ -70,12 +70,6 @@
register_frame_ctor (void)
{
__gcc_register_frame ();
-#if DEFAULT_USE_CXA_ATEXIT
- /* If we use the __cxa_atexit method to register C++ dtors
- at object construction, also use atexit to register eh frame
- info cleanup. */
- atexit (__gcc_deregister_frame);
-#endif
}
#if !DEFAULT_USE_CXA_ATEXIT
diff -Naur gcc-4.9.1-orig/libgcc/config/i386/t-cygming gcc-4.9.1/libgcc/config/i386/t-cygming
--- gcc-4.9.1-orig/libgcc/config/i386/t-cygming 2011-11-02 18:23:48.000000000 +0300
+++ gcc-4.9.1/libgcc/config/i386/t-cygming 2014-10-29 15:59:44.302200000 +0300
@@ -8,6 +8,9 @@
crtbegin.o: $(srcdir)/config/i386/cygming-crtbegin.c
$(crt_compile) -fno-omit-frame-pointer -c $<
+crtbeginS.o: $(srcdir)/config/i386/cygming-crtbegin.c
+ $(crt_compile) -fno-omit-frame-pointer -c $< -DCRTSTUFFS_O
+
# We intentionally use a implementation-reserved init priority of 0,
# so allow the warning.
crtend.o: $(srcdir)/config/i386/cygming-crtend.c
diff -Naur gcc-4.9.1-orig/libgcc/config.host gcc-4.9.1/libgcc/config.host
--- gcc-4.9.1-orig/libgcc/config.host 2014-10-29 15:55:32.799000000 +0300
+++ gcc-4.9.1/libgcc/config.host 2014-10-29 15:59:44.302200000 +0300
@@ -603,7 +603,7 @@
i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
;;
i[34567]86-*-cygwin*)
- extra_parts="crtbegin.o crtend.o crtfastmath.o"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
if test x$enable_sjlj_exceptions = xyes; then
tmake_eh_file="i386/t-sjlj-eh"
@@ -629,7 +629,7 @@
tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin i386/t-crtfm i386/t-chkstk t-dfprules"
;;
x86_64-*-cygwin*)
- extra_parts="crtbegin.o crtend.o crtfastmath.o"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
if test x$enable_sjlj_exceptions = xyes; then
tmake_eh_file="i386/t-sjlj-eh"

View File

@ -0,0 +1,80 @@
diff -Naur gcc-4.9.1-orig/libstdc++-v3/config/os/mingw32-w64/os_defines.h gcc-4.9.1/libstdc++-v3/config/os/mingw32-w64/os_defines.h
--- gcc-4.9.1-orig/libstdc++-v3/config/os/mingw32-w64/os_defines.h 2014-01-03 01:30:10.000000000 +0300
+++ gcc-4.9.1/libstdc++-v3/config/os/mingw32-w64/os_defines.h 2014-10-29 16:00:08.575800000 +0300
@@ -78,4 +78,9 @@
#define _GLIBCXX_LLP64 1
#endif
+// Enable use of GetModuleHandleEx (requires Windows XP/2003) in
+// __cxa_thread_atexit to prevent modules from being unloaded before
+// their dtors are called
+#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
+
#endif
diff -Naur gcc-4.9.1-orig/libstdc++-v3/config/os/newlib/os_defines.h gcc-4.9.1/libstdc++-v3/config/os/newlib/os_defines.h
--- gcc-4.9.1-orig/libstdc++-v3/config/os/newlib/os_defines.h 2014-01-03 01:30:10.000000000 +0300
+++ gcc-4.9.1/libstdc++-v3/config/os/newlib/os_defines.h 2014-10-29 16:00:08.575800000 +0300
@@ -47,6 +47,12 @@
// See libstdc++/20806.
#define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1
+
+// Enable use of GetModuleHandleEx (requires Windows XP/2003) in
+// __cxa_thread_atexit to prevent modules from being unloaded before
+// their dtors are called
+#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
+
#endif
#endif
diff -Naur gcc-4.9.1-orig/libstdc++-v3/libsupc++/atexit_thread.cc gcc-4.9.1/libstdc++-v3/libsupc++/atexit_thread.cc
--- gcc-4.9.1-orig/libstdc++-v3/libsupc++/atexit_thread.cc 2014-01-03 01:30:10.000000000 +0300
+++ gcc-4.9.1/libstdc++-v3/libsupc++/atexit_thread.cc 2014-10-29 16:00:08.575800000 +0300
@@ -25,6 +25,10 @@
#include <cstdlib>
#include <new>
#include "bits/gthr.h"
+#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
#if HAVE___CXA_THREAD_ATEXIT_IMPL
@@ -47,6 +51,9 @@
void (*destructor)(void *);
void *object;
elt *next;
+#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ HMODULE dll;
+#endif
};
// Keep a per-thread list of cleanups in gthread_key storage.
@@ -62,6 +69,11 @@
{
elt *old_e = e;
e->destructor (e->object);
+#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ /* Decrement DLL count */
+ if (e->dll)
+ FreeLibrary (e->dll);
+#endif
e = e->next;
delete (old_e);
}
@@ -133,6 +145,14 @@
new_elt->destructor = dtor;
new_elt->object = obj;
new_elt->next = first;
+#ifdef _GLIBCXX_THREAD_ATEXIT_WIN32
+ /* Store the DLL address for a later call to FreeLibrary in new_elt and
+ increment DLL load count. This blocks the unloading of the DLL
+ before the thread-local dtors have been called. This does NOT help
+ if FreeLibrary/dlclose is called in excess. */
+ GetModuleHandleExW (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
+ (LPCWSTR) dtor, &new_elt->dll);
+#endif
if (__gthread_active_p ())
__gthread_setspecific (key, new_elt);

View File

@ -0,0 +1,32 @@
From 6bbd0b26d9204989b71665eba1f70ee1f808b19e Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:52:21 +0800
Subject: [PATCH] handle dllimport properly in medium model
---
gcc/config/i386/predicates.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 2ef1384..3fc6104 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -164,6 +164,7 @@
switch (XINT (XEXP (op, 0), 1))
{
case UNSPEC_GOTPCREL:
+ if (TARGET_PECOFF) break;
case UNSPEC_DTPOFF:
case UNSPEC_GOTNTPOFF:
case UNSPEC_NTPOFF:
@@ -268,6 +269,10 @@
/* TLS symbols are not constant. */
if (SYMBOL_REF_TLS_MODEL (op))
return false;
+ /* Dll-imported symbols are always external. */
+ if (TARGET_DLLIMPORT_DECL_ATTRIBUTES && SYMBOL_REF_DLLIMPORT_P (op))
+ return false;
+
return (ix86_cmodel == CM_SMALL
|| (ix86_cmodel == CM_MEDIUM
&& !SYMBOL_REF_FAR_ADDR_P (op)));

View File

@ -0,0 +1,10 @@
diff -Naur gcc-4.9.1-orig/gcc/testsuite/gcc.target/i386/pr25993.c gcc-4.9.1/gcc/testsuite/gcc.target/i386/pr25993.c
--- gcc-4.9.1-orig/gcc/testsuite/gcc.target/i386/pr25993.c 2010-05-21 18:03:26.000000000 +0300
+++ gcc-4.9.1/gcc/testsuite/gcc.target/i386/pr25993.c 2014-10-29 16:00:32.303400000 +0300
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" } { "*" } { "" } } */
+/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" } { "*" } { "" } } */
/* { dg-options "-std=c99 -x assembler-with-cpp" } */
#ifndef __ASSEMBLER__

View File

@ -1,11 +1,10 @@
Index: gcc/ada/s-oscons-tmplt.c
===================================================================
--- gcc/ada/s-oscons-tmplt.c (revision 202887)
+++ gcc/ada/s-oscons-tmplt.c (working copy)
@@ -973,7 +973,12 @@
diff -Naur gcc-4.9.1-orig/gcc/ada/s-oscons-tmplt.c gcc-4.9.1/gcc/ada/s-oscons-tmplt.c
--- gcc-4.9.1-orig/gcc/ada/s-oscons-tmplt.c 2014-02-24 20:01:19.000000000 +0300
+++ gcc-4.9.1/gcc/ada/s-oscons-tmplt.c 2014-10-29 16:00:56.218200000 +0300
@@ -986,7 +986,12 @@
#endif /* HAVE_TERMIOS */
-#ifdef __MINGW32__
+#ifdef __CYGWIN__
+#define RTS_CONTROL_ENABLE 0x1
@ -16,4 +15,3 @@ Index: gcc/ada/s-oscons-tmplt.c
CNU(DTR_CONTROL_ENABLE, "Enable DTR flow ctrl")
CNU(RTS_CONTROL_ENABLE, "Enable RTS flow ctrl")
#endif

View File

@ -1,6 +1,7 @@
--- origsrc/gcc-4.8.2/libiberty/aclocal.m4 2013-11-17 03:48:36.190725600 -0600
+++ src/gcc-4.8.2/libiberty/aclocal.m4 2013-11-16 23:57:59.000000000 -0600
@@ -15,6 +15,8 @@ AC_CACHE_CHECK([for working strncmp], ac
diff -Naur gcc-4.9.1-orig/libiberty/aclocal.m4 gcc-4.9.1/libiberty/aclocal.m4
--- gcc-4.9.1-orig/libiberty/aclocal.m4 2011-12-20 11:08:30.000000000 +0300
+++ gcc-4.9.1/libiberty/aclocal.m4 2014-10-29 16:01:20.070600000 +0300
@@ -15,6 +15,8 @@
/* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */
#include <sys/types.h>
@ -9,7 +10,7 @@
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
@@ -147,7 +149,9 @@ if test $ac_cv_os_cray = yes; then
@@ -147,7 +149,9 @@
fi
AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
@ -20,9 +21,10 @@
{
static char *addr = 0;
auto char dummy;
--- origsrc/gcc-4.8.2/libiberty/configure 2013-11-17 03:48:36.197726000 -0600
+++ src/gcc-4.8.2/libiberty/configure 2013-11-16 23:57:59.000000000 -0600
@@ -6069,6 +6069,7 @@ else
diff -Naur gcc-4.9.1-orig/libiberty/configure gcc-4.9.1/libiberty/configure
--- gcc-4.9.1-orig/libiberty/configure 2014-01-06 21:15:31.000000000 +0300
+++ gcc-4.9.1/libiberty/configure 2014-10-29 16:01:20.070600000 +0300
@@ -6077,6 +6077,7 @@
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@ -30,7 +32,7 @@
find_stack_direction ()
{
static char *addr = 0;
@@ -6838,6 +6839,8 @@ else
@@ -6846,6 +6847,8 @@
/* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */
#include <sys/types.h>

View File

@ -1,5 +1,5 @@
--- gcc/c-family/c-opts.c (revision 200330)
+++ gcc/c-family/c-opts.c (working copy)
--- a/gcc/c-family/c-opts.c (revision 200330)
+++ b/gcc/c-family/c-opts.c (working copy)
@@ -1338,10 +1338,14 @@ c_finish_options (void)
/* Give CPP the next file given by -include, if any. */

View File

@ -1,13 +0,0 @@
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35536
--- origsrc/gcc-4.5.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc 2007-04-02 20:05:50.000000000 -0500
+++ src/gcc-4.5.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc 2010-10-27 13:39:34.044718100 -0500
@@ -386,7 +386,7 @@ FileChannelImpl::available (void)
#if defined (FIONREAD)
r = ::ioctl (fd, FIONREAD, &num);
- if (r == -1 && errno == ENOTTY)
+ if (r == -1 && (errno == ENOTTY || errno == EINVAL))
{
// If the ioctl doesn't work, we don't care.
r = 0;

View File

@ -1,9 +0,0 @@
--- origsrc/gcc-4.5.0/gcc/testsuite/gcc.target/i386/pr25993.c 2008-02-26 01:38:34.000000000 +0000
+++ src/gcc-4.5.0/gcc/testsuite/gcc.target/i386/pr25993.c 2010-04-25 16:17:21.703125000 +0100
@@ -1,5 +1,5 @@
/* { dg-do assemble } */
-/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" } { "*" } { "" } } */
+/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" } { "*" } { "" } } */
/* { dg-options "-std=c99 -x assembler-with-cpp" } */
#ifndef __ASSEMBLER__

View File

@ -1,56 +0,0 @@
--- origsrc/gcc-4.5.0/libjava/classpath/configure.ac 2009-02-05 17:26:08.000000000 -0600
+++ src/gcc-4.5.0/libjava/classpath/configure.ac 2009-12-06 01:58:25.091013300 -0600
@@ -26,7 +26,7 @@ case "$host_os" in
cp_module=""
;;
*)
- cp_module="-module"
+ cp_module="-module -avoid-version"
;;
esac
--- origsrc/gcc-4.7.2/libjava/classpath/configure 2011-11-29 14:12:00.000000000 -0600
+++ src/gcc-4.7.2/libjava/classpath/configure 2013-03-01 01:48:05.585762700 -0600
@@ -3172,7 +3172,7 @@ case "$host_os" in
cp_module=""
;;
*)
- cp_module="-module"
+ cp_module="-module -avoid-version"
;;
esac
--- origsrc/gcc-4.7.2/libjava/include/posix.h 2011-01-03 14:52:22.000000000 -0600
+++ src/gcc-4.7.2/libjava/include/posix.h 2013-03-06 20:26:16.157459700 -0600
@@ -47,11 +47,17 @@ details. */
#include <java/util/Properties.h>
// Prefix and suffix for shared libraries.
+#ifdef __CYGWIN__
+#define _Jv_platform_solib_prefix "cyg"
+#else
#define _Jv_platform_solib_prefix "lib"
+#endif
#if defined(__APPLE__) && defined(__MACH__)
#define _Jv_platform_solib_suffix ".dylib"
#elif defined(HPUX) && defined(HP_PA)
#define _Jv_platform_solib_suffix ".sl"
+#elif defined(__CYGWIN__)
+#define _Jv_platform_solib_suffix ".dll"
#else
#define _Jv_platform_solib_suffix ".so"
#endif
--- origsrc/gcc-4.7.2/libjava/java/net/natVMURLConnection.cc 2009-12-01 16:05:25.000000000 -0600
+++ src/gcc-4.7.2/libjava/java/net/natVMURLConnection.cc 2013-03-06 20:20:42.202970700 -0600
@@ -32,7 +32,11 @@ void
java::net::VMURLConnection::init ()
{
#if defined (HAVE_MAGIC_T) && defined (HAVE_MAGIC_H) && defined (USE_LTDL)
+#ifdef __CYGWIN__
+ lt_dlhandle handle = lt_dlopenext ("cygmagic-1.dll");
+#else
lt_dlhandle handle = lt_dlopenext ("libmagic.so");
+#endif
if (!handle)
return;

View File

@ -1,17 +0,0 @@
--- gcc/config/i386/cygwin.h 2013-01-10 14:38:27.000000000 -0600
+++ gcc/config/i386/cygwin.h 2013-03-17 01:31:17.078372600 -0500
@@ -137,5 +137,5 @@
#define LIBGCC_SONAME "cyggcc_s" LIBGCC_EH_EXTN "-1.dll"
/* We should find a way to not have to update this manually. */
-#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-15.dll"
+#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-16.dll"
--- gcc/config/i386/mingw32.h 2013-01-10 14:38:27.000000000 -0600
+++ gcc/config/i386/mingw32.h 2013-03-17 01:31:17.078372600 -0500
@@ -245,4 +245,4 @@
#define LIBGCC_SONAME "libgcc_s" LIBGCC_EH_EXTN "-1.dll"
/* We should find a way to not have to update this manually. */
-#define LIBGCJ_SONAME "libgcj" /*LIBGCC_EH_EXTN*/ "-13.dll"
+#define LIBGCJ_SONAME "libgcj" /*LIBGCC_EH_EXTN*/ "-14.dll"

View File

@ -1,31 +0,0 @@
From 460c5bfa8ec3407a90b6ae377f49d65f122a09cc Mon Sep 17 00:00:00 2001
From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 9 Sep 2014 11:57:25 +0000
Subject: [PATCH] PR c++/61214 PR c++/62224 gcc/ *
gimple-fold.c (can_refer_decl_in_current_unit_p): Don't allow reference to a
DECL_EXTERNAL COMDAT. gcc/cp/ * decl2.c (decl_needed_p): Revert virtual
functions change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@215061 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/gimple-fold.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/ipa/devirt-40.C
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index c6aea65..2527d29 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -146,7 +146,8 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl)
The second is important when devirtualization happens during final
compilation stage when making a new reference no longer makes callee
to be compiled. */
- if (!node || !node->definition || node->global.inlined_to)
+ if (!node || !node->definition
+ || DECL_EXTERNAL (decl) || node->global.inlined_to)
{
gcc_checking_assert (!TREE_ASM_WRITTEN (decl));
return false;
--
2.1.2

View File

@ -1,6 +1,6 @@
diff -Naur gcc-4.8.0-cygwin/gcc/config/i386/msys.h gcc-4.8.0/gcc/config/i386/msys.h
--- gcc-4.8.0-cygwin/gcc/config/i386/msys.h 1970-01-01 00:00:00.000000000 +0000
+++ gcc-4.8.0/gcc/config/i386/msys.h 2013-04-16 16:54:04.264648400 +0000
diff -Naur gcc-4.9.1-orig/gcc/config/i386/msys.h gcc-4.9.1/gcc/config/i386/msys.h
--- gcc-4.9.1-orig/gcc/config/i386/msys.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/config/i386/msys.h 2014-10-29 16:02:33.780600000 +0300
@@ -0,0 +1,157 @@
+/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows32, using a Unix style C library and tools.
@ -46,7 +46,7 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config/i386/msys.h gcc-4.8.0/gcc/config/i386/msy
+#define STARTFILE_SPEC "\
+ %{!shared: %{!mdll: crt0%O%s \
+ %{pg:gcrt0%O%s}}}\
+ crtbegin.o%s"
+ %{shared:crtbeginS.o%s;:crtbegin.o%s}"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
@ -159,9 +159,9 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config/i386/msys.h gcc-4.8.0/gcc/config/i386/msy
+#define HAVE_ENABLE_EXECUTE_STACK
+#undef CHECK_EXECUTE_STACK_ENABLED
+#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable
diff -Naur gcc-4.8.0-cygwin/gcc/config/i386/msys-w64.h gcc-4.8.0/gcc/config/i386/msys-w64.h
--- gcc-4.8.0-cygwin/gcc/config/i386/msys-w64.h 1970-01-01 00:00:00.000000000 +0000
+++ gcc-4.8.0/gcc/config/i386/msys-w64.h 2013-04-16 16:52:47.461914100 +0000
diff -Naur gcc-4.9.1-orig/gcc/config/i386/msys-w64.h gcc-4.9.1/gcc/config/i386/msys-w64.h
--- gcc-4.9.1-orig/gcc/config/i386/msys-w64.h 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/config/i386/msys-w64.h 2014-10-29 16:02:33.780600000 +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
@ -247,16 +247,16 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config/i386/msys-w64.h gcc-4.8.0/gcc/config/i386
+
+#undef LIBGCC_SONAME
+#define LIBGCC_SONAME "msys-gcc_s-seh-1.dll"
diff -Naur gcc-4.8.0-cygwin/gcc/config/i386/t-msys-w64 gcc-4.8.0/gcc/config/i386/t-msys-w64
--- gcc-4.8.0-cygwin/gcc/config/i386/t-msys-w64 1970-01-01 00:00:00.000000000 +0000
+++ gcc-4.8.0/gcc/config/i386/t-msys-w64 2013-04-16 16:52:47.461914100 +0000
diff -Naur gcc-4.9.1-orig/gcc/config/i386/t-msys-w64 gcc-4.9.1/gcc/config/i386/t-msys-w64
--- gcc-4.9.1-orig/gcc/config/i386/t-msys-w64 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/gcc/config/i386/t-msys-w64 2014-10-29 16:02:33.780600000 +0300
@@ -0,0 +1,3 @@
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64
+MULTILIB_OSDIRNAMES = ../lib ../lib32
diff -Naur gcc-4.8.0-cygwin/gcc/config.build gcc-4.8.0/gcc/config.build
--- gcc-4.8.0-cygwin/gcc/config.build 2013-04-16 16:04:31.946289100 +0000
+++ gcc-4.8.0/gcc/config.build 2013-04-16 16:52:47.477539100 +0000
diff -Naur gcc-4.9.1-orig/gcc/config.build gcc-4.9.1/gcc/config.build
--- gcc-4.9.1-orig/gcc/config.build 2014-01-03 01:23:26.000000000 +0300
+++ gcc-4.9.1/gcc/config.build 2014-10-29 16:02:33.780600000 +0300
@@ -64,6 +64,10 @@
build_xm_file=i386/xm-cygwin.h
build_exeext=.exe
@ -268,12 +268,12 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config.build gcc-4.8.0/gcc/config.build
i[34567]86-*-mingw32* | x86_64-*-mingw*)
build_xm_file=i386/xm-mingw32.h
build_exeext=.exe
diff -Naur gcc-4.8.0-cygwin/gcc/config.gcc gcc-4.8.0/gcc/config.gcc
--- gcc-4.8.0-cygwin/gcc/config.gcc 2013-04-16 16:04:31.946289100 +0000
+++ gcc-4.8.0/gcc/config.gcc 2013-04-16 16:52:47.477539100 +0000
@@ -1467,6 +1467,35 @@
fi
diff -Naur gcc-4.9.1-orig/gcc/config.gcc gcc-4.9.1/gcc/config.gcc
--- gcc-4.9.1-orig/gcc/config.gcc 2014-10-29 16:00:07.327800000 +0300
+++ gcc-4.9.1/gcc/config.gcc 2014-10-29 16:02:33.780600000 +0300
@@ -1607,6 +1607,37 @@
use_gcc_stdint=wrap
tm_defines="${tm_defines} TARGET_CYGWIN64=1"
;;
+i[34567]86-*-msys*)
+ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/msys.h i386/cygwin-stdint.h"
@ -288,6 +288,7 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config.gcc gcc-4.8.0/gcc/config.gcc
+ thread_file='posix'
+ fi
+ use_gcc_stdint=wrap
+ default_use_cxa_atexit=yes
+ ;;
+x86_64-*-msys*)
+ need_64bit_isa=yes
@ -303,11 +304,12 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config.gcc gcc-4.8.0/gcc/config.gcc
+ thread_file='posix'
+ fi
+ use_gcc_stdint=wrap
+ default_use_cxa_atexit=yes
+ ;;
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
@@ -3719,6 +3748,8 @@
@@ -4108,6 +4139,8 @@
;;
i[34567]86-*-cygwin* | x86_64-*-cygwin*)
;;
@ -316,9 +318,9 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config.gcc gcc-4.8.0/gcc/config.gcc
i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
i[34567]86-*-freebsd* | x86_64-*-freebsd*)
diff -Naur gcc-4.8.0-cygwin/gcc/config.host gcc-4.8.0/gcc/config.host
--- gcc-4.8.0-cygwin/gcc/config.host 2013-04-16 16:04:31.977539100 +0000
+++ gcc-4.8.0/gcc/config.host 2013-04-16 16:52:47.540039100 +0000
diff -Naur gcc-4.9.1-orig/gcc/config.host gcc-4.9.1/gcc/config.host
--- gcc-4.9.1-orig/gcc/config.host 2014-10-29 15:59:18.827400000 +0300
+++ gcc-4.9.1/gcc/config.host 2014-10-29 16:02:33.780600000 +0300
@@ -221,6 +221,13 @@
host_exeext=.exe
host_lto_plugin_soname=cyglto_plugin.dll
@ -333,9 +335,9 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config.host gcc-4.8.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-4.8.0-cygwin/libgcc/config/i386/t-msys gcc-4.8.0/libgcc/config/i386/t-msys
--- gcc-4.8.0-cygwin/libgcc/config/i386/t-msys 1970-01-01 00:00:00.000000000 +0000
+++ gcc-4.8.0/libgcc/config/i386/t-msys 2013-04-16 16:52:47.461914100 +0000
diff -Naur gcc-4.9.1-orig/libgcc/config/i386/t-msys gcc-4.9.1/libgcc/config/i386/t-msys
--- gcc-4.9.1-orig/libgcc/config/i386/t-msys 1970-01-01 03:00:00.000000000 +0300
+++ gcc-4.9.1/libgcc/config/i386/t-msys 2014-10-29 16:02:33.796200000 +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
@ -356,10 +358,10 @@ diff -Naur gcc-4.8.0-cygwin/libgcc/config/i386/t-msys gcc-4.8.0/libgcc/config/i3
+# 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-4.8.0-cygwin/libgcc/config.host gcc-4.8.0/libgcc/config.host
--- gcc-4.8.0-cygwin/libgcc/config.host 2013-04-16 16:04:32.258789100 +0000
+++ gcc-4.8.0/libgcc/config.host 2013-04-16 16:55:46.929687500 +0000
@@ -277,6 +277,9 @@
diff -Naur gcc-4.9.1-orig/libgcc/config.host gcc-4.9.1/libgcc/config.host
--- gcc-4.9.1-orig/libgcc/config.host 2014-10-29 16:00:07.327800000 +0300
+++ gcc-4.9.1/libgcc/config.host 2014-10-29 16:02:33.796200000 +0300
@@ -311,6 +311,9 @@
i[34567]86-*-cygwin* | x86_64-*-cygwin*)
enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
;;

View File

@ -1,12 +1,12 @@
diff -Naur gcc-4.8.0-cygwin/libgcc/config.host gcc-4.8.0/libgcc/config.host
--- gcc-4.8.0-cygwin/libgcc/config.host 2013-04-16 16:04:32.258789100 +0000
+++ gcc-4.8.0/libgcc/config.host 2013-04-16 16:55:46.929687500 +0000
@@ -591,6 +594,39 @@
diff -Naur gcc-4.9.1-orig/libgcc/config.host gcc-4.9.1/libgcc/config.host
--- gcc-4.9.1-orig/libgcc/config.host 2014-10-29 16:02:56.431800000 +0300
+++ gcc-4.9.1/libgcc/config.host 2014-10-29 16:02:57.789000000 +0300
@@ -638,6 +638,39 @@
# FIXME - dj - t-chkstk used to be in here, need a 64-bit version of that
tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin i386/t-crtfm t-dfprules i386/t-chkstk"
;;
+i[34567]86-*-msys*)
+ extra_parts="crtbegin.o crtend.o crtfastmath.o"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
+ # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ if test x$enable_sjlj_exceptions = xyes; then
+ tmake_eh_file="i386/t-sjlj-eh"
@ -22,7 +22,7 @@ diff -Naur gcc-4.8.0-cygwin/libgcc/config.host gcc-4.8.0/libgcc/config.host
+ tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-msys i386/t-crtfm i386/t-chkstk t-dfprules"
+ ;;
+x86_64-*-msys*)
+ extra_parts="crtbegin.o crtend.o crtfastmath.o"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
+ # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ if test x$enable_sjlj_exceptions = xyes; then
+ tmake_eh_file="i386/t-sjlj-eh"
@ -41,7 +41,7 @@ diff -Naur gcc-4.8.0-cygwin/libgcc/config.host gcc-4.8.0/libgcc/config.host
i[34567]86-*-mingw*)
extra_parts="crtbegin.o crtend.o crtfastmath.o"
case ${target_thread_file} in
@@ -1164,6 +1200,7 @@
@@ -1267,6 +1300,7 @@
i[34567]86-*-gnu* | \
i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
i[34567]86-*-cygwin* | x86_64-*-cygwin* | \

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
_realname=gcc
_mingw_suff=mingw-w64-cross
pkgname=("${_mingw_suff}-${_realname}")
pkgver=4.9.1
pkgver=4.9.2
pkgrel=1
pkgdesc="Cross GCC for the MinGW-w64"
arch=('i686' 'x86_64')
@ -23,55 +23,61 @@ replaces=()
backup=()
options=('!strip' 'staticlibs' '!emptydirs' '!buildflags')
source=("ftp://gcc.gnu.org/pub/gcc/releases/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.bz2"
4.5-java-FIONREAD.patch
4.5-skiptest.patch
4.7-ada.patch
4.7-boehm-gc-cygwin.patch
4.7-execstack.patch
4.7-java-awt.patch
4.7-java-jni.patch
4.7-libffi-noinst.patch
4.7-libitm-cygwin.patch
4.8-gcc-ada-DTR.patch
4.8-java-soname.patch
4.8-libatomic-cygwin.patch
4.8-libffi-cygwin64.patch
4.8-lto-plugin-soname.patch
4.8-specs-cygwin.patch
4.8-Wimplicit-decls.patch
4.8-libstdc++export.patch
4.8-filename-output.patch
4.8-pr-57440.patch
4.9-prettify-linking-no-undefined.mingw.patch
4.9.1-PR-c-61214.patch
gcc-4.8.0-configure-msys2.patch
gcc-4.8.0-libgcc-msys2.patch
gcc-4.8.0-msys2-spec.patch)
md5sums=('fddf71348546af523353bd43d34919c1'
'741e079f5ec80aee1a552d0ec0b74575'
'24c9520471f62669b4bc0e0a939547fa'
'abfde62661674ecd867fb66cff6d3ded'
'3e56bc1fac8b3b6d0bb2af0a380622e1'
'f7cb43c6a6a54e55027e70a9b03774b2'
'01ef40c1f5b0cc4cdbc5be94008743e8'
'1887614712a7cd79f771927adf78e760'
'15da8d111f8eab15597db353537aefd3'
'da668f9ac5a280fadebc2a2cd37896e0'
'f3302086c3246e1fc45cac73deb9429d'
'6dd3e475475a14b5a767a1e42d57009b'
'9668346a30879e0d00355774e04881e5'
'2ab5cde66d656ec85713ef4dcb470a74'
'711c3e3bfad64560808efcef37a43a5e'
'92b4c654a7951e1026d103bd5c0ddcca'
'eb1c05fc48755cdf685d871ae49b1eef'
'f6b5fb08ff06a7d60ee3280e14240bb2'
'40cb437805e2f7a006aa0d0c3098ab0f'
'347336d5a318e5e8b3cde29e9174413c'
001-4.7-ada.patch
005-4.7-boehm-gc-cygwin.patch
010-4.7-execstack.patch
015-4.7-java-awt.patch
016-4.5-java-FIONREAD.patch
017-4.7-java-jni.patch
018-4.8-java-soname.patch
025-4.8-libatomic-cygwin.patch
030-4.7-libffi-noinst.patch
031-4.8-libffi-cygwin64.patch
035-4.7-libitm-cygwin.patch
040-4.8-lto-plugin-soname.patch
045-4.8-specs-cygwin.patch
046-4.8-__cxa_atexit.patch
047-4.8-libstdc-atexit_thread.patch
048-4.8-medium-model-dllimport.patch
050-4.5-skiptest.patch
055-4.8-gcc-ada-DTR.patch
060-4.8-Wimplicit-decls.patch
065-4.9-prettify-linking-no-undefined.mingw.patch
070-4.8-filename-output.patch
075-4.8-pr-57440.patch
080-4.8-libstdc++export.patch
950-4.8.0-configure-msys2.patch
951-4.8.0-msys2-spec.patch
952-4.8.0-libgcc-msys2.patch
953-4.9.1-testsuite-msys2.patch)
md5sums=('4df8ee253b7f3863ad0b86359cd39c43'
'62c46773400b16f693d7b89f43c00433'
'170b28d7f480eec4b4721d503d96eab0'
'b3700e51b0365894ce5520e8f5bbeeb7'
'10ef60468b9718c59040db592b8419ed'
'336af37d59e0e468e5c2cac96b476870'
'b1e8f894e9091a7f43f84bc2b78ecdf8'
'5e9a26f08a755ede27420207c79addac'
'0b3ec52ce6c02d493eeb1a51786383e9'
'd9ea16697abfb3a8903f75e056939855'
'43dfb4455539fc60721724ba6e1349af'
'dc4ecfa1b1caa272c845d55360cdffe3'
'a42858255e308a6922d5e8d36f5b3c06'
'3506054ca98d8a21fd36605b0b863533'
'07be14230e64a003d9095658df7e4c91'
'3ce9a2de6fae8be2ed1d477783f18056'
'92f89009064abb5e98e59bb44de252df'
'c52b3fd6949751f4dc43f10d6f5ec751'
'5ac0fc6a780aee8583b89d7225a85f34'
'ee07cb9166090f95c0f810de0667ea3d'
'09bdad41515c8d353612f30c91b3bac2'
'7b7021f61fbe883962458255cf2d4fea'
'0cad08f12b27fab33264de04bb3a58b1'
'8939d9e1a18a1181bbb95da8efb8e98f'
'0d85279666763cbc20b5aa15219f195a')
'b05b64cd00dda6b14d22a98c68f7eefe'
'347336d5a318e5e8b3cde29e9174413c'
'f6b5fb08ff06a7d60ee3280e14240bb2'
'6c1e48e2723cf1df7f9c826722fda193'
'd27c17a4c6b9caadc281a4f8e204b2eb'
'7df48a22637ae227ed91fec7d43667fd'
'a0132606c8f1f2644281a208b3e69a0f')
_threads="win32"
_targets="i686-w64-mingw32 x86_64-w64-mingw32"
@ -84,37 +90,45 @@ prepare() {
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
#sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
# Cygwin patches
patch -p2 -i ${srcdir}/4.7-ada.patch
patch -p2 -i ${srcdir}/4.7-boehm-gc-cygwin.patch
patch -p2 -i ${srcdir}/4.7-execstack.patch
patch -p2 -i ${srcdir}/4.7-java-awt.patch
patch -p2 -i ${srcdir}/4.5-java-FIONREAD.patch
patch -p2 -i ${srcdir}/4.7-java-jni.patch
patch -p0 -i ${srcdir}/4.8-java-soname.patch
patch -p2 -i ${srcdir}/4.8-libatomic-cygwin.patch
patch -p2 -i ${srcdir}/4.7-libffi-noinst.patch
patch -p2 -i ${srcdir}/4.8-libffi-cygwin64.patch
patch -p2 -i ${srcdir}/4.7-libitm-cygwin.patch
patch -p2 -i ${srcdir}/4.8-lto-plugin-soname.patch
patch -p0 -i ${srcdir}/4.8-specs-cygwin.patch
patch -p2 -i ${srcdir}/4.5-skiptest.patch
patch -p2 -i ${srcdir}/4.8-Wimplicit-decls.patch
#Cygwin patches
# Upstream patches
patch -p1 -i ${srcdir}/4.9.1-PR-c-61214.patch
patch -p1 -i ${srcdir}/001-4.7-ada.patch
patch -p1 -i ${srcdir}/005-4.7-boehm-gc-cygwin.patch
patch -p1 -i ${srcdir}/010-4.7-execstack.patch
patch -p1 -i ${srcdir}/015-4.7-java-awt.patch
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35536
patch -p1 -i ${srcdir}/016-4.5-java-FIONREAD.patch
patch -p1 -i ${srcdir}/017-4.7-java-jni.patch
patch -p1 -i ${srcdir}/018-4.8-java-soname.patch
patch -p1 -i ${srcdir}/025-4.8-libatomic-cygwin.patch
patch -p1 -i ${srcdir}/030-4.7-libffi-noinst.patch
patch -p1 -i ${srcdir}/031-4.8-libffi-cygwin64.patch
patch -p1 -i ${srcdir}/035-4.7-libitm-cygwin.patch
patch -p1 -i ${srcdir}/040-4.8-lto-plugin-soname.patch
patch -p1 -i ${srcdir}/045-4.8-specs-cygwin.patch
patch -p1 -i ${srcdir}/046-4.8-__cxa_atexit.patch
patch -p1 -i ${srcdir}/047-4.8-libstdc-atexit_thread.patch
patch -p1 -i ${srcdir}/048-4.8-medium-model-dllimport.patch
patch -p1 -i ${srcdir}/050-4.5-skiptest.patch
if [ "$CARCH" = "i686" ]
then
patch -p1 -i ${srcdir}/055-4.8-gcc-ada-DTR.patch
fi
patch -p1 -i ${srcdir}/060-4.8-Wimplicit-decls.patch
#MSYS2 Patches
patch -p1 -i ${srcdir}/gcc-4.8.0-configure-msys2.patch
patch -p1 -i ${srcdir}/gcc-4.8.0-msys2-spec.patch
patch -p1 -i ${srcdir}/gcc-4.8.0-libgcc-msys2.patch
# Misc patches
patch -p0 -i ${srcdir}/4.8-filename-output.patch
patch -p1 -i ${srcdir}/4.8-libstdc++export.patch
patch -p1 -i ${srcdir}/4.9-prettify-linking-no-undefined.mingw.patch
patch -p1 -i ${srcdir}/4.8-pr-57440.patch
patch -p1 -i ${srcdir}/065-4.9-prettify-linking-no-undefined.mingw.patch
patch -p1 -i ${srcdir}/070-4.8-filename-output.patch
patch -p1 -i ${srcdir}/075-4.8-pr-57440.patch
patch -p1 -i ${srcdir}/080-4.8-libstdc++export.patch
#MSYS2 Patches
patch -p1 -i ${srcdir}/950-4.8.0-configure-msys2.patch
patch -p1 -i ${srcdir}/951-4.8.0-msys2-spec.patch
patch -p1 -i ${srcdir}/952-4.8.0-libgcc-msys2.patch
patch -p1 -i ${srcdir}/953-4.9.1-testsuite-msys2.patch
}
build() {