]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Testsuite, Darwin: Adjust handling of PIE test
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Mon, 30 Oct 2023 11:41:17 +0000 (12:41 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sat, 27 Apr 2024 16:20:05 +0000 (17:20 +0100)
gcc/ChangeLog:

* config/darwin.c (darwin_override_options): Cannot use
OPTION_SET_P here.

gcc/testsuite/ChangeLog:

* gcc.dg/pie-2.c: Skip test on darwin.

(cherry picked from commit a0c557690c8d5327deda6e21f8d1deca8451a4cb)

Co-authored-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/config/darwin.c
gcc/testsuite/gcc.dg/pie-2.c

index 61f04a1b209c5e1d54b807be836c6aa83aa16ade..2a3de33ee954c2fbddc27f7439d7d7403233cce7 100644 (file)
@@ -3455,7 +3455,7 @@ darwin_override_options (void)
       && write_symbols == DWARF2_DEBUG)
     flag_var_tracking_uninit = flag_var_tracking;
 
-  if (OPTION_SET_P (flag_pie) && flag_pie)
+  if (global_options_set.x_flag_pie && flag_pie)
     {
       /* This is a little complicated, to match Xcode tools.
         For Darwin, PIE requires PIC codegen, but otherwise is only a link-
index 1838745a11a111bbea464f3ce8c91af051c723ca..0a1cc27a503dac92fe6eb9aaf2e6503d321fcba3 100644 (file)
@@ -2,6 +2,7 @@
 /* { dg-options "-fPIE" } */
 /* { dg-require-effective-target pie } */
 /* { dg-skip-if "__PIC__ is always 1 for MIPS" { mips*-*-* } } */
+/* { dg-skip-if "__PIE__ is often not defined on darwin" { *-*-darwin* } } */
 
 #if __PIC__ != 2
 # error __PIC__ is not 2!