[gcc r16-9441] testsuite, Darwin: Handle undefined symbols in pr97172-2 testcase.
Iain D Sandoe via Gcc-cvs <[email protected]> Wed, 29 Jul 2026 21:44:10 +0000 (GMT)
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:e77fac2224dc50320bb4469725a6ea1d4dc25b50 commit r16-9441-ge77fac2224dc50320bb4469725a6ea1d4dc25b50 Author: Iain Sandoe <[email protected]> Date: Wed Jun 10 21:22:21 2026 +0100 testsuite, Darwin: Handle undefined symbols in pr97172-2 testcase. Darwin's linker defaults to complaining about missing symbols, leading to a spurious fail of this testcase. We can work around this by allowing undefined symbols to be considered as dynamically looked-up. gcc/testsuite/ChangeLog: * gcc.dg/pr97172-2.c: Allow undefined symbols at link-time. Signed-off-by: Iain Sandoe <[email protected]> (cherry picked from commit 8aee4e0bbb53f06fbdbcfb0561d2cef28c7127c9) Diff: --- gcc/testsuite/gcc.dg/pr97172-2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/pr97172-2.c b/gcc/testsuite/gcc.dg/pr97172-2.c index 99cc6c29ff40..61f05626ebea 100644 --- a/gcc/testsuite/gcc.dg/pr97172-2.c +++ b/gcc/testsuite/gcc.dg/pr97172-2.c @@ -2,6 +2,7 @@ streams { dg-do link } { dg-options "-Wall -flto -fpic -shared" } + { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } { dg-require-effective-target fpic } { dg-require-effective-target shared } { dg-require-effective-target lto } */