Darwin, D : Adjust the X spec to cater for duplicate use.

The '-X' flag is an obsolete spelling for a command to tell the
linker to 'strip local symbols'.  This has been the default action
for a long time - but, as per the usual GCC approach, although the
flag is retired, we have not removed it; rather, we just delete it
in the driver self-spec.

The D language adds this flag as a front end option (to emit json)
which means that deleting it in the driver disables that function
in D.

This patch works around the duplication by removing the unused flag
in the link_spec instead of the driver self-spec.

gcc/ChangeLog:

	* config/darwin.h: Remove unused 'X' specs in the link spec
	rather than driver self-specs.
This commit is contained in:
Iain Sandoe 2020-12-01 15:34:11 +00:00
parent efd1d4f8ae
commit 9c17474c1e

View File

@ -135,7 +135,7 @@ extern GTY(()) int darwin_ms_struct;
"%{shared:-Zdynamiclib} %<shared", \
"%{static:%{Zdynamic:%e conflicting code gen style switches are used}}",\
"%{y*:%nthe y option is obsolete and ignored} %<y*", \
"%<Mach %<X"
"%<Mach "
#if LD64_HAS_EXPORT_DYNAMIC
#define DARWIN_RDYNAMIC "%{rdynamic:-export_dynamic}"
@ -237,7 +237,7 @@ extern GTY(()) int darwin_ms_struct;
DARWIN_NOPIE_SPEC \
DARWIN_RDYNAMIC \
DARWIN_NOCOMPACT_UNWIND \
"}}}}}}} %<pie %<no-pie %<rdynamic "
"}}}}}}} %<pie %<no-pie %<rdynamic %<X "
#define DSYMUTIL "\ndsymutil"