This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix libgomp failures with -g on SPARC/Solaris
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 22 Nov 2008 13:49:40 +0100
- Subject: Fix libgomp failures with -g on SPARC/Solaris
This is a follow up fix for PR debug/21889. The latter fix is not sufficient
when you use GNU as + Sun ld because the Sun linker cannot grok unaligned
R_SPARC_TLS_DTPOFF{32,64} relocations.
Fixed by additionally conditionalizing TARGET_ASM_OUTPUT_DWARF_DTPREL on
HAVE_AS_SPARC_UA_PCREL. It's a little bit of a stretch, but writing yet
another configure test would seem overkill to me.
Tested on sparc-sun-solaris2.10, applied to all active branches.
2008-11-22 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.c (TARGET_ASM_OUTPUT_DWARF_DTPREL): Define
only if HAVE_AS_SPARC_UA_PCREL is defined.
--
Eric Botcazou
Index: config/sparc/sparc.c
===================================================================
--- config/sparc/sparc.c (revision 142117)
+++ config/sparc/sparc.c (working copy)
@@ -575,7 +575,7 @@ static bool fpu_option_set = false;
#undef TARGET_HANDLE_OPTION
#define TARGET_HANDLE_OPTION sparc_handle_option
-#if TARGET_GNU_TLS
+#if TARGET_GNU_TLS && defined(HAVE_AS_SPARC_UA_PCREL)
#undef TARGET_ASM_OUTPUT_DWARF_DTPREL
#define TARGET_ASM_OUTPUT_DWARF_DTPREL sparc_output_dwarf_dtprel
#endif