https://gcc.gnu.org/g:8aee4e0bbb53f06fbdbcfb0561d2cef28c7127c9
commit r17-1483-g8aee4e0bbb53f06fbdbcfb0561d2cef28c7127c9 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]> 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 } */
