aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-07-19 20:10:33 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-07-19 20:10:33 +0000
commitdb67ea0f935148714d465defe743533715b735a4 (patch)
treebaf2396249f4dda69ca982bf5df5caa4b1516bee /gcc
parent1acf0246c8778feb2ad0056029991f90f9d48b57 (diff)
downloadgcc-db67ea0f935148714d465defe743533715b735a4.zip
gcc-db67ea0f935148714d465defe743533715b735a4.tar.gz
gcc-db67ea0f935148714d465defe743533715b735a4.tar.bz2
[Darwin] More specs TLC.
This strips out a few driver specs that are only specifying a default state. Also warn on an option now ignored, and add some comments to the driver specs section. 2019-07-19 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.h (DRIVER_SELF_SPECS): Ignore X and Mach specs which refer to default conditions. Warn for the 'y' spec which is ignored by current linkers. From-SVN: r273608
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/darwin.h28
2 files changed, 24 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a9c2450..f37e270 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-07-19 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.h (DRIVER_SELF_SPECS): Ignore X and Mach specs which
+ refer to default conditions. Warn for the 'y' spec which is ignored
+ by current linkers.
+
2019-07-19 Bill Seurer <seurer@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (builtin_description, cpu_is_info,
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index e17bc64..ed87984 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -118,13 +118,23 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* True if pragma ms_struct is in effect. */
extern GTY(()) int darwin_ms_struct;
-#define DRIVER_SELF_SPECS \
- "%{gfull:-g -fno-eliminate-unused-debug-symbols} %<gfull", \
- "%{gused:-g -feliminate-unused-debug-symbols} %<gused", \
- "%{fapple-kext|mkernel:-static}", \
- "%{shared:-Zdynamiclib} %<shared", \
- "%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform} \
- %<gsplit-dwarf"
+/* The majority of Darwin's special driver opts are direct access to ld flags
+ (to save the user typing -Wl,xxxxx or Xlinker xxxxx) but we can't process
+ them here, since doing so will make it appear that there are linker infiles
+ and the linker will invoked even when it is not necessary.
+
+ However, a few can be handled and we can elide options that are silently-
+ ignored defaults, plus warn on obsolete ones that no longer function. */
+#define DRIVER_SELF_SPECS \
+"%{fapple-kext|mkernel:-static}", \
+"%{gfull:-g -fno-eliminate-unused-debug-symbols} %<gfull", \
+"%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform} \
+ %<gsplit-dwarf", \
+"%{gused:-g -feliminate-unused-debug-symbols} %<gused", \
+"%{shared:-Zdynamiclib} %<shared", \
+"%{static:%{Zdynamic:%e conflicting code gen style switches are used}}",\
+"%{y*:%nthe y option is obsolete and ignored} %<y*", \
+"%<Mach %<X"
#if LD64_HAS_EXPORT_DYNAMIC
#define DARWIN_RDYNAMIC "%{rdynamic:-export_dynamic}"
@@ -342,13 +352,11 @@ extern GTY(()) int darwin_ms_struct;
%{Zunexported_symbols_list*:-unexported_symbols_list %*} \
%{Zweak_reference_mismatches*:-weak_reference_mismatches %*} \
%{!Zweak_reference_mismatches*:-weak_reference_mismatches non-weak} \
- %{X} \
- %{y*} \
%{w} \
%{pagezero_size*} %{segs_read_*} %{seglinkedit} %{noseglinkedit} \
%{sectalign*} %{sectobjectsymbols*} %{segcreate*} %{whyload} \
%{whatsloaded} %{dylinker_install_name*} \
- %{dylinker} %{Mach} "
+ %{dylinker} "
/* Machine dependent libraries. */