diff options
Diffstat (limited to 'gcc/config/i386/sol2-10.h')
-rw-r--r-- | gcc/config/i386/sol2-10.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/config/i386/sol2-10.h b/gcc/config/i386/sol2-10.h index 1cd28970114..d57ed7f9d69 100644 --- a/gcc/config/i386/sol2-10.h +++ b/gcc/config/i386/sol2-10.h @@ -120,7 +120,18 @@ along with GCC; see the file COPYING3. If not see #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE #ifdef TARGET_GNU_LD -#define TARGET_LD_EMULATION "%{m64:-m elf_x86_64}%{!m64:-m elf_i386} " +/* Since binutils 2.21, GNU ld supports new *_sol2 emulations to strictly + follow the Solaris 2 ABI. Prefer them if present. */ +#ifdef HAVE_LD_SOL2_EMULATION +#define I386_EMULATION "elf_i386_sol2" +#define X86_64_EMULATION "elf_x86_64_sol2" +#else +#define I386_EMULATION "elf_i386" +#define X86_64_EMULATION "elf_x86_64" +#endif + +#define TARGET_LD_EMULATION "%{m64:-m " X86_64_EMULATION "}" \ + "%{!m64:-m " I386_EMULATION "} " #else #define TARGET_LD_EMULATION "" #endif |