Commit 20804d96 by Rainer Orth Committed by Rainer Orth

Properly set progbits/nobits for Solaris/SPARC as

	* configure.ac (HAVE_AS_SPARC_NOBITS): New test.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section): Emit
	#nobits/#progbits if supported.

From-SVN: r195572
parent 6690cb20
2013-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (HAVE_AS_SPARC_NOBITS): New test.
* configure: Regenerate.
* config.in: Regenerate.
* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section): Emit
#nobits/#progbits if supported.
2013-01-29 Oleg Endo <olegendo@gcc.gnu.org> 2013-01-29 Oleg Endo <olegendo@gcc.gnu.org>
PR target/56121 PR target/56121
......
...@@ -199,12 +199,6 @@ ...@@ -199,12 +199,6 @@
#endif #endif
/* Define if the zone collector is in use */
#ifndef USED_FOR_TARGET
#undef GGC_ZONE
#endif
/* mcontext_t fields start with __ */ /* mcontext_t fields start with __ */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef HAS_MCONTEXT_T_UNDERSCORES #undef HAS_MCONTEXT_T_UNDERSCORES
...@@ -266,12 +260,6 @@ ...@@ -266,12 +260,6 @@
#endif #endif
/* Define if your assembler supports SPARC4 instructions. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_SPARC4
#endif
/* Define if your assembler supports fprnd. */ /* Define if your assembler supports fprnd. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef HAVE_AS_FPRND #undef HAVE_AS_FPRND
...@@ -477,12 +465,24 @@ ...@@ -477,12 +465,24 @@
#endif #endif
/* Define if your assembler supports SPARC4 instructions. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_SPARC4
#endif
/* Define if your assembler and linker support GOTDATA_OP relocs. */ /* Define if your assembler and linker support GOTDATA_OP relocs. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef HAVE_AS_SPARC_GOTDATA_OP #undef HAVE_AS_SPARC_GOTDATA_OP
#endif #endif
/* Define to 1 if your assembler supports #nobits, 0 otherwise. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_SPARC_NOBITS
#endif
/* Define if your assembler and linker support unaligned PC relative relocs. /* Define if your assembler and linker support unaligned PC relative relocs.
*/ */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
...@@ -1228,7 +1228,7 @@ ...@@ -1228,7 +1228,7 @@
#endif #endif
/* Define if your PowerPC64 linker supports a large TOC. */ /* Define if your AIX linker supports a large TOC. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef HAVE_LD_LARGE_TOC #undef HAVE_LD_LARGE_TOC
#endif #endif
......
...@@ -9512,7 +9512,14 @@ sparc_solaris_elf_asm_named_section (const char *name, unsigned int flags, ...@@ -9512,7 +9512,14 @@ sparc_solaris_elf_asm_named_section (const char *name, unsigned int flags,
if (flags & SECTION_CODE) if (flags & SECTION_CODE)
fputs (",#execinstr", asm_out_file); fputs (",#execinstr", asm_out_file);
/* ??? Handle SECTION_BSS. */ /* Sun as only supports #nobits/#progbits since Solaris 10. */
if (HAVE_AS_SPARC_NOBITS)
{
if (flags & SECTION_BSS)
fputs (",#nobits", asm_out_file);
else
fputs (",#progbits", asm_out_file);
}
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
} }
......
...@@ -23927,6 +23927,39 @@ $as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h ...@@ -23927,6 +23927,39 @@ $as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for #nobits" >&5
$as_echo_n "checking assembler for #nobits... " >&6; }
if test "${gcc_cv_as_sparc_nobits+set}" = set; then :
$as_echo_n "(cached) " >&6
else
gcc_cv_as_sparc_nobits=no
if test x$gcc_cv_as != x; then
$as_echo '.section "nobits",#alloc,#write,#nobits
.section "progbits",#alloc,#write,#progbits' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then
gcc_cv_as_sparc_nobits=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_nobits" >&5
$as_echo "$gcc_cv_as_sparc_nobits" >&6; }
cat >>confdefs.h <<_ACEOF
#define HAVE_AS_SPARC_NOBITS `if test $gcc_cv_as_sparc_nobits = yes; then echo 1; else echo 0; fi`
_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5
$as_echo_n "checking assembler for -relax option... " >&6; } $as_echo_n "checking assembler for -relax option... " >&6; }
if test "${gcc_cv_as_sparc_relax+set}" = set; then : if test "${gcc_cv_as_sparc_relax+set}" = set; then :
......
...@@ -3467,6 +3467,13 @@ case "$target" in ...@@ -3467,6 +3467,13 @@ case "$target" in
[AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1, [AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
[Define if your assembler supports .register.])]) [Define if your assembler supports .register.])])
gcc_GAS_CHECK_FEATURE([@%:@nobits], gcc_cv_as_sparc_nobits,,,
[.section "nobits",#alloc,#write,#nobits
.section "progbits",#alloc,#write,#progbits])
AC_DEFINE_UNQUOTED(HAVE_AS_SPARC_NOBITS,
[`if test $gcc_cv_as_sparc_nobits = yes; then echo 1; else echo 0; fi`],
[Define to 1 if your assembler supports #nobits, 0 otherwise.])
gcc_GAS_CHECK_FEATURE([-relax option], gcc_cv_as_sparc_relax,, gcc_GAS_CHECK_FEATURE([-relax option], gcc_cv_as_sparc_relax,,
[-relax], [.text],, [-relax], [.text],,
[AC_DEFINE(HAVE_AS_RELAX_OPTION, 1, [AC_DEFINE(HAVE_AS_RELAX_OPTION, 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment