diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2019-10-29 19:46:05 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2019-10-29 19:46:05 +0000 |
commit | 3260d09d1e4022fd9c63e02ca974563db8d8ec4b (patch) | |
tree | 2cbfe6da3937a0a154dace6d062b461277e7b1c8 /gcc/config/darwin10.h | |
parent | c3864e6639019a8648da7c17a1f89c7ece152389 (diff) | |
download | gcc-3260d09d1e4022fd9c63e02ca974563db8d8ec4b.tar.gz |
[Darwin, specs] Fix driver handling of PIE options.
pie, no-pie and rdynamic are driver options, we can process them in the
relevant place and drop them once dealt with. There's no need to generate
a new header to process the no_compact_unwind which is applied on the
basis of the target system.
Support for the -pie, -no_pie and -no_compact_unwind options should ideally
be checked at configure time, however the status quo is to assert that linkers
capable of targeting the relevant systems support these options (i.e. we trust
that the user doesn't attempt to configure inappropriately).
TODO: check the availability of the linker opts in configure rather than
trusting to the user.
This will fix the fail of pie-7.c, which is a result of failing to handle the
no-pie driver option.
2019-10-29 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
2019-07-03 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.h (DRIVER_SELF_SPECS): Remove the linker cases.
(RDYNAMIC): Rename to, DARWIN_RDYNAMIC.
(DARWIN_PIE_SPEC, DARWIN_NOPIE_SPEC): Adjust to remove the Xlinker
clauses.
(LINK_COMMAND_SPEC_A): Add DARWIN_RDYNAMIC, DARWIN_PIE_SPEC and
DARWIN_NOPIE_SPEC.
Backport from mainline
2019-06-19 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.h (DRIVER_SELF_SPECS): Add RDYNAMIC, DARWIN_PIE_SPEC
and DARWIN_NOPIE_SPEC.
(RDYNAMIC): New, modified from DARWIN_EXPORT_DYNAMIC.
(DARWIN_PIE_SPEC): Collate from darwin.h and darwin9.h.
(DARWIN_NOPIE_SPEC): Collate from darwin10.h.
(DARWIN_NOCOMPACT_UNWIND): New from darwin10.h
(DARWIN_EXPORT_DYNAMIC): Delete.
* config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move no_compact_unwind
and pie options processing to darwin.h.
* config/darwin9.h (DARWIN_PIE_SPEC): Move pie processing to darwin.h
From-SVN: r277581
Diffstat (limited to 'gcc/config/darwin10.h')
-rw-r--r-- | gcc/config/darwin10.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/config/darwin10.h b/gcc/config/darwin10.h index f24b1257d26..c6ab3fd760c 100644 --- a/gcc/config/darwin10.h +++ b/gcc/config/darwin10.h @@ -18,17 +18,13 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ -/* Fix PR41260 by passing -no_compact_unwind on darwin10 and later until - unwinder in libSystem is fixed to digest new epilog unwinding notes. +/* Fix PR47558 by linking against libSystem ahead of libgcc_ext. */ - Fix PR47558 by linking against libSystem ahead of libgcc_ext. */ #undef LINK_GCC_C_SEQUENCE_SPEC #define LINK_GCC_C_SEQUENCE_SPEC \ -"%:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) \ - %{!static:%{!static-libgcc: \ - %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \ - %{fno-pic|fno-PIC|fno-pie|fno-PIE|fapple-kext|mkernel|static|mdynamic-no-pic: \ - %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) } %G %L" +"%{!static:%{!static-libgcc: \ + %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \ + %G %L" #undef DEF_MIN_OSX_VERSION #define DEF_MIN_OSX_VERSION "10.6" |