]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/26397 (Program crashes when rethrowing exception)
authorDavid Edelsohn <edelsohn@gnu.org>
Thu, 6 Nov 2008 15:32:40 +0000 (15:32 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Thu, 6 Nov 2008 15:32:40 +0000 (10:32 -0500)
        PR target/26397
        * config/rs6000/aix.h (LIBSTDCXX_STATIC): Define.

cp/
        * g++spec.c (LIBSTDCXX_STATIC): New.
        (lang_spec_driver): Use LIBSTDCXX_STATIC when not shared_libgcc.

From-SVN: r141646

gcc/ChangeLog
gcc/config/rs6000/aix.h
gcc/cp/ChangeLog
gcc/cp/g++spec.c

index 44b888e8537381696c1b6312c7a38fc9aec2eda9..3a8fe7013ec64955f6d72129971f652b4755cbe1 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-06  David Edelsohn  <edelsohn@gnu.org>
+
+       PR target/26397
+       * config/rs6000/aix.h (LIBSTDCXX_STATIC): Define.
+       
 2008-11-06  Kazu Hirata  <kazu@codesourcery.com>
 
        PR target/35574
index 48072988f33b22598c4878e4bbdb3297f0342a55..4dc2e5034ab34bc1a2e9eb04ae2757d3b16a616e 100644 (file)
 #define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
 %{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}} -lc"
 
+/* Static linking with shared libstdc++ requires libsupc++ as well.  */
+#define LIBSTDCXX_STATIC "-lstdc++ -lsupc++"
+
 /* This now supports a natural alignment mode.  */
 /* AIX word-aligns FP doubles but doubleword-aligns 64-bit ints.  */
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
index 55a81ec3f4f60189990bca394dbe6ecb85d2acb2..ec7a1aa5263d065c98953a6d70dfe89bcab2834c 100644 (file)
@@ -1,3 +1,10 @@
+2008-11-06  David Edelsohn  <edelsohn@gnu.org>
+
+       PR target/26397
+       * g++spec.c (LIBSTDCXX_STATIC): New.
+       (lang_spec_driver): Use LIBSTDCXX_STATIC when not
+       shared_libgcc.
+       
 2008-11-05  Fabien Chene <fabien.chene@gmail.com>
 
        PR c++/35219
index a19a35fa34840793cd7fafaca50b0f7f06243dd0..c161e99aad24d22faa4bdd8a9ab9924696702169 100644 (file)
@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef LIBSTDCXX_PROFILE
 #define LIBSTDCXX_PROFILE LIBSTDCXX
 #endif
+#ifndef LIBSTDCXX_STATIC
+#define LIBSTDCXX_STATIC LIBSTDCXX
+#endif
 
 void
 lang_specific_driver (int *in_argc, const char *const **in_argv,
@@ -315,7 +318,8 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
   /* Add `-lstdc++' if we haven't already done so.  */
   if (library > 0)
     {
-      arglist[j] = saw_profile_flag ? LIBSTDCXX_PROFILE : LIBSTDCXX;
+      arglist[j] = shared_libgcc == 0 ? LIBSTDCXX_STATIC
+       : saw_profile_flag ? LIBSTDCXX_PROFILE : LIBSTDCXX;
       if (arglist[j][0] != '-' || arglist[j][1] == 'l')
        added_libraries++;
       j++;