From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id BBD963858D1E; Sat, 27 Apr 2024 16:22:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BBD963858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714234951; bh=YqjdhTEbDNWCfrLxNFYDo11S3LQSWOJkK2pBsUZClgU=; h=From:To:Subject:Date:From; b=eOg4O+/ZbOO80JcjUkDszp2RDhNuRgHLENYxcfl3K4IVV+YyzbYrqoTiDecLRldNf rcchG8+68XKuW96l0ZzEv75XC8GN9Uk2fdpp0EMEMHFl6Z5+XhAqbDqbY7KzKK9Q1d VHBGshrIVY1MSU8WrKdI8Pi5eaKmBvIm99Up28Gs= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-11382] Testsuite, Darwin: Adjust handling of PIE test X-Act-Checkin: gcc X-Git-Author: Francois-Xavier Coudert X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: 65f028e25fd0239b0b2ba6485653fd4dce131da8 X-Git-Newrev: 293140dfc6dbe7ab70c1f031f0dac6939bb084d6 Message-Id: <20240427162231.BBD963858D1E@sourceware.org> Date: Sat, 27 Apr 2024 16:22:31 +0000 (GMT) List-Id: https://gcc.gnu.org/g:293140dfc6dbe7ab70c1f031f0dac6939bb084d6 commit r11-11382-g293140dfc6dbe7ab70c1f031f0dac6939bb084d6 Author: Francois-Xavier Coudert Date: Mon Oct 30 12:41:17 2023 +0100 Testsuite, Darwin: Adjust handling of PIE test 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 Diff: --- gcc/config/darwin.c | 2 +- gcc/testsuite/gcc.dg/pie-2.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 61f04a1b209..2a3de33ee95 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -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- diff --git a/gcc/testsuite/gcc.dg/pie-2.c b/gcc/testsuite/gcc.dg/pie-2.c index 1838745a11a..0a1cc27a503 100644 --- a/gcc/testsuite/gcc.dg/pie-2.c +++ b/gcc/testsuite/gcc.dg/pie-2.c @@ -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!