diff options
Diffstat (limited to 'contrib/gcc/cp/g++spec.c')
-rw-r--r-- | contrib/gcc/cp/g++spec.c | 17 |
1 files changed, 8 insertions, 9 deletions
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 |