]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2008-10-21 Sandra Loosemore <sandra@codesourcery.com>
authorsandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Oct 2008 16:47:18 +0000 (16:47 +0000)
committersandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Oct 2008 16:47:18 +0000 (16:47 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141267 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/rs6000/sysv4.h
gcc/config/svr4.h
gcc/doc/invoke.texi

index de16de058fe4f1ab3387ed441ba12ea1185675fa..83cffdea1b9f05b919222c8a338b5ae97e2f5c4c 100644 (file)
@@ -1,3 +1,13 @@
+2008-10-21  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * 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  <jakub@redhat.com>
 
        * tree-inline.c (tree_inlinable_function_p): Remove tuples
index c10e7f9fdacf00226eda946967872c2768f11294..788e4351a9b69131a7a816dc0f46db90b136066a 100644 (file)
@@ -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"
        ;;
index 8e309803cd920e5e6fc1b85996ebb65820a719d6..6d8986242f57e95323b097e006d8aa81dd78b1ff 100644 (file)
@@ -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;    \
index 9e348e0852b67fb84caedb5fc8b660da5eff35b8..0082566b071ef1dfc11c62892affe208edc26441 100644 (file)
@@ -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
 
index c05ced46d4002599180685218496dcead773ea3c..7319b90dca15d0e9a9009f325451ddd0714e0fcb 100644 (file)
@@ -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