]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite, Darwin: Allow for an undefined symbol [PR114036].
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 31 Mar 2024 10:27:53 +0000 (11:27 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 2 Apr 2024 11:26:47 +0000 (12:26 +0100)
Darwin's linker defaults to requiring all symbols to be defined at
static link time (unless specifically noted or dynamic lookuo is
enabled).

For this test, we just need to note that the symbol is expected to
be undefined.

PR testsuite/114036

gcc/testsuite/ChangeLog:

* gcc.misc-tests/gcov-14.c: Allow for 'Foo' to be undefined
on Darwin link lines.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/gcc.misc-tests/gcov-14.c

index 2bebf7e4a939347920eeb5eaac3f60c53cf4fc6c..61a9191c0687a45f6324cf30ef8b4301f2070e3d 100644 (file)
@@ -3,7 +3,7 @@
 /* { dg-do run { target native } } */
 /* { dg-options "-O2 -fprofile-arcs -ftest-coverage -fgnu89-inline" } */
 /* The following line arranges that Darwin has behavior like elf weak import.  */
-/* { dg-additional-options "-flat_namespace -undefined suppress" { target *-*-darwin* }  } */
+/* { dg-additional-options "-Wl,-U,_Foo" { target *-*-darwin* }  } */
 /* { dg-require-weak "" } */
 /* { dg-skip-if "undefined weak not supported" { { hppa*-*-hpux* } && { ! lp64 } } } */
 /* { dg-skip-if "undefined weak not supported" { powerpc-ibm-aix* } } */