From d644e5ee8ad9b5e752d91bab1fecd01d4c68207a Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 19 Jan 2014 22:56:05 -0600 Subject: cygwin-gcc 4.8.2 --- cygwin-gcc.spec | 71 +++-- gcc45-cross-libstdc.patch | 22 -- gcc46-textdomain.patch | 37 +++ gcc47-ada.patch | 76 +++-- gcc47-execstack.patch | 6 +- gcc47-libstdc-cygwin.patch | 34 +++ gcc47-libstdc.patch | 671 ------------------------------------------ gcc47-misc-core.patch | 27 -- gcc47-specs.patch | 87 ------ gcc48-Wimplicit-decls.patch | 41 +++ gcc48-java-soname.patch | 7 + gcc48-libatomic-cygwin.patch | 118 ++++++++ gcc48-libgcc-references.patch | 45 +++ gcc48-specs-cygwin.patch | 92 ++++++ sources | 2 +- 15 files changed, 469 insertions(+), 867 deletions(-) delete mode 100644 gcc45-cross-libstdc.patch create mode 100644 gcc46-textdomain.patch create mode 100644 gcc47-libstdc-cygwin.patch delete mode 100644 gcc47-libstdc.patch delete mode 100644 gcc47-misc-core.patch delete mode 100644 gcc47-specs.patch create mode 100644 gcc48-Wimplicit-decls.patch create mode 100644 gcc48-java-soname.patch create mode 100644 gcc48-libatomic-cygwin.patch create mode 100644 gcc48-libgcc-references.patch create mode 100644 gcc48-specs-cygwin.patch diff --git a/cygwin-gcc.spec b/cygwin-gcc.spec index 7133998..2bc8d19 100644 --- a/cygwin-gcc.spec +++ b/cygwin-gcc.spec @@ -1,15 +1,17 @@ +# when changing gcc_minor, also change the soversion of cyggcj-*.dll etc. +# and the name of libgcj-*.pc %global gcc_major 4 -%global gcc_minor 7 -%global gcc_micro 3 +%global gcc_minor 8 +%global gcc_micro 2 %global gcc_branch %{gcc_major}.%{gcc_minor} %global gcc_version %{gcc_major}.%{gcc_minor}.%{gcc_micro} # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. %global gcc_release 1 -%global build_ada 0 +%global build_ada 1 # building cross-gnat requires matching X.Y version of native gnat -%if 0%{?fedora} >= 17 && 0%{?fedora} < 19 +%if 0%{?fedora} >= 19 && 0%{?fedora} < 22 || 0%{?rhel} == 7 %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha %global build_ada 1 %endif @@ -37,12 +39,13 @@ BuildRequires: cygwin32-w32api-runtime BuildRequires: gmp-devel BuildRequires: mpfr-devel BuildRequires: libmpc-devel -%if 0%{?fedora} >= 15 || 0%{?rhel} == 7 -BuildRequires: ppl-devel >= 0.11 -BuildRequires: cloog-ppl-devel >= 0.15 +%if 0 +BuildRequires: isl-devel = 0.11.1 +BuildRequires: cloog-isl-devel = 0.18.0 %endif BuildRequires: zlib-devel BuildRequires: flex +BuildRequires: gettext %if %{build_ada} BuildRequires: gcc-gnat %endif @@ -54,19 +57,23 @@ BuildRequires: gcc-java %endif Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2 +Patch0: gcc46-textdomain.patch Patch1: gcc47-ada.patch Patch3: gcc47-libffi-noinst.patch -Patch4: gcc47-libstdc.patch +Patch4: gcc47-libstdc-cygwin.patch Patch7: gcc47-cross-jardir.patch -Patch8: gcc45-cross-libstdc.patch Patch9: gcc47-cross-ecjx.patch Patch10: gcc45-java-FIONREAD.diff Patch13: gcc45-cross-exe-suffix.diff Patch14: gcc47-boehm-gc-cygwin.patch Patch15: gcc47-execstack.patch Patch16: gcc47-java-jni.patch -Patch17: gcc47-specs.patch +Patch17: gcc48-specs-cygwin.patch Patch19: gcc48-lto-plugin-soname.patch +Patch20: gcc48-java-soname.patch +Patch21: gcc48-libatomic-cygwin.patch +Patch22: gcc48-libgcc-references.patch +Patch23: gcc48-Wimplicit-decls.patch %description @@ -84,6 +91,7 @@ Requires: cygwin32-w32api-runtime Requires: cygwin32-cpp # We don't run the automatic dependency scripts which would # normally detect and provide the following DLL: +Provides: cygwin32(cygatomic-1.dll) Provides: cygwin32(cyggcc_s-1.dll) Provides: cygwin32(cyggomp-1.dll) Provides: cygwin32(cygquadmath-0.dll) @@ -195,10 +203,10 @@ Requires: cygwin32-libiconv Requires: cygwin32-zlib # We don't run the automatic dependency scripts which would # normally detect and provide the following DLL: -Provides: cygwin32(cyggcj-13.dll) -Provides: cygwin32(cyggcj-noncore-13.dll) -Provides: cygwin32(cyggcj-tools-13.dll) -Provides: cygwin32(cyggij-13.dll) +Provides: cygwin32(cyggcj-14.dll) +Provides: cygwin32(cyggcj-noncore-14.dll) +Provides: cygwin32(cyggcj-tools-14.dll) +Provides: cygwin32(cyggij-14.dll) Provides: cygwin32(cygjvm.dll) Provides: %{name}-java = %{version}-%{release} Obsoletes: %{name}-java < 4.7 @@ -209,19 +217,23 @@ Cygwin cross-compiler for Java. %prep %setup -q -n gcc-%{gcc_version} +%patch0 -p2 %patch1 -p2 %patch3 -p2 %patch4 -p2 %patch7 -p2 -%patch8 -p1 %patch9 -p1 %patch10 -p2 %patch13 -p1 %patch14 -p2 %patch15 -p2 %patch16 -p2 -%patch17 -p2 +%patch17 -p0 %patch19 -p2 +%patch20 -p0 +%patch21 -p2 +%patch22 -p0 +%patch23 -p2 echo %{gcc_version} > gcc/BASE-VER echo 'Fedora Cygwin %{gcc_version}-%{gcc_release}' > gcc/DEV-PHASE @@ -254,7 +266,7 @@ CC="%{__cc} ${RPM_OPT_FLAGS}" \ --disable-multilib \ --with-system-zlib \ --enable-shared --enable-shared-libgcc --enable-static \ - --disable-nls --without-included-gettext \ + --without-included-gettext \ --disable-win32-registry \ --enable-threads=posix \ --enable-version-specific-runtime-libs \ @@ -346,12 +358,15 @@ find $RPM_BUILD_ROOT -name '*.la' -delete popd +%find_lang cygwin32-gcc +%find_lang cygwin32-cpplib + %clean rm -rf $RPM_BUILD_ROOT -%files -n cygwin32-gcc +%files -n cygwin32-gcc -f cygwin32-gcc.lang %{_bindir}/%{cygwin32_target}-gcc %{_bindir}/%{cygwin32_target}-gcc-%{version} %{_bindir}/%{cygwin32_target}-gcc-ar @@ -363,6 +378,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/gcc/%{cygwin32_target}/%{version}/crtbegin.o %{_libdir}/gcc/%{cygwin32_target}/%{version}/crtend.o %{_libdir}/gcc/%{cygwin32_target}/%{version}/crtfastmath.o +%{_libdir}/gcc/%{cygwin32_target}/%{version}/libatomic.a +%{_libdir}/gcc/%{cygwin32_target}/%{version}/libatomic.dll.a %{_libdir}/gcc/%{cygwin32_target}/%{version}/libgcc.a %{_libdir}/gcc/%{cygwin32_target}/%{version}/libgcc_eh.a %{_libdir}/gcc/%{cygwin32_target}/%{version}/libgcc_s.dll.a @@ -391,6 +408,7 @@ rm -rf $RPM_BUILD_ROOT %{_libexecdir}/gcc/%{cygwin32_target}/%{version}/plugin/ %dir %{_datadir}/gcc-%{gcc_version} %dir %{_datadir}/gcc-%{gcc_version}/%{cygwin32_target} +%{cygwin32_bindir}/cygatomic-1.dll %{cygwin32_bindir}/cyggcc_s-1.dll %{cygwin32_bindir}/cyggomp-1.dll %{cygwin32_bindir}/cygquadmath-0.dll @@ -400,7 +418,7 @@ rm -rf $RPM_BUILD_ROOT %doc gcc/README* gcc/COPYING* -%files -n cygwin32-cpp +%files -n cygwin32-cpp -f cygwin32-cpplib.lang /lib/%{cygwin32_target}-cpp %{_bindir}/%{cygwin32_target}-cpp %{_mandir}/man1/%{cygwin32_target}-cpp.1* @@ -495,17 +513,22 @@ rm -rf $RPM_BUILD_ROOT %{_libexecdir}/gcc/%{cygwin32_target}/%{version}/ecj1 %{_libexecdir}/gcc/%{cygwin32_target}/%{version}/jc1 %{_libexecdir}/gcc/%{cygwin32_target}/%{version}/jvgenmain -%{cygwin32_bindir}/cyggcj-13.dll -%{cygwin32_bindir}/cyggcj-noncore-13.dll -%{cygwin32_bindir}/cyggcj-tools-13.dll -%{cygwin32_bindir}/cyggij-13.dll +%{cygwin32_bindir}/cyggcj-14.dll +%{cygwin32_bindir}/cyggcj-noncore-14.dll +%{cygwin32_bindir}/cyggcj-tools-14.dll +%{cygwin32_bindir}/cyggij-14.dll %{cygwin32_bindir}/cygjvm.dll -%{cygwin32_libdir}/pkgconfig/libgcj-4.7.pc +%{cygwin32_libdir}/pkgconfig/libgcj-4.8.pc %{_datadir}/gcc-%{gcc_version}/%{cygwin32_target}/java %endif %changelog +* Sun Jan 19 2014 Yaakov Selkowitz - 4.8.2-1 +- Version bump. +- Enable Ada on systems with native gcc-gnat-4.8.x. +- Enable NLS without colliding with native gcc. + * Thu Jun 27 2013 Yaakov Selkowitz - 4.7.3-1 - Version bump. - Update for new Cygwin packaging scheme. diff --git a/gcc45-cross-libstdc.patch b/gcc45-cross-libstdc.patch deleted file mode 100644 index 1b57748..0000000 --- a/gcc45-cross-libstdc.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/libstdc++-v3/configure 2011-02-15 19:21:13.116765002 -0600 -+++ b/libstdc++-v3/configure 2011-02-15 19:38:24.217766630 -0600 -@@ -44576,7 +44576,7 @@ - ;; - esac - ;; -- *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) -+ *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*) - - # All these tests are for C++; save the language and the compiler flags. - # The CXXFLAGS thing is suspicious, but based on similar bits previously ---- a/libstdc++-v3/crossconfig.m4 2011-02-15 19:21:04.613764980 -0600 -+++ b/libstdc++-v3/crossconfig.m4 2011-02-15 19:37:43.586763549 -0600 -@@ -141,7 +141,7 @@ - ;; - esac - ;; -- *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) -+ *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*) - GLIBCXX_CHECK_COMPILER_FEATURES - GLIBCXX_CHECK_LINKER_FEATURES - GLIBCXX_CHECK_MATH_SUPPORT diff --git a/gcc46-textdomain.patch b/gcc46-textdomain.patch new file mode 100644 index 0000000..16dc8f1 --- /dev/null +++ b/gcc46-textdomain.patch @@ -0,0 +1,37 @@ +--- origsrc/gcc-4.6.3/gcc/Makefile.in 2011-08-20 02:51:09.000000000 -0500 ++++ src/gcc-4.6.3/gcc/Makefile.in 2013-11-15 01:21:11.915416300 -0600 +@@ -5175,8 +5175,8 @@ install-po: + dir=$(localedir)/$$lang/LC_MESSAGES; \ + echo $(mkinstalldirs) $(DESTDIR)$$dir; \ + $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \ +- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ +- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ ++ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/cygwin32-gcc.mo; \ ++ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/cygwin32-gcc.mo; \ + done + + # Rule for regenerating the message template (gcc.pot). +--- origsrc/gcc-4.6.3/gcc/intl.c 2010-12-01 11:29:12.000000000 -0600 ++++ src/gcc-4.6.3/gcc/intl.c 2013-11-15 01:21:29.446419000 -0600 +@@ -56,8 +56,8 @@ gcc_init_libintl (void) + setlocale (LC_ALL, ""); + #endif + +- (void) bindtextdomain ("gcc", LOCALEDIR); +- (void) textdomain ("gcc"); ++ (void) bindtextdomain ("cygwin32-gcc", LOCALEDIR); ++ (void) textdomain ("cygwin32-gcc"); + + /* Opening quotation mark. */ + open_quote = _("`"); +--- origsrc/gcc-4.6.3/libcpp/configure 2012-03-01 06:03:46.000000000 -0600 ++++ src/gcc-4.6.3/libcpp/configure 2013-11-15 01:21:54.401846400 -0600 +@@ -7042,7 +7042,7 @@ _ACEOF + + + # More defines and substitutions. +-PACKAGE="$PACKAGE_TARNAME" ++PACKAGE="cygwin32-cpplib" + + cat >>confdefs.h <<_ACEOF + #define PACKAGE "$PACKAGE" diff --git a/gcc47-ada.patch b/gcc47-ada.patch index ad67a4a..419636f 100644 --- a/gcc47-ada.patch +++ b/gcc47-ada.patch @@ -1,5 +1,5 @@ ---- 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 +--- 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 @@ -0,0 +1,170 @@ +------------------------------------------------------------------------------ +-- -- @@ -171,8 +171,8 @@ + 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 +--- 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 = # Type of tools build we are doing; default is not compiling tools. TOOLSCASE = @@ -188,8 +188,8 @@ MULTISUBDIR = RTSDIR = rts$(subst /,_,$(MULTISUBDIR)) @@ -1583,6 +1590,12 @@ ifeq ($(strip $(filter-out avr none powe - endif + # Cygwin/Mingw32 ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),) + # Set target pair suffix for mingw or cygwin + W32_TARG=mingw @@ -342,20 +342,19 @@ 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,8 @@ +--- 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 @@ #endif #if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || \ -- defined (__osf__) || defined (_WIN32) || defined (__APPLE__) -+ defined (__osf__) || defined (_WIN32) || defined (__APPLE__) || \ -+ defined (__CYGWIN__) +- defined (_WIN32) || defined (__APPLE__) ++ 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__) || \ +--- 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 @@ -0,0 +1,67 @@ +------------------------------------------------------------------------------ +-- -- @@ -424,8 +423,8 @@ + 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 +--- 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 __main (); } @@ -467,8 +466,8 @@ #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 +--- 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 @@ -0,0 +1,162 @@ +------------------------------------------------------------------------------ +-- -- @@ -632,8 +631,8 @@ + 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 +--- 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 @@ -0,0 +1,107 @@ +------------------------------------------------------------------------------ +-- -- @@ -742,8 +741,25 @@ + 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 +--- origsrc/gcc-4.8.2/gcc/ada/s-oscons-tmplt.c (revision 202887) ++++ src/gcc-4.8.2/gcc/ada/s-oscons-tmplt.c (working copy) +@@ -973,7 +973,12 @@ + + #endif /* HAVE_TERMIOS */ + +-#ifdef __MINGW32__ ++#ifdef __CYGWIN__ ++#define RTS_CONTROL_ENABLE 0x1 ++#define DTR_CONTROL_ENABLE 0x1 ++#endif ++ ++#if defined (__CYGWIN__) || defined (__MINGW32__) + CNU(DTR_CONTROL_ENABLE, "Enable DTR flow ctrl") + CNU(RTS_CONTROL_ENABLE, "Enable RTS flow ctrl") + #endif + +--- 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 @@ -0,0 +1,951 @@ +------------------------------------------------------------------------------ +-- -- @@ -1696,8 +1712,8 @@ + 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 +--- 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 @@ -0,0 +1,1337 @@ +------------------------------------------------------------------------------ +-- -- @@ -3036,12 +3052,12 @@ + 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 +--- 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, + int waiting) { - #if defined (linux) || defined (sun) || defined (sgi) \ - || (defined (__osf__) && ! defined (__alpha_vxworks)) \ + #if defined (linux) || defined (sun) \ - || defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \ + || defined (__CYGWIN__) || defined (__MACHTEN__) || defined (__hpux__) \ || defined (_AIX) || (defined (__svr4__) && defined (i386)) \ @@ -3066,8 +3082,8 @@ #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 +--- 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 @@ -0,0 +1,198 @@ +------------------------------------------------------------------------------ +-- -- diff --git a/gcc47-execstack.patch b/gcc47-execstack.patch index abfe828..8a2b36e 100644 --- a/gcc47-execstack.patch +++ b/gcc47-execstack.patch @@ -13,7 +13,7 @@ --- 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,11 @@ along with GCC; see the file COPYING3. +@@ -140,3 +140,7 @@ along with GCC; see the file COPYING3. /* We should find a way to not have to update this manually. */ #define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-13.dll" @@ -21,10 +21,6 @@ +#define HAVE_ENABLE_EXECUTE_STACK +#undef CHECK_EXECUTE_STACK_ENABLED +#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable -+ -+#ifdef IN_LIBGCC2 -+#include -+#endif --- 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 --git a/gcc47-libstdc-cygwin.patch b/gcc47-libstdc-cygwin.patch new file mode 100644 index 0000000..18d8de6 --- /dev/null +++ b/gcc47-libstdc-cygwin.patch @@ -0,0 +1,34 @@ +--- origsrc/gcc-4.8-20130310/libstdc++-v3/configure 2013-03-15 02:47:51.930826600 -0500 ++++ src/gcc-4.8-20130310/libstdc++-v3/configure 2013-03-17 00:43:35.146679400 -0500 +@@ -46017,7 +46017,7 @@ $as_echo "#define HAVE_TLS 1" >>confdefs + ;; + esac + ;; +- *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) ++ *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*) + + # All these tests are for C++; save the language and the compiler flags. + # The CXXFLAGS thing is suspicious, but based on similar bits previously +--- origsrc/gcc-4.8-20130310/libstdc++-v3/crossconfig.m4 2013-03-15 02:47:51.723814700 -0500 ++++ src/gcc-4.8-20130310/libstdc++-v3/crossconfig.m4 2013-03-17 00:40:59.084753200 -0500 +@@ -141,7 +141,7 @@ case "${host}" in + ;; + esac + ;; +- *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) ++ *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*) + GLIBCXX_CHECK_COMPILER_FEATURES + GLIBCXX_CHECK_LINKER_FEATURES + GLIBCXX_CHECK_MATH_SUPPORT +--- origsrc/gcc-4.7.2/libstdc++-v3/testsuite/lib/libstdc++.exp 2012-08-06 22:34:27.000000000 +0800 ++++ src/gcc-4.7.2/libstdc++-v3/testsuite/lib/libstdc++.exp 2013-02-26 19:31:07.934763700 +0800 +@@ -146,6 +146,9 @@ proc libstdc++_init { testfile } { + set gccdir [file dirname $gccdir] + append ld_library_path_tmp ":${gccdir}" + } ++ if { [string match "*-*-cygwin*" $target_triplet] } { ++ append ld_library_path_tmp ":${blddir}/../libgcc" ++ } + v3track gccdir 3 + + # Locate libgomp. This is only required for parallel mode. diff --git a/gcc47-libstdc.patch b/gcc47-libstdc.patch deleted file mode 100644 index 45ff50e..0000000 --- a/gcc47-libstdc.patch +++ /dev/null @@ -1,671 +0,0 @@ ---- origsrc/gcc-4.7.2/libstdc++-v3/config/os/mingw32/os_defines.h 2011-12-16 18:43:06.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/config/os/mingw32/os_defines.h 2012-10-31 16:49:35.703125000 +0000 -@@ -72,4 +72,10 @@ - #define _GLIBCXX_CDTOR_CALLABI __thiscall - #endif - -+#ifdef _DLL -+#define _GLIBCXX_IMPORT __attribute__((dllimport)) -+#else -+#define _GLIBCXX_IMPORT -+#endif -+ - #endif ---- origsrc/gcc-4.7.2/libstdc++-v3/config/os/newlib/os_defines.h 2011-01-03 20:52:22.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/config/os/newlib/os_defines.h 2012-10-31 16:49:35.734375000 +0000 -@@ -35,6 +35,8 @@ - - #ifdef __CYGWIN__ - #define _GLIBCXX_GTHREAD_USE_WEAK 0 -+#define __GXX_MERGED_TYPEINFO_NAMES 0 -+#define __GXX_TYPEINFO_EQUALITY_INLINE 0 - - #if defined (_GLIBCXX_DLL) - #define _GLIBCXX_PSEUDO_VISIBILITY_default __attribute__ ((__dllimport__)) -@@ -47,6 +49,13 @@ - - // See libstdc++/20806. - #define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1 -+ -+#ifdef _DLL -+#define _GLIBCXX_IMPORT __attribute__((dllimport)) -+#else -+#define _GLIBCXX_IMPORT -+#endif -+ - #endif - - #endif ---- origsrc/gcc-4.7.2/libstdc++-v3/include/backward/strstream 2011-02-01 01:31:42.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/backward/strstream 2012-10-31 16:49:37.468750000 +0000 -@@ -62,7 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - // Class strstreambuf, a streambuf class that manages an array of char. - // Note that this class is not a template. -- class strstreambuf : public basic_streambuf > -+ class _GLIBCXX_IMPORT strstreambuf : public basic_streambuf > - { - public: - // Types. -@@ -124,7 +124,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - }; - - // Class istrstream, an istream that manages a strstreambuf. -- class istrstream : public basic_istream -+ class _GLIBCXX_IMPORT istrstream : public basic_istream - { - public: - explicit istrstream(char*); -@@ -141,7 +141,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - }; - - // Class ostrstream -- class ostrstream : public basic_ostream -+ class _GLIBCXX_IMPORT ostrstream : public basic_ostream - { - public: - ostrstream(); -@@ -158,7 +158,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - }; - - // Class strstream -- class strstream : public basic_iostream -+ class _GLIBCXX_IMPORT strstream : public basic_iostream - { - public: - typedef char char_type; ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/basic_ios.tcc 2011-03-04 21:51:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/basic_ios.tcc 2012-10-31 16:49:37.468750000 +0000 -@@ -176,10 +176,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class basic_ios; -+ extern template class _GLIBCXX_IMPORT basic_ios; - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class basic_ios; -+ extern template class _GLIBCXX_IMPORT basic_ios; - #endif - #endif - ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/c++config 2011-11-02 04:23:33.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/c++config 2012-10-31 16:54:57.125000000 +0000 -@@ -225,6 +225,9 @@ namespace __gnu_cxx - # define _GLIBCXX_END_NAMESPACE_VERSION - #endif - -+#ifndef _GLIBCXX_IMPORT -+#define _GLIBCXX_IMPORT -+#endif - - // Inline namespaces for special modes: debug, parallel, profile. - #if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \ ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/codecvt.h 2011-10-14 01:12:40.000000000 +0100 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/codecvt.h 2012-10-31 16:49:37.484375000 +0000 -@@ -479,7 +479,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class codecvt_byname; -+ extern template class _GLIBCXX_IMPORT codecvt_byname; - - extern template - const codecvt& -@@ -490,7 +490,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - has_facet >(const locale&); - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class codecvt_byname; -+ extern template class _GLIBCXX_IMPORT codecvt_byname; - - extern template - const codecvt& ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/fstream.tcc 2011-03-04 21:51:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/fstream.tcc 2012-10-31 16:49:37.484375000 +0000 -@@ -965,16 +965,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class basic_filebuf; -- extern template class basic_ifstream; -- extern template class basic_ofstream; -- extern template class basic_fstream; -+ extern template class _GLIBCXX_IMPORT basic_filebuf; -+ extern template class _GLIBCXX_IMPORT basic_ifstream; -+ extern template class _GLIBCXX_IMPORT basic_ofstream; -+ extern template class _GLIBCXX_IMPORT basic_fstream; - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class basic_filebuf; -- extern template class basic_ifstream; -- extern template class basic_ofstream; -- extern template class basic_fstream; -+ extern template class _GLIBCXX_IMPORT basic_filebuf; -+ extern template class _GLIBCXX_IMPORT basic_ifstream; -+ extern template class _GLIBCXX_IMPORT basic_ofstream; -+ extern template class _GLIBCXX_IMPORT basic_fstream; - #endif - #endif - ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/ios_base.h 2011-08-07 08:27:06.000000000 +0100 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/ios_base.h 2012-10-31 16:49:37.484375000 +0000 -@@ -198,7 +198,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * people will only see @c ios_base when they need to specify the full - * name of the various I/O flags (e.g., the openmodes). - */ -- class ios_base -+ class _GLIBCXX_IMPORT ios_base - { - public: - -@@ -208,7 +208,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * - * 27.4.2.1.1 Class ios_base::failure - */ -- class failure : public exception -+ class _GLIBCXX_IMPORT failure : public exception - { - public: - // _GLIBCXX_RESOLVE_LIB_DEFECTS -@@ -532,7 +532,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Used to initialize standard streams. In theory, g++ could use - // -finit-priority to order this stuff correctly without going - // through these machinations. -- class Init -+ class _GLIBCXX_IMPORT Init - { - friend class ios_base; - public: ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/istream.tcc 2011-03-04 21:51:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/istream.tcc 2012-10-31 16:49:37.484375000 +0000 -@@ -1039,7 +1039,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class basic_istream; -+ extern template class _GLIBCXX_IMPORT basic_istream; - extern template istream& ws(istream&); - extern template istream& operator>>(istream&, char&); - extern template istream& operator>>(istream&, char*); -@@ -1062,10 +1062,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - extern template istream& istream::_M_extract(long double&); - extern template istream& istream::_M_extract(void*&); - -- extern template class basic_iostream; -+ extern template class _GLIBCXX_IMPORT basic_iostream; - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class basic_istream; -+ extern template class _GLIBCXX_IMPORT basic_istream; - extern template wistream& ws(wistream&); - extern template wistream& operator>>(wistream&, wchar_t&); - extern template wistream& operator>>(wistream&, wchar_t*); -@@ -1084,7 +1084,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - extern template wistream& wistream::_M_extract(long double&); - extern template wistream& wistream::_M_extract(void*&); - -- extern template class basic_iostream; -+ extern template class _GLIBCXX_IMPORT basic_iostream; - #endif - #endif - ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/locale_classes.h 2011-12-10 15:33:06.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/locale_classes.h 2012-10-31 16:49:37.484375000 +0000 -@@ -61,7 +61,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * This library supports efficient construction and copying of locales - * through a reference counting implementation of the locale class. - */ -- class locale -+ class _GLIBCXX_IMPORT locale - { - public: - // Types: -@@ -69,9 +69,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - typedef int category; - - // Forward decls and friends: -- class facet; -- class id; -- class _Impl; -+ class _GLIBCXX_IMPORT facet; -+ class _GLIBCXX_IMPORT id; -+ class _GLIBCXX_IMPORT _Impl; - - friend class facet; - friend class _Impl; -@@ -337,7 +337,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * - * Facets may not be copied or assigned. - */ -- class locale::facet -+ class _GLIBCXX_IMPORT locale::facet - { - private: - friend class locale; -@@ -435,7 +435,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * cannot be used in a locale. The locale::id ensures that each class - * type gets a unique identifier. - */ -- class locale::id -+ class _GLIBCXX_IMPORT locale::id - { - private: - friend class locale; -@@ -474,7 +474,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - - // Implementation object for locale. -- class locale::_Impl -+ class _GLIBCXX_IMPORT locale::_Impl - { - public: - // Friends. ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/locale_classes.tcc 2011-12-10 15:33:06.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/locale_classes.tcc 2012-10-31 16:49:37.500000000 +0000 -@@ -265,8 +265,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class collate; -- extern template class collate_byname; -+ extern template class _GLIBCXX_IMPORT collate; -+ extern template class _GLIBCXX_IMPORT collate_byname; - - extern template - const collate& -@@ -277,8 +277,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - has_facet >(const locale&); - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class collate; -- extern template class collate_byname; -+ extern template class _GLIBCXX_IMPORT collate; -+ extern template class _GLIBCXX_IMPORT collate_byname; - - extern template - const collate& ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/locale_facets.h 2012-02-23 22:14:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/locale_facets.h 2012-10-31 16:49:37.500000000 +0000 -@@ -673,7 +673,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * optimizations as well. - */ - template<> -- class ctype : public locale::facet, public ctype_base -+ class _GLIBCXX_IMPORT ctype : public locale::facet, public ctype_base - { - public: - // Types: -@@ -1174,7 +1174,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * __ctype_abstract_base. - */ - template<> -- class ctype : public __ctype_abstract_base -+ class _GLIBCXX_IMPORT ctype : public __ctype_abstract_base - { - public: - // Types: ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/locale_facets.tcc 2011-03-04 21:51:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/locale_facets.tcc 2012-10-31 17:00:42.531250000 +0000 -@@ -1277,11 +1277,11 @@ _GLIBCXX_END_NAMESPACE_LDBL - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class numpunct; -- extern template class numpunct_byname; -- extern template class _GLIBCXX_NAMESPACE_LDBL num_get; -- extern template class _GLIBCXX_NAMESPACE_LDBL num_put; -- extern template class ctype_byname; -+ extern template class _GLIBCXX_IMPORT numpunct; -+ extern template class _GLIBCXX_IMPORT numpunct_byname; -+ extern template class _GLIBCXX_IMPORT _GLIBCXX_NAMESPACE_LDBL num_get; -+ extern template class _GLIBCXX_IMPORT _GLIBCXX_NAMESPACE_LDBL num_put; -+ extern template class _GLIBCXX_IMPORT ctype_byname; - - extern template - const ctype& -@@ -1316,11 +1316,11 @@ _GLIBCXX_END_NAMESPACE_LDBL - has_facet >(const locale&); - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class numpunct; -- extern template class numpunct_byname; -- extern template class _GLIBCXX_NAMESPACE_LDBL num_get; -- extern template class _GLIBCXX_NAMESPACE_LDBL num_put; -- extern template class ctype_byname; -+ extern template class _GLIBCXX_IMPORT numpunct; -+ extern template class _GLIBCXX_IMPORT numpunct_byname; -+ extern template class _GLIBCXX_IMPORT _GLIBCXX_NAMESPACE_LDBL num_get; -+ extern template class _GLIBCXX_IMPORT _GLIBCXX_NAMESPACE_LDBL num_put; -+ extern template class _GLIBCXX_IMPORT ctype_byname; - - extern template - const ctype& ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/locale_facets_nonio.tcc 2011-03-04 21:51:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/locale_facets_nonio.tcc 2012-10-31 17:00:42.546875000 +0000 -@@ -1216,19 +1216,19 @@ _GLIBCXX_END_NAMESPACE_LDBL - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class moneypunct; -- extern template class moneypunct; -- extern template class moneypunct_byname; -- extern template class moneypunct_byname; -- extern template class _GLIBCXX_NAMESPACE_LDBL money_get; -- extern template class _GLIBCXX_NAMESPACE_LDBL money_put; -- extern template class __timepunct; -- extern template class time_put; -- extern template class time_put_byname; -- extern template class time_get; -- extern template class time_get_byname; -- extern template class messages; -- extern template class messages_byname; -+ extern template class _GLIBCXX_IMPORT moneypunct; -+ extern template class _GLIBCXX_IMPORT moneypunct; -+ extern template class _GLIBCXX_IMPORT moneypunct_byname; -+ extern template class _GLIBCXX_IMPORT moneypunct_byname; -+ extern template class _GLIBCXX_IMPORT _GLIBCXX_NAMESPACE_LDBL money_get; -+ extern template class _GLIBCXX_IMPORT _GLIBCXX_NAMESPACE_LDBL money_put; -+ extern template class _GLIBCXX_IMPORT __timepunct; -+ extern template class _GLIBCXX_IMPORT time_put; -+ extern template class _GLIBCXX_IMPORT time_put_byname; -+ extern template class _GLIBCXX_IMPORT time_get; -+ extern template class _GLIBCXX_IMPORT time_get_byname; -+ extern template class _GLIBCXX_IMPORT messages; -+ extern template class _GLIBCXX_IMPORT messages_byname; - - extern template - const moneypunct& -@@ -1291,19 +1291,19 @@ _GLIBCXX_END_NAMESPACE_LDBL - has_facet >(const locale&); - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class moneypunct; -- extern template class moneypunct; -- extern template class moneypunct_byname; -- extern template class moneypunct_byname; -- extern template class _GLIBCXX_NAMESPACE_LDBL money_get; -- extern template class _GLIBCXX_NAMESPACE_LDBL money_put; -- extern template class __timepunct; -- extern template class time_put; -- extern template class time_put_byname; -- extern template class time_get; -- extern template class time_get_byname; -- extern template class messages; -- extern template class messages_byname; -+ extern template class _GLIBCXX_IMPORT moneypunct; -+ extern template class _GLIBCXX_IMPORT moneypunct; -+ extern template class _GLIBCXX_IMPORT moneypunct_byname; -+ extern template class _GLIBCXX_IMPORT moneypunct_byname; -+ extern template class _GLIBCXX_IMPORT _GLIBCXX_NAMESPACE_LDBL money_get; -+ extern template class _GLIBCXX_IMPORT _GLIBCXX_NAMESPACE_LDBL money_put; -+ extern template class _GLIBCXX_IMPORT __timepunct; -+ extern template class _GLIBCXX_IMPORT time_put; -+ extern template class _GLIBCXX_IMPORT time_put_byname; -+ extern template class _GLIBCXX_IMPORT time_get; -+ extern template class _GLIBCXX_IMPORT time_get_byname; -+ extern template class _GLIBCXX_IMPORT messages; -+ extern template class _GLIBCXX_IMPORT messages_byname; - - extern template - const moneypunct& ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/ostream.tcc 2011-03-04 21:51:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/ostream.tcc 2012-10-31 16:49:37.515625000 +0000 -@@ -358,7 +358,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class basic_ostream; -+ extern template class _GLIBCXX_IMPORT basic_ostream; - extern template ostream& endl(ostream&); - extern template ostream& ends(ostream&); - extern template ostream& flush(ostream&); -@@ -381,7 +381,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - extern template ostream& ostream::_M_insert(const void*); - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class basic_ostream; -+ extern template class _GLIBCXX_IMPORT basic_ostream; - extern template wostream& endl(wostream&); - extern template wostream& ends(wostream&); - extern template wostream& flush(wostream&); ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/sstream.tcc 2011-03-04 21:51:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/sstream.tcc 2012-10-31 16:49:37.515625000 +0000 -@@ -271,16 +271,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class basic_stringbuf; -- extern template class basic_istringstream; -- extern template class basic_ostringstream; -- extern template class basic_stringstream; -+ extern template class _GLIBCXX_IMPORT basic_stringbuf; -+ extern template class _GLIBCXX_IMPORT basic_istringstream; -+ extern template class _GLIBCXX_IMPORT basic_ostringstream; -+ extern template class _GLIBCXX_IMPORT basic_stringstream; - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class basic_stringbuf; -- extern template class basic_istringstream; -- extern template class basic_ostringstream; -- extern template class basic_stringstream; -+ extern template class _GLIBCXX_IMPORT basic_stringbuf; -+ extern template class _GLIBCXX_IMPORT basic_istringstream; -+ extern template class _GLIBCXX_IMPORT basic_ostringstream; -+ extern template class _GLIBCXX_IMPORT basic_stringstream; - #endif - #endif - ---- origsrc/gcc-4.7.2/libstdc++-v3/include/bits/streambuf.tcc 2011-03-04 21:51:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/bits/streambuf.tcc 2012-10-31 16:49:37.515625000 +0000 -@@ -147,7 +147,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Inhibit implicit instantiations for required instantiations, - // which are defined via explicit instantiations elsewhere. - #if _GLIBCXX_EXTERN_TEMPLATE -- extern template class basic_streambuf; -+ extern template class _GLIBCXX_IMPORT basic_streambuf; - extern template - streamsize - __copy_streambufs(basic_streambuf*, -@@ -158,7 +158,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - basic_streambuf*, bool&); - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern template class basic_streambuf; -+ extern template class _GLIBCXX_IMPORT basic_streambuf; - extern template - streamsize - __copy_streambufs(basic_streambuf*, ---- origsrc/gcc-4.7.2/libstdc++-v3/include/ext/concurrence.h 2012-07-16 23:34:13.000000000 +0100 -+++ src/gcc-4.7.2/libstdc++-v3/include/ext/concurrence.h 2012-10-31 16:49:37.515625000 +0000 -@@ -65,7 +65,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - // NB: As this is used in libsupc++, need to only depend on - // exception. No stdexception classes, no use of std::string. -- class __concurrence_lock_error : public std::exception -+ class _GLIBCXX_IMPORT __concurrence_lock_error : public std::exception - { - public: - virtual char const* -@@ -73,7 +73,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - { return "__gnu_cxx::__concurrence_lock_error"; } - }; - -- class __concurrence_unlock_error : public std::exception -+ class _GLIBCXX_IMPORT __concurrence_unlock_error : public std::exception - { - public: - virtual char const* ---- origsrc/gcc-4.7.2/libstdc++-v3/include/std/iostream 2011-01-30 22:39:36.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/std/iostream 2012-10-31 16:53:39.078125000 +0000 -@@ -58,16 +58,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * linked to above. - */ - //@{ -- extern istream cin; /// Linked to standard input -- extern ostream cout; /// Linked to standard output -- extern ostream cerr; /// Linked to standard error (unbuffered) -- extern ostream clog; /// Linked to standard error (buffered) -+ extern _GLIBCXX_IMPORT istream cin; /// Linked to standard input -+ extern _GLIBCXX_IMPORT ostream cout; /// Linked to standard output -+ extern _GLIBCXX_IMPORT ostream cerr; /// Linked to standard error (unbuffered) -+ extern _GLIBCXX_IMPORT ostream clog; /// Linked to standard error (buffered) - - #ifdef _GLIBCXX_USE_WCHAR_T -- extern wistream wcin; /// Linked to standard input -- extern wostream wcout; /// Linked to standard output -- extern wostream wcerr; /// Linked to standard error (unbuffered) -- extern wostream wclog; /// Linked to standard error (buffered) -+ extern _GLIBCXX_IMPORT wistream wcin; /// Linked to standard input -+ extern _GLIBCXX_IMPORT wostream wcout; /// Linked to standard output -+ extern _GLIBCXX_IMPORT wostream wcerr; /// Linked to standard error (unbuffered) -+ extern _GLIBCXX_IMPORT wostream wclog; /// Linked to standard error (buffered) - #endif - //@} - ---- origsrc/gcc-4.7.2/libstdc++-v3/include/std/stdexcept 2011-12-06 20:03:25.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/include/std/stdexcept 2012-10-31 17:02:54.890625000 +0000 -@@ -53,7 +53,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * program runs (e.g., violations of class invariants). - * @brief One of two subclasses of exception. - */ -- class logic_error : public exception -+ class _GLIBCXX_IMPORT logic_error : public exception - { - string _M_msg; - -@@ -72,7 +72,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - /** Thrown by the library, or by you, to report domain errors (domain in - * the mathematical sense). */ -- class domain_error : public logic_error -+ class _GLIBCXX_IMPORT domain_error : public logic_error - { - public: - explicit domain_error(const string& __arg); -@@ -80,7 +80,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - }; - - /** Thrown to report invalid arguments to functions. */ -- class invalid_argument : public logic_error -+ class _GLIBCXX_IMPORT invalid_argument : public logic_error - { - public: - explicit invalid_argument(const string& __arg); -@@ -89,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - /** Thrown when an object is constructed that would exceed its maximum - * permitted size (e.g., a basic_string instance). */ -- class length_error : public logic_error -+ class _GLIBCXX_IMPORT length_error : public logic_error - { - public: - explicit length_error(const string& __arg); -@@ -98,7 +98,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - /** This represents an argument whose value is not within the expected - * range (e.g., boundary checks in basic_string). */ -- class out_of_range : public logic_error -+ class _GLIBCXX_IMPORT out_of_range : public logic_error - { - public: - explicit out_of_range(const string& __arg); -@@ -110,7 +110,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - * the program executes. - * @brief One of two subclasses of exception. - */ -- class runtime_error : public exception -+ class _GLIBCXX_IMPORT runtime_error : public exception - { - string _M_msg; - -@@ -128,7 +128,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - }; - - /** Thrown to indicate range errors in internal computations. */ -- class range_error : public runtime_error -+ class _GLIBCXX_IMPORT range_error : public runtime_error - { - public: - explicit range_error(const string& __arg); -@@ -144,7 +144,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - }; - - /** Thrown to indicate arithmetic underflow. */ -- class underflow_error : public runtime_error -+ class _GLIBCXX_IMPORT underflow_error : public runtime_error - { - public: - explicit underflow_error(const string& __arg); ---- origsrc/gcc-4.7.2/libstdc++-v3/libsupc++/exception 2011-12-07 04:03:25.000000000 +0800 -+++ src/gcc-4.7.2/libstdc++-v3/libsupc++/exception 2013-02-26 19:27:32.575916600 +0800 -@@ -59,7 +59,7 @@ namespace std - * your own %exception classes, or use a different hierarchy, or to - * throw non-class data (e.g., fundamental types). - */ -- class exception -+ class _GLIBCXX_IMPORT exception - { - public: - exception() _GLIBCXX_USE_NOEXCEPT { } -@@ -72,7 +72,7 @@ namespace std - - /** If an %exception is thrown which is not listed in a function's - * %exception specification, one of these may be thrown. */ -- class bad_exception : public exception -+ class _GLIBCXX_IMPORT bad_exception : public exception - { - public: - bad_exception() _GLIBCXX_USE_NOEXCEPT { } ---- origsrc/gcc-4.7.2/libstdc++-v3/libsupc++/new 2011-10-12 19:40:58.000000000 +0100 -+++ src/gcc-4.7.2/libstdc++-v3/libsupc++/new 2012-10-31 16:49:37.578125000 +0000 -@@ -53,7 +53,7 @@ namespace std - * - * @c bad_alloc (or classes derived from it) is used to report allocation - * errors from the throwing forms of @c new. */ -- class bad_alloc : public exception -+ class _GLIBCXX_IMPORT bad_alloc : public exception - { - public: - bad_alloc() throw() { } ---- origsrc/gcc-4.7.2/libstdc++-v3/libsupc++/typeinfo 2012-01-27 19:38:56.000000000 +0000 -+++ src/gcc-4.7.2/libstdc++-v3/libsupc++/typeinfo 2012-10-31 17:07:07.796875000 +0000 -@@ -87,7 +87,7 @@ namespace std - * The @c type_info class describes type information generated by - * an implementation. - */ -- class type_info -+ class _GLIBCXX_IMPORT type_info - { - public: - /** Destructor first. Being the first non-inline virtual function, this -@@ -186,7 +186,7 @@ namespace std - * - * If you attempt an invalid @c dynamic_cast expression, an instance of - * this class (or something derived from this class) is thrown. */ -- class bad_cast : public exception -+ class _GLIBCXX_IMPORT bad_cast : public exception - { - public: - bad_cast() _GLIBCXX_USE_NOEXCEPT { } -@@ -203,7 +203,7 @@ namespace std - * @brief Thrown when a NULL pointer in a @c typeid expression is used. - * @ingroup exceptions - */ -- class bad_typeid : public exception -+ class _GLIBCXX_IMPORT bad_typeid : public exception - { - public: - bad_typeid () _GLIBCXX_USE_NOEXCEPT { } ---- origsrc/gcc-4.7.2/libstdc++-v3/testsuite/lib/libstdc++.exp 2012-08-06 22:34:27.000000000 +0800 -+++ src/gcc-4.7.2/libstdc++-v3/testsuite/lib/libstdc++.exp 2013-02-26 19:31:07.934763700 +0800 -@@ -146,6 +146,9 @@ proc libstdc++_init { testfile } { - set gccdir [file dirname $gccdir] - append ld_library_path_tmp ":${gccdir}" - } -+ if { [string match "*-*-cygwin*" $target_triplet] } { -+ append ld_library_path_tmp ":${blddir}/../libgcc" -+ } - v3track gccdir 3 - - # Locate libgomp. This is only required for parallel mode. diff --git a/gcc47-misc-core.patch b/gcc47-misc-core.patch deleted file mode 100644 index 0c66eb0..0000000 --- a/gcc47-misc-core.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- origsrc/gcc-4.7.2/gcc/cppdefault.c 2012-01-06 08:14:32.000000000 +0800 -+++ src/gcc-4.7.2/gcc/cppdefault.c 2013-02-26 19:32:22.836275000 +0800 -@@ -35,6 +35,8 @@ - # undef NATIVE_SYSTEM_HEADER_DIR - #else - # undef CROSS_INCLUDE_DIR -+# undef CROSS_INCLUDE_DIR_1 -+# undef CROSS_INCLUDE_DIR_2 - #endif - - const struct default_include cpp_include_defaults[] -@@ -84,6 +86,14 @@ const struct default_include cpp_include - /* One place the target system's headers might be. */ - { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, - #endif -+#ifdef CROSS_INCLUDE_DIR_1 -+ /* One more place the target system's headers might be. */ -+ { CROSS_INCLUDE_DIR_1, "GCC", 0, 0, 0, 0 }, -+#endif -+#ifdef CROSS_INCLUDE_DIR_2 -+ /* One more place the target system's headers might be. */ -+ { CROSS_INCLUDE_DIR_2, "GCC", 0, 0, 0, 0 }, -+#endif - #ifdef TOOL_INCLUDE_DIR - /* Another place the target system's headers might be. */ - { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 }, - diff --git a/gcc47-specs.patch b/gcc47-specs.patch deleted file mode 100644 index 8b82f3d..0000000 --- a/gcc47-specs.patch +++ /dev/null @@ -1,87 +0,0 @@ -Accept -pthread and -rdynamic for compatibility with Linux. -Add --large-address-aware, and use --tsaware, only with EXEs. - ---- origsrc/gcc-4.7.2/gcc/config.gcc 2012-09-12 04:03:54.000000000 -0500 -+++ src/gcc-4.7.2/gcc/config.gcc 2013-03-11 03:41:03.674656700 -0500 -@@ -1417,7 +1417,7 @@ i[34567]86-*-cygwin*) - 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" ---- origsrc/gcc-4.7.2/gcc/config/i386/cygwin.h 2012-02-13 15:46:38.000000000 -0600 -+++ src/gcc-4.7.2/gcc/config/i386/cygwin.h 2013-03-06 00:13:25.986558800 -0600 -@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. - #define EXTRA_OS_CPP_BUILTINS() /* Nothing. */ - - #undef CPP_SPEC --#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ -+#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread: } \ - -D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix \ - %{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \ - %{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\ -@@ -49,11 +49,7 @@ along with GCC; see the file COPYING3. - %{static|static-libgcc:-lgcc -lgcc_eh} \ - %{!static: \ - %{!static-libgcc: \ -- %{!shared: \ -- %{!shared-libgcc:-lgcc -lgcc_eh} \ -- %{shared-libgcc:-lgcc_s -lgcc} \ -- } \ -- %{shared:-lgcc_s -lgcc} \ -+ -lgcc_s -lgcc \ - } \ - } " - #else -@@ -72,6 +72,7 @@ along with GCC; see the file COPYING3. - #undef LIB_SPEC - #define LIB_SPEC "\ - %{pg:-lgmon} \ -+ %{pthread: } \ - -lcygwin \ - %{mwindows:-lgdi32 -lcomdlg32} \ - -ladvapi32 -lshell32 -luser32 -lkernel32" -@@ -115,7 +116,9 @@ along with GCC; see the file COPYING3. - %{shared: --shared} %{mdll:--dll} \ - %{static:-Bstatic} %{!static:-Bdynamic} \ - %{shared|mdll: --enable-auto-image-base -e __cygwin_dll_entry@12} \ -- --dll-search-prefix=cyg -tsaware" -+ --dll-search-prefix=cyg \ -+ %{rdynamic: --export-all-symbols} \ -+ %{!shared: %{!mdll: --large-address-aware --tsaware}}" - - /* Binutils does not handle weak symbols from dlls correctly. For now, - do not use them unnecessarily in gthr-posix.h. */ ---- origsrc/gcc-4.7.2/gcc/config/i386/cygwin.opt 1969-12-31 18:00:00.000000000 -0600 -+++ src/gcc-4.7.2/gcc/config/i386/cygwin.opt 2013-03-11 03:36:36.556378400 -0500 -@@ -0,0 +1,27 @@ -+; Cygwin-specific options. -+ -+; Copyright (C) 2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. -+; -+; This file is part of GCC. -+; -+; GCC 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. -+; -+; GCC 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 GCC; see the file COPYING3. If not see -+; . -+ -+pthread -+Driver -+ -+rdynamic -+Driver -+ -+; Retain blank line above diff --git a/gcc48-Wimplicit-decls.patch b/gcc48-Wimplicit-decls.patch new file mode 100644 index 0000000..f21c360 --- /dev/null +++ b/gcc48-Wimplicit-decls.patch @@ -0,0 +1,41 @@ +--- 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 + /* Test by Jim Wilson and Kaveh Ghazi. + Check whether strncmp reads past the end of its string parameters. */ + #include ++#include ++#include + + #ifdef HAVE_FCNTL_H + #include +@@ -147,7 +149,9 @@ if test $ac_cv_os_cray = yes; then + fi + + AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, +-[AC_TRY_RUN([find_stack_direction () ++[AC_TRY_RUN([ ++#include ++find_stack_direction () + { + 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 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include + find_stack_direction () + { + static char *addr = 0; +@@ -6838,6 +6839,8 @@ else + /* Test by Jim Wilson and Kaveh Ghazi. + Check whether strncmp reads past the end of its string parameters. */ + #include ++#include ++#include + + #ifdef HAVE_FCNTL_H + #include diff --git a/gcc48-java-soname.patch b/gcc48-java-soname.patch new file mode 100644 index 0000000..b473867 --- /dev/null +++ b/gcc48-java-soname.patch @@ -0,0 +1,7 @@ +--- 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 +@@ -139,3 +139,3 @@ + /* 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*/ "-14.dll" + diff --git a/gcc48-libatomic-cygwin.patch b/gcc48-libatomic-cygwin.patch new file mode 100644 index 0000000..2ab3dc6 --- /dev/null +++ b/gcc48-libatomic-cygwin.patch @@ -0,0 +1,118 @@ +--- 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 + + SIZEOBJS = load store cas exch fadd fsub fand fior fxor fnand tas +--- 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 + SIZEOBJS = load store cas exch fadd fsub fand fior fxor fnand tas + EXTRA_libatomic_la_SOURCES = $(addsuffix _n.c,$(SIZEOBJS)) +--- 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 +@@ -993,6 +993,7 @@ + m4_include([../config/acx.m4]) + m4_include([../config/depstand.m4]) + m4_include([../config/lead-dot.m4]) ++m4_include([../config/lthostflags.m4]) + 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 +@@ -627,6 +627,7 @@ + MAINTAINER_MODE_TRUE + enable_static + enable_shared ++lt_host_flags + CPP + OTOOL64 + OTOOL +@@ -11013,7 +11014,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11016 "configure" ++#line 11017 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11119,7 +11120,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11122 "configure" ++#line 11123 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11357,6 +11358,28 @@ + + + ++ ++ ++case $host in ++ *-cygwin* | *-mingw*) ++ # 'host' will be top-level target in the case of a target lib, ++ # we must compare to with_cross_host to decide if this is a native ++ # or cross-compiler and select where to install dlls appropriately. ++ if test -n "$with_cross_host" && ++ test x"$with_cross_host" != x"no"; then ++ lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"'; ++ else ++ lt_host_flags='-no-undefined -bindir "$(bindir)"'; ++ fi ++ ;; ++ *) ++ lt_host_flags= ++ ;; ++esac ++ ++ ++ ++ + + + { $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 +@@ -143,6 +143,7 @@ + + # Configure libtool + AM_PROG_LIBTOOL ++ACX_LT_HOST_FLAGS + 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 @@ + *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \ + | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* \ + | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \ +- | *-*-darwin* | *-*-aix*) ++ | *-*-darwin* | *-*-aix* | *-*-cygwin*) + # POSIX system. The OS is supported. + config_path="${config_path} posix" + ;; diff --git a/gcc48-libgcc-references.patch b/gcc48-libgcc-references.patch new file mode 100644 index 0000000..c8918b8 --- /dev/null +++ b/gcc48-libgcc-references.patch @@ -0,0 +1,45 @@ +--- libgcc/config/i386/cygming-crtbegin.c.orig 2013-07-25 18:39:34.579552100 +0800 ++++ libgcc/config/i386/cygming-crtbegin.c 2013-07-25 18:43:51.778712300 +0800 +@@ -100,6 +100,8 @@ + extern void __gcc_register_frame (void); + extern void __gcc_deregister_frame (void); + ++static HANDLE libgcc_dll; ++ + void + __gcc_register_frame (void) + { +@@ -112,8 +114,11 @@ + void (*register_frame_fn) (const void *, struct object *); + HANDLE h = GetModuleHandle (LIBGCC_SONAME); + if (h) +- register_frame_fn = (void (*) (const void *, struct object *)) +- GetProcAddress (h, "__register_frame_info"); ++ { ++ libgcc_dll = LoadLibrary (LIBGCC_SONAME); /* Hold reference */ ++ register_frame_fn = (void (*) (const void *, struct object *)) ++ GetProcAddress (h, "__register_frame_info"); ++ } + else + register_frame_fn = __register_frame_info; + if (register_frame_fn) +@@ -142,13 +147,16 @@ + { + #if DWARF2_UNWIND_INFO + void * (*deregister_frame_fn) (const void *); +- HANDLE h = GetModuleHandle (LIBGCC_SONAME); +- if (h) ++ if (libgcc_dll) + deregister_frame_fn = (void* (*) (const void *)) +- GetProcAddress (h, "__deregister_frame_info"); ++ GetProcAddress (libgcc_dll, "__deregister_frame_info"); + else + deregister_frame_fn = __deregister_frame_info; + if (deregister_frame_fn) + deregister_frame_fn (__EH_FRAME_BEGIN__); ++ ++if (libgcc_dll) ++ FreeLibrary (libgcc_dll); ++ + #endif + } diff --git a/gcc48-specs-cygwin.patch b/gcc48-specs-cygwin.patch new file mode 100644 index 0000000..3d131cd --- /dev/null +++ b/gcc48-specs-cygwin.patch @@ -0,0 +1,92 @@ +--- 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 @@ i[34567]86-*-cygwin*) + 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" +--- gcc/config/i386/cygwin.h (revision 196430) ++++ gcc/config/i386/cygwin.h (working copy) +@@ -18,11 +18,20 @@ + along with GCC; see the file COPYING3. If not see + . */ + +-#define EXTRA_OS_CPP_BUILTINS() /* Nothing. */ ++#define EXTRA_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ builtin_define ("__CYGWIN__"); \ ++ if (!TARGET_64BIT) \ ++ builtin_define ("__CYGWIN32__"); \ ++ builtin_define ("__unix__"); \ ++ builtin_define ("__unix"); \ ++ } \ ++ while (0) + + #undef CPP_SPEC + #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ +- -D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix \ ++ %{!ansi:-Dunix} %{pthread: } \ + %{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 @@ + #undef LIB_SPEC + #define LIB_SPEC "\ + %{pg:-lgmon} \ ++ %{pthread: } \ + -lcygwin \ + %{mwindows:-lgdi32 -lcomdlg32} \ + -ladvapi32 -lshell32 -luser32 -lkernel32" + + /* To implement C++ function replacement we always wrap the cxx + malloc-like operators. See N2800 #17.6.4.6 [replacement.functions] */ ++#undef CXX_WRAP_SPEC_LIST + #define CXX_WRAP_SPEC_LIST " \ + --wrap _Znwj \ + --wrap _Znaj \ +@@ -115,7 +126,9 @@ + %{shared: --shared} %{mdll:--dll} \ + %{static:-Bstatic} %{!static:-Bdynamic} \ + %{shared|mdll: --enable-auto-image-base -e __cygwin_dll_entry@12} \ +- --dll-search-prefix=cyg -tsaware" ++ --dll-search-prefix=cyg \ ++ %{rdynamic: --export-all-symbols} \ ++ %{!shared: %{!mdll: --large-address-aware --tsaware}}" + + /* 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 +@@ -0,0 +1,27 @@ ++; Cygwin-specific options. ++ ++; Copyright (C) 2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. ++; ++; This file is part of GCC. ++; ++; GCC 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. ++; ++; GCC 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 GCC; see the file COPYING3. If not see ++; . ++ ++pthread ++Driver ++ ++rdynamic ++Driver ++ ++; Retain blank line above diff --git a/sources b/sources index 26ae819..bad02c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -86f428a30379bdee0224e353ee2f999e gcc-4.7.3.tar.bz2 +a3d7d63b9cb6b6ea049469a0c4a43c9d gcc-4.8.2.tar.bz2 -- cgit