mingw32.h (SHARED_LIBGCC_SPEC): Synchronize with cygwin-host.
authorKai Tietz <ktietz@redhat.com>
Fri, 30 Nov 2012 08:09:02 +0000 (09:09 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Fri, 30 Nov 2012 08:09:02 +0000 (09:09 +0100)
        * config/i386/mingw32.h (SHARED_LIBGCC_SPEC): Synchronize with
        cygwin-host.

From-SVN: r193986

gcc/ChangeLog
gcc/config/i386/mingw32.h

index 903a77cf4af1e15a85435a60ed985e0669e8116f..84bd55ac06e6d0e3ba93a4d138df344dbc5700f4 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-30  Kai Tietz  <ktietz@redhat.com>
+
+       * config/i386/mingw32.h (SHARED_LIBGCC_SPEC): Synchronize with
+       cygwin-host.
+
 2012-11-29  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR middle-end/55321
index 0e3751f4e19e7f056e2f65b408e2019f3ff8de01..2e32e5331df6e1695647667662f8202282285565 100644 (file)
@@ -121,15 +121,24 @@ along with GCC; see the file COPYING3.  If not see
 
 /* Include in the mingw32 libraries with libgcc */
 #ifdef ENABLE_SHARED_LIBGCC
-#define SHARED_LIBGCC_SPEC "%{shared-libgcc:-lgcc_s} %{!shared-libgcc:-lgcc_eh}"
+#define SHARED_LIBGCC_SPEC " \
+ %{static|static-libgcc:-lgcc -lgcc_eh} \
+ %{!static: \
+   %{!static-libgcc: \
+     %{!shared: \
+       %{!shared-libgcc:-lgcc -lgcc_eh} \
+       %{shared-libgcc:-lgcc_s -lgcc} \
+      } \
+     %{shared:-lgcc_s -lgcc} \
+    } \
+  } "
 #else
-#define SHARED_LIBGCC_SPEC /*empty*/
+#define SHARED_LIBGCC_SPEC " -lgcc "
 #endif
 #undef REAL_LIBGCC_SPEC
 #define REAL_LIBGCC_SPEC \
   "%{mthreads:-lmingwthrd} -lmingw32 \
    "SHARED_LIBGCC_SPEC" \
-   -lgcc \
    -lmoldname -lmingwex -lmsvcrt"
 
 #undef STARTFILE_SPEC