diff options
| author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-02 21:07:37 +0000 |
|---|---|---|
| committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-02 21:07:37 +0000 |
| commit | 92bae6924295ce5454ee138eef33ea614b2e99d0 (patch) | |
| tree | 8933fc27c40c3ab0447477fc8326b9df2ca221ab | |
| parent | c3783c3b99309137d1939f8201a3d4c83b5a13aa (diff) | |
| download | ppe42-gcc-92bae6924295ce5454ee138eef33ea614b2e99d0.tar.gz ppe42-gcc-92bae6924295ce5454ee138eef33ea614b2e99d0.zip | |
Index: gcc/cp/ChangeLog
2007-03-02 Geoffrey Keating <geoffk@apple.com>
* g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
Objective-C++. Don't exit early if -shared-libgcc needs to be
added.
Index: gcc/testsuite/ChangeLog
2007-03-02 Geoffrey Keating <geoffk@apple.com>
* g++.dg/other/darwin-minversion-1.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122488 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cp/g++spec.c | 17 | ||||
| -rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/testsuite/g++.dg/other/darwin-minversion-1.C | 10 |
4 files changed, 29 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8b19a86fc3a..a45c8661b51 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2007-03-02 Geoffrey Keating <geoffk@apple.com> + + * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling + Objective-C++. Don't exit early if -shared-libgcc needs to be + added. + 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org> * typeck.c (common_base_type): Delete unused function. diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c index 2ddc62c1e20..2f452ee5096 100644 --- a/gcc/cp/g++spec.c +++ b/gcc/cp/g++spec.c @@ -159,11 +159,19 @@ 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, "c++-cpp-output") == 0 + || strcmp (arg, "objective-c++") == 0 + || strcmp (arg, "objective-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) @@ -237,13 +245,6 @@ 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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 88677236c68..10c948793f3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2007-03-02 Geoffrey Keating <geoffk@apple.com> + + * g++.dg/other/darwin-minversion-1.C: New. + 2007-03-02 Diego Novillo <dnovillo@redhat.com> * gcc.dg/tree-ssa/20070302-1.c: New test. diff --git a/gcc/testsuite/g++.dg/other/darwin-minversion-1.C b/gcc/testsuite/g++.dg/other/darwin-minversion-1.C new file mode 100644 index 00000000000..cbf5ff1d20b --- /dev/null +++ b/gcc/testsuite/g++.dg/other/darwin-minversion-1.C @@ -0,0 +1,10 @@ +/* Test for -mmacosx-version-min default on powerpc-darwin. */ +/* { dg-do compile { target powerpc-*-darwin* } } */ + +int main(void) +{ +#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1030 + fail me; +#endif + return 0; +} |

