Tested on x86_64-darwin, pushed to trunk,
thanks
Iain

--- 8< ---

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]>
---
 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 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 } */
-- 
2.50.1 (Apple Git-155)

Reply via email to