From 40a0a60a27a65867bc1a97def6fe946ac10b091c Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 2 Nov 2014 17:24:28 -0600 Subject: Fix optimization issue in crtbeginS.o --- cygwin-gcc.spec | 11 +++++++---- gcc48-__cxa_atexit.patch | 9 +++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cygwin-gcc.spec b/cygwin-gcc.spec index 801b26f..6c6f1b3 100644 --- a/cygwin-gcc.spec +++ b/cygwin-gcc.spec @@ -7,7 +7,7 @@ %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 5 +%global gcc_release 6 %global build_ada 0 # building cross-gnat requires matching X.Y version of native gnat @@ -31,7 +31,7 @@ URL: http://gcc.gnu.org BuildRequires: texinfo BuildRequires: cygwin32-filesystem BuildRequires: cygwin32-binutils -BuildRequires: cygwin32 +BuildRequires: cygwin32 >= 1.7.32 BuildRequires: cygwin32-w32api-headers BuildRequires: cygwin32-w32api-runtime BuildRequires: gmp-devel @@ -74,10 +74,10 @@ Group: Development/Languages # NB: Explicit cygwin32-filesystem dependency is REQUIRED here. Requires: cygwin32-filesystem Requires: cygwin32-binutils -Requires: cygwin32 +Requires: cygwin32 >= 1.7.32 Requires: cygwin32-default-manifest Requires: cygwin32-w32api-runtime -Requires: cygwin32-cpp +Requires: cygwin32-cpp = %{version}-%{release} # We don't run the automatic dependency scripts which would # normally detect and provide the following DLL: Provides: cygwin32(cygatomic-1.dll) @@ -406,6 +406,9 @@ popd %changelog +* Sun Nov 02 2014 Yaakov Selkowitz - 4.8.3-6 +- Fix optimization issue in crtbeginS.o. + * Mon Aug 11 2014 Yaakov Selkowitz - 4.8.3-5 - Separate Win32 patch for __cxa_thread_atexit. diff --git a/gcc48-__cxa_atexit.patch b/gcc48-__cxa_atexit.patch index fd1ce9b..bcff00a 100644 --- a/gcc48-__cxa_atexit.patch +++ b/gcc48-__cxa_atexit.patch @@ -29,7 +29,7 @@ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h" --- origsrc/gcc-4.8.3/libgcc/config/i386/cygming-crtbegin.c 2014-08-01 15:20:08.998477100 -0500 +++ src/gcc-4.8.3/libgcc/config/i386/cygming-crtbegin.c 2014-08-06 23:54:59.133581500 -0500 -@@ -81,6 +81,23 @@ static void *__JCR_LIST__[] +@@ -81,6 +81,24 @@ static void *__JCR_LIST__[] = { }; #endif @@ -47,13 +47,14 @@ +void *__dso_handle = 0; +#endif + ++extern int __cxa_atexit (void (*)(void *), void *, void *); +#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); -@@ -131,6 +148,13 @@ __gcc_register_frame (void) +@@ -131,6 +148,17 @@ __gcc_register_frame (void) register_class_fn (__JCR_LIST__); } #endif @@ -62,7 +63,11 @@ + /* If we use the __cxa_atexit method to register C++ dtors + at object construction, also use atexit to register eh frame + info cleanup. */ ++#ifdef __CYGWIN__ ++ __cxa_atexit(__gcc_deregister_frame, NULL, (void *)&__dso_handle); ++#else + atexit(__gcc_deregister_frame); ++#endif /* __CYGWIN__ */ +#endif /* DEFAULT_USE_CXA_ATEXIT */ } -- cgit