Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1088)

Unified Diff: gcc/gcc/config/i386/sol2-10.h

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/config/i386/predicates.md ('k') | gcc/gcc/config/i386/sse.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/config/i386/sol2-10.h
diff --git a/gcc/gcc/config/i386/sol2-10.h b/gcc/gcc/config/i386/sol2-10.h
index 6e7f13d8f2681ec7d0a5583d7f71ed4eb5f89f12..c7fdec9a1a31bce6492819eb56e947fc4fd8e171 100644
--- a/gcc/gcc/config/i386/sol2-10.h
+++ b/gcc/gcc/config/i386/sol2-10.h
@@ -1,5 +1,6 @@
/* Solaris 10 configuration.
- Copyright (C) 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
This file is part of GCC.
@@ -50,6 +51,21 @@ along with GCC; see the file COPYING3. If not see
} while (0)
#endif
+/* As in sol2.h, override the default from i386/x86-64.h to work around
+ Sun as TLS bug. */
+#undef ASM_OUTPUT_ALIGNED_COMMON
+#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
+ do \
+ { \
+ if (TARGET_SUN_TLS \
+ && in_section \
+ && ((in_section->common.flags & (SECTION_TLS | SECTION_BSS)) \
+ == (SECTION_TLS | SECTION_BSS))) \
+ switch_to_section (bss_section); \
+ x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN); \
+ } \
+ while (0)
+
#undef NO_PROFILE_COUNTERS
#undef MCOUNT_NAME
@@ -104,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
@@ -118,7 +145,3 @@ along with GCC; see the file COPYING3. If not see
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION i386_solaris_elf_named_section
-
-#undef SUBTARGET_RETURN_IN_MEMORY
-#define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \
- ix86_sol10_return_in_memory (TYPE, FNTYPE)
« no previous file with comments | « gcc/gcc/config/i386/predicates.md ('k') | gcc/gcc/config/i386/sse.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698