From 6053c493e0e2a18f4e546f35ab4b1d119a2b8baa Mon Sep 17 00:00:00 2001 From: pfg Date: Thu, 2 Jan 2014 13:53:53 +0000 Subject: Revert r260073; small diff reduction wrt gcc43 and Apple GCC. Unfortunately this causes ICE on powerpc and sparc64. Reducing these differences against upstream is not important anymore so hopefully I have finished breaking the compiler occasionally. --- contrib/gcc/cp/ChangeLog | 6 ------ contrib/gcc/cp/g++spec.c | 17 ++++++++--------- 2 files changed, 8 insertions(+), 15 deletions(-) (limited to 'contrib/gcc/cp') diff --git a/contrib/gcc/cp/ChangeLog b/contrib/gcc/cp/ChangeLog index a79ed04..7629e8b 100644 --- a/contrib/gcc/cp/ChangeLog +++ b/contrib/gcc/cp/ChangeLog @@ -314,12 +314,6 @@ PR c++/30895 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees. -2007-03-02 Geoffrey Keating (r122488) - - * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling - Objective-C++. Don't exit early if -shared-libgcc needs to be - added. - 2007-02-22 Simon Martin PR c++/29475 diff --git a/contrib/gcc/cp/g++spec.c b/contrib/gcc/cp/g++spec.c index 0d3a442..b58fdcd 100644 --- a/contrib/gcc/cp/g++spec.c +++ b/contrib/gcc/cp/g++spec.c @@ -159,19 +159,11 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, arg = ""; if (library == 0 && (strcmp (arg, "c++") == 0 - || strcmp (arg, "c++-cpp-output") == 0 - || strcmp (arg, "objective-c++") == 0 - || strcmp (arg, "objective-c++-cpp-output") == 0)) + || strcmp (arg, "c++-cpp-output") == 0)) library = 1; saw_speclang = 1; } - else if (strcmp (argv[i], "-ObjC++") == 0) - { - if (library == 0) - library = 1; - saw_speclang = 1; - } /* Arguments that go directly to the linker might be .o files, or something, and so might cause libstdc++ to be needed. */ else if (strcmp (argv[i], "-Xlinker") == 0) @@ -245,6 +237,13 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, if (quote) fatal ("argument to '%s' missing\n", quote); + /* If we know we don't have to do anything, bail now. */ + if (! added && library <= 0) + { + free (args); + return; + } + /* There's no point adding -shared-libgcc if we don't have a shared libgcc. */ #ifndef ENABLE_SHARED_LIBGCC -- cgit v1.1