]> gcc.gnu.org Git - gcc.git/commitdiff
sol2.h (ASM_SPEC): Split into ...
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 7 Jul 2011 08:52:48 +0000 (08:52 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Thu, 7 Jul 2011 08:52:48 +0000 (08:52 +0000)
* config/sol2.h (ASM_SPEC): Split into ...
(ASM_SPEC_BASE, ASM_PIC_SPEC): ... this.
* config/i386/sol2.h (ASM_SPEC): Define using ASM_SPEC_BASE.
* config/i386/sol2-bi.h (ASM_CPU_SPEC): Redefine.
(ASM_SPEC): Use ASM_SPEC_BASE.
* config/sparc/sol2.h (ASM_SPEC): Redefine.

From-SVN: r175957

gcc/ChangeLog
gcc/config/i386/sol2-bi.h
gcc/config/i386/sol2.h
gcc/config/sol2.h
gcc/config/sparc/sol2.h

index 8429d5c6064ce00308c6a18cca777ec38aa9c501..ad790d3844d0e5b62fcdf8cdadc3b2ba1f5aca4a 100644 (file)
@@ -1,3 +1,12 @@
+2011-07-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * config/sol2.h (ASM_SPEC): Split into ...
+       (ASM_SPEC_BASE, ASM_PIC_SPEC): ... this.
+       * config/i386/sol2.h (ASM_SPEC): Define using ASM_SPEC_BASE.
+       * config/i386/sol2-bi.h (ASM_CPU_SPEC): Redefine.
+       (ASM_SPEC): Use ASM_SPEC_BASE.
+       * config/sparc/sol2.h (ASM_SPEC): Redefine.
+
 2011-07-07  Georg-Johann Lay  <avr@gjlay.de>
        
        * config/avr/avr.md (*reload_insi): Change predicate #1 to
index 394ca580884918dc426e914fa92ce041c6cbc200..a988fa00b93b1fcdeee36db13803029afb40924b 100644 (file)
@@ -31,15 +31,19 @@ along with GCC; see the file COPYING3.  If not see
 
 /* GNU as understands --32 and --64, but the native Solaris
    assembler requires -xarch=generic or -xarch=generic64 instead.  */
-#undef ASM_SPEC
+#undef ASM_CPU_SPEC
 #ifdef USE_GAS
-#define ASM_SPEC "%{m32:--32} %{m64:--64} -s %(asm_cpu)"
+#define ASM_CPU_SPEC "%{m32:--32} %{m64:--64}"
 #else
-#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} " \
-                "%{m32:-xarch=generic} %{m64:-xarch=generic64} " \
-                "-s %(asm_cpu)"
+#define ASM_CPU_SPEC "%{m32:-xarch=generic} %{m64:-xarch=generic64}"
 #endif
 
+/* Don't let i386/x86-64.h override i386/sol2.h version.  Still cannot use
+   -K PIC with the Solaris 10+ assembler, it gives many warnings:
+       Absolute relocation is used for symbol "<symbol>"  */
+#undef ASM_SPEC
+#define ASM_SPEC ASM_SPEC_BASE
+
 /* We do not need to search a special directory for startup files.  */
 #undef MD_STARTFILE_PREFIX
 
index f5e5c762612202c4da30a8d566b97f5f115f1e58..593e256c164d6eaab2857b52281505d671ea26b9 100644 (file)
@@ -61,12 +61,12 @@ along with GCC; see the file COPYING3.  If not see
 
 #define ASM_CPU_SPEC ""
  
-/* Removed -K PIC from generic sol2.h ASM_SPEC: the Solaris 8 and 9 assembler
-   gives many warnings: R_386_32 relocation is used for symbol ".text", and
+/* Don't include ASM_PIC_SPEC.  While the Solaris 8 and 9 assembler accepts
+   -K PIC, it gives many warnings:
+       R_386_32 relocation is used for symbol "<symbol>"
    GNU as doesn't recognize -K at all.  */
-/* FIXME: Perhaps split between common and CPU-specific parts?  */
 #undef ASM_SPEC
-#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} -s %(asm_cpu)"
+#define ASM_SPEC ASM_SPEC_BASE
 
 #define SUBTARGET_CPU_EXTRA_SPECS \
   { "cpp_subtarget",    CPP_SUBTARGET_SPEC },          \
index d9c1fc99a40a14fd2999d7b3ebcbc33d48cdebd9..3867c7dd2453e6f6709b7acc879f90d37e7ce3de 100644 (file)
@@ -99,13 +99,12 @@ along with GCC; see the file COPYING3.  If not see
        TARGET_SUB_OS_CPP_BUILTINS();                   \
     } while (0)
 
-/* It's safe to pass -s always, even if -g is not used.  */
-#undef ASM_SPEC
-#define ASM_SPEC "\
-%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} -s \
-%{fpic|fpie|fPIC|fPIE:-K PIC} \
-%(asm_cpu) \
-"
+/* It's safe to pass -s always, even if -g is not used.  Those options are
+   handled by both Sun as and GNU as.  */
+#define ASM_SPEC_BASE \
+"%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} -s %(asm_cpu)"
+
+#define ASM_PIC_SPEC " %{fpic|fpie|fPIC|fPIE:-K PIC}"
 
 #undef LIB_SPEC
 #define LIB_SPEC \
index 24c7ade0177a48147f1c1fbd0f2920fedc831be2..392b171be8d85e25c2200ec4000ecbdccfb94e94 100644 (file)
@@ -120,6 +120,10 @@ along with GCC; see the file COPYING3.  If not see
 #define ASM_CPU_DEFAULT_SPEC ASM_CPU32_DEFAULT_SPEC
 #endif
 
+/* Both Sun as and GNU as understand -K PIC.  */
+#undef ASM_SPEC
+#define ASM_SPEC ASM_SPEC_BASE ASM_PIC_SPEC
+
 #undef CPP_CPU_SPEC
 #define CPP_CPU_SPEC "\
 %{mcpu=sparclet|mcpu=tsc701:-D__sparclet__} \
This page took 0.085816 seconds and 5 git commands to generate.