From: Iain Sandoe Date: Wed, 10 Jun 2026 20:22:21 +0000 (+0100) Subject: testsuite, Darwin: Handle undefined symbols in pr97172-2 testcase. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aee4e0bbb53f06fbdbcfb0561d2cef28c7127c9;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/gcc.dg/pr97172-2.c b/gcc/testsuite/gcc.dg/pr97172-2.c index 99cc6c29ff4..61f05626ebe 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 } */