]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite, Darwin: Handle undefined symbols in pr97172-2 testcase.
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 10 Jun 2026 20:22:21 +0000 (21:22 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Wed, 10 Jun 2026 22:13:56 +0000 (23:13 +0100)
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 <iain@sandoe.co.uk>
gcc/testsuite/gcc.dg/pr97172-2.c

index 99cc6c29ff40caf99749d7b6c304f86d23968911..61f05626ebea104c55096c0dcb2eac3fd8779087 100644 (file)
@@ -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 } */