diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/host-solaris.c | 2 | ||||
-rw-r--r-- | gcc/config/i386/sol2-bi.h | 13 | ||||
-rw-r--r-- | gcc/config/i386/sol2.h | 5 | ||||
-rw-r--r-- | gcc/config/sol2-bi.h | 18 | ||||
-rw-r--r-- | gcc/config/sparc/sol2.h | 10 |
5 files changed, 30 insertions, 18 deletions
diff --git a/gcc/config/host-solaris.c b/gcc/config/host-solaris.c index 12eab3c61b8..15f1d782e95 100644 --- a/gcc/config/host-solaris.c +++ b/gcc/config/host-solaris.c @@ -73,7 +73,7 @@ mmap_fixed (void *addr, size_t len, int prot, int flags, int fd, off_t off) #elif defined(__sparc__) # define TRY_EMPTY_VM_SPACE 0x80000000 #elif defined(__x86_64__) -# define TRY_EMPTY_VM_SPACE 0x8000000000000000 +# define TRY_EMPTY_VM_SPACE 0x80000000000 #elif defined(__i386__) # define TRY_EMPTY_VM_SPACE 0xB0000000 #else diff --git a/gcc/config/i386/sol2-bi.h b/gcc/config/i386/sol2-bi.h index a988fa00b93..04feeb907ae 100644 --- a/gcc/config/i386/sol2-bi.h +++ b/gcc/config/i386/sol2-bi.h @@ -31,13 +31,17 @@ 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_CPU_SPEC #ifdef USE_GAS -#define ASM_CPU_SPEC "%{m32:--32} %{m64:--64}" +#define ASM_CPU32_DEFAULT_SPEC "--32" +#define ASM_CPU64_DEFAULT_SPEC "--64" #else -#define ASM_CPU_SPEC "%{m32:-xarch=generic} %{m64:-xarch=generic64}" +#define ASM_CPU32_DEFAULT_SPEC "-xarch=generic" +#define ASM_CPU64_DEFAULT_SPEC "-xarch=generic64" #endif +#undef ASM_CPU_SPEC +#define ASM_CPU_SPEC "%(asm_cpu_default)" + /* 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>" */ @@ -47,8 +51,7 @@ along with GCC; see the file COPYING3. If not see /* We do not need to search a special directory for startup files. */ #undef MD_STARTFILE_PREFIX -/* No 64-bit default configurations. */ -#define DEFAULT_ARCH32_P 1 +#define DEFAULT_ARCH32_P !TARGET_64BIT_DEFAULT #define ARCH64_SUBDIR "amd64" diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index 593e256c164..5b4e3d78f58 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -59,6 +59,8 @@ along with GCC; see the file COPYING3. If not see #undef CPP_SPEC #define CPP_SPEC "%{,assembler-with-cpp:-P} %(cpp_subtarget)" +#define ASM_CPU_DEFAULT_SPEC "" + #define ASM_CPU_SPEC "" /* Don't include ASM_PIC_SPEC. While the Solaris 8 and 9 assembler accepts @@ -70,7 +72,8 @@ along with GCC; see the file COPYING3. If not see #define SUBTARGET_CPU_EXTRA_SPECS \ { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \ - { "asm_cpu", ASM_CPU_SPEC } + { "asm_cpu", ASM_CPU_SPEC }, \ + { "asm_cpu_default", ASM_CPU_DEFAULT_SPEC }, \ #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ diff --git a/gcc/config/sol2-bi.h b/gcc/config/sol2-bi.h index 371cdd6df41..5e41efd81d4 100644 --- a/gcc/config/sol2-bi.h +++ b/gcc/config/sol2-bi.h @@ -56,6 +56,16 @@ #define DEF_ARCH64_SPEC(__str) "%{!m32:" __str "}" #endif +#undef ASM_CPU_DEFAULT_SPEC +#define ASM_CPU_DEFAULT_SPEC \ +(DEFAULT_ARCH32_P ? "\ +%{m64:" ASM_CPU64_DEFAULT_SPEC "} \ +%{!m64:" ASM_CPU32_DEFAULT_SPEC "} \ +" : "\ +%{m32:" ASM_CPU32_DEFAULT_SPEC "} \ +%{!m32:" ASM_CPU64_DEFAULT_SPEC "} \ +") + /* This should be the same as LINK_ARCH32_SPEC_BASE, except with ARCH64_SUBDIR appended to the paths and /usr/ccs/lib is no longer necessary. */ @@ -78,8 +88,14 @@ #endif #ifdef USE_GLD +#if DEFAULT_ARCH32_P +#define ARCH_DEFAULT_EMULATION ARCH32_EMULATION +#else +#define ARCH_DEFAULT_EMULATION ARCH64_EMULATION +#endif #define TARGET_LD_EMULATION "%{m32:-m " ARCH32_EMULATION "}" \ - "%{m64:-m " ARCH64_EMULATION "} " + "%{m64:-m " ARCH64_EMULATION "}" \ + "%{!m32:%{!m64:-m " ARCH_DEFAULT_EMULATION "}} " #else #define TARGET_LD_EMULATION "" #endif diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index 392b171be8d..6661c21945c 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -205,16 +205,6 @@ along with GCC; see the file COPYING3. If not see %{!mcpu*:%(asm_cpu_default)} \ " -#undef ASM_CPU_DEFAULT_SPEC -#define ASM_CPU_DEFAULT_SPEC \ -(DEFAULT_ARCH32_P ? "\ -%{m64:" ASM_CPU64_DEFAULT_SPEC "} \ -%{!m64:" ASM_CPU32_DEFAULT_SPEC "} \ -" : "\ -%{m32:" ASM_CPU32_DEFAULT_SPEC "} \ -%{!m32:" ASM_CPU64_DEFAULT_SPEC "} \ -") - #undef ASM_ARCH32_SPEC #define ASM_ARCH32_SPEC "" |