https://gcc.gnu.org/g:035b9b7679016a1cef95df51c170b1cf50c2c3ee

commit r17-3961-g035b9b7679016a1cef95df51c170b1cf50c2c3ee
Author: Iain Sandoe <[email protected]>
Date:   Sat Sep 5 16:20:54 2026 +0100

    testsuite, Darwin: Allow two undefined symbols in the 99849 test.
    
    Darwin's linker defaults to requiring all symbols to be resolved at static-
    link time.  This test creates a shared object with two undefined symbols,
    allow them for Darwin.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.dg/lto/pr99849_0.c: Allo baz and qux to be undefined at
            static-link time.
    
    Signed-off-by: Iain Sandoe <[email protected]>

Diff:
---
 gcc/testsuite/gcc.dg/lto/pr99849_0.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/gcc.dg/lto/pr99849_0.c 
b/gcc/testsuite/gcc.dg/lto/pr99849_0.c
index 5c97a7c75a23..735b93ee90d9 100644
--- a/gcc/testsuite/gcc.dg/lto/pr99849_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr99849_0.c
@@ -3,6 +3,7 @@
 /* { dg-require-effective-target fpic } */
 /* { dg-require-effective-target shared } */
 /* { dg-extra-ld-options { -shared } } */
+/* { dg-extra-ld-options "-shared -Wl,-U,_bar,-U,_qux" { target *-*-darwin* } 
} */
 /* { dg-lto-options { { -std=gnu17 -flto -flto-partition=1to1 -O2 
-Wno-incompatible-pointer-types -Wno-discarded-qualifiers -fPIC } } } */
 
 struct { struct A *a; } *b;

Reply via email to