From 3027350e73e58ea1f808d6ce005044e58777692f Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Tue, 21 Oct 2008 12:47:18 -0400 Subject: [PATCH] config.gcc (powerpc-*): Make t-ppcgas imply usegas.h. 2008-10-21 Sandra Loosemore gcc/ * config.gcc (powerpc-*): Make t-ppcgas imply usegas.h. * config/svr4.h (SVR4_ASM_SPEC): New. (ASM_SPEC): Inherit from SVR4_ASM_SPEC. * config/rs6000/sysv4.h (ASM_SPEC): Inherit from SVR4_ASM_SPEC. * doc/invoke.texi (Option Summary): Add -T to linker options. (Link Options): Document -T. From-SVN: r141267 --- gcc/ChangeLog | 10 ++++++++++ gcc/config.gcc | 16 ++++++++-------- gcc/config/rs6000/sysv4.h | 6 +++--- gcc/config/svr4.h | 14 +++++++++++--- gcc/doc/invoke.texi | 10 +++++++++- 5 files changed, 41 insertions(+), 15 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index de16de058fe4..83cffdea1b9f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2008-10-21 Sandra Loosemore + + * config.gcc (powerpc-*): Make t-ppcgas imply usegas.h. + * config/svr4.h (SVR4_ASM_SPEC): New. + (ASM_SPEC): Inherit from SVR4_ASM_SPEC. + * config/rs6000/sysv4.h (ASM_SPEC): Inherit from SVR4_ASM_SPEC. + + * doc/invoke.texi (Option Summary): Add -T to linker options. + (Link Options): Document -T. + 2008-10-21 Jakub Jelinek * tree-inline.c (tree_inlinable_function_p): Remove tuples diff --git a/gcc/config.gcc b/gcc/config.gcc index c10e7f9fdacf..788e4351a9b6 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1777,12 +1777,12 @@ powerpc-*-eabisimaltivec*) tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm" ;; powerpc-*-eabisim*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h" + tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h" extra_options="${extra_options} rs6000/sysv4.opt" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" ;; powerpc-*-elf*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h" + tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h rs6000/sysv4.h" extra_options="${extra_options} rs6000/sysv4.opt" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" ;; @@ -1792,12 +1792,12 @@ powerpc-*-eabialtivec*) tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm" ;; powerpc-xilinx-eabi*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h" + tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h" extra_options="${extra_options} rs6000/sysv4.opt" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" ;; powerpc-*-eabi*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h" + tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h" extra_options="${extra_options} rs6000/sysv4.opt" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" ;; @@ -1885,22 +1885,22 @@ powerpc-*-lynxos*) gas=yes ;; powerpcle-*-elf*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h" + tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" extra_options="${extra_options} rs6000/sysv4.opt" ;; powerpcle-*-eabisim*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h" + tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" extra_options="${extra_options} rs6000/sysv4.opt" ;; powerpcle-*-eabi*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h" + tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" extra_options="${extra_options} rs6000/sysv4.opt" ;; powerpc-xilinx-eabi*) - tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h rs6000/xfpu.h" + tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h rs6000/xfpu.h" extra_options="${extra_options} rs6000/sysv4.opt" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm" ;; diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 8e309803cd92..6d8986242f57 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -585,9 +585,9 @@ extern int fixuplabelno; /* Override svr4.h definition. */ #undef ASM_SPEC #define ASM_SPEC "%(asm_cpu) \ -%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \ -%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ -%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \ +%{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \ +SVR4_ASM_SPEC \ +"%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \ %{memb|msdata|msdata=eabi: -memb} \ %{mlittle|mlittle-endian:-mlittle; \ mbig|mbig-endian :-mbig; \ diff --git a/gcc/config/svr4.h b/gcc/config/svr4.h index 9e348e0852b6..0082566b071e 100644 --- a/gcc/config/svr4.h +++ b/gcc/config/svr4.h @@ -55,7 +55,8 @@ along with GCC; see the file COPYING3. If not see && strcmp (STR, "Tdata") && strcmp (STR, "Ttext") \ && strcmp (STR, "Tbss")) -/* Provide an ASM_SPEC appropriate for svr4. Here we try to support as +/* Provide an ASM_SPEC appropriate for svr4. + If we're not using GAS, we try to support as many of the specialized svr4 assembler options as seems reasonable, given that there are certain options which we can't (or shouldn't) support directly due to the fact that they conflict with other options @@ -74,9 +75,16 @@ along with GCC; see the file COPYING3. If not see read its stdin. */ -#undef ASM_SPEC -#define ASM_SPEC \ +#ifdef USE_GAS +#define SVR4_ASM_SPEC \ + "%{v:-V} %{Wa,*:%*}" +#else +#define SVR4_ASM_SPEC \ "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}" +#endif + +#undef ASM_SPEC +#define ASM_SPEC SVR4_ASM_SPEC #define AS_NEEDS_DASH_FOR_PIPED_INPUT diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index c05ced46d400..7319b90dca15 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -406,7 +406,7 @@ Objective-C and Objective-C++ Dialects}. @gccoptlist{@var{object-file-name} -l@var{library} @gol -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol -s -static -static-libgcc -shared -shared-libgcc -symbolic @gol --Wl,@var{option} -Xlinker @var{option} @gol +-T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol -u @var{symbol}} @item Directory Options @@ -7857,6 +7857,14 @@ about any unresolved references (unless overridden by the link editor option @samp{-Xlinker -z -Xlinker defs}). Only a few systems support this option. +@item -T @var{script} +@opindex T +@cindex linker script +Use @var{script} as the linker script. This option is supported by most +systems using the GNU linker. On some targets, such as bare-board +targets without an operating system, the @option{-T} option may be required +when linking to avoid references to undefined symbols. + @item -Xlinker @var{option} @opindex Xlinker Pass @var{option} as an option to the linker. You can use this to