[gcc r17-3414] testsuite, c++, Darwin: Add crt to LTO link line for darwin9.
Iain D Sandoe via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:a34c8174991b9ee33ff5b3d8a4ad928723e7b457 commit r17-3414-ga34c8174991b9ee33ff5b3d8a4ad928723e7b457 Author: Iain Sandoe <[email protected]> Date: Tue Aug 18 23:13:34 2026 +0100 testsuite, c++, Darwin: Add crt to LTO link line for darwin9. The LTO tests here are hand-crafting link lines, to build a shared library on Darwin8/9 we have to provide a crt that contains the header. gcc/testsuite/ChangeLog: * g++.dg/lto/pr86585_0.C: Add -dylib0.o for Darwin8/9. * g++.dg/lto/pr87906_0.C: Likewise. Signed-off-by: Iain Sandoe <[email protected]> Diff: --- gcc/testsuite/g++.dg/lto/pr86585_0.C | 3 ++- gcc/testsuite/g++.dg/lto/pr87906_0.C | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/g++.dg/lto/pr86585_0.C b/gcc/testsuite/g++.dg/lto/pr86585_0.C index 15c45b5d162e..a9de6ecec9a1 100644 --- a/gcc/testsuite/g++.dg/lto/pr86585_0.C +++ b/gcc/testsuite/g++.dg/lto/pr86585_0.C @@ -2,7 +2,8 @@ // { dg-require-effective-target fpic } // { dg-require-effective-target shared } // { dg-lto-options { { -flto -g -nostdlib -shared -fPIC } } } -// { dg-extra-ld-options "-Wl,-undefined,dynamic_lookup -lSystem" { target *-*-darwin* } } +// { dg-extra-ld-options "-Wl,-undefined,dynamic_lookup -lSystem" { target *-*-darwin[12][0-9]* } } +// { dg-extra-ld-options "-Wl,-undefined,dynamic_lookup -ldylib1.o -lSystem" { target *-*-darwin[89]* } } namespace Inkscape { class a; } diff --git a/gcc/testsuite/g++.dg/lto/pr87906_0.C b/gcc/testsuite/g++.dg/lto/pr87906_0.C index 038ba0bbbf86..c61ecce62eca 100644 --- a/gcc/testsuite/g++.dg/lto/pr87906_0.C +++ b/gcc/testsuite/g++.dg/lto/pr87906_0.C @@ -4,8 +4,8 @@ // { dg-require-effective-target shared } // { dg-lto-options { { -O -fPIC -flto } } } // { dg-extra-ld-options "-shared -nostdlib" } -// { dg-extra-ld-options "-shared -nostdlib -Wl,-undefined,dynamic_lookup -lSystem" { target *-*-darwin* } } - +// { dg-extra-ld-options "-shared -nostdlib -Wl,-undefined,dynamic_lookup -lSystem" { target *-*-darwin[12][0-9]* } } +// { dg-extra-ld-options "-shared -nostdlib -Wl,-undefined,dynamic_lookup -ldylib1.o -lSystem" { target *-*-darwin[89]* } } namespace com { namespace moon { namespace star {}