This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix Solaris misdetection of alias support


This patch fixes the problem Eric reported whereby we don't correctly
detect that Solaris supports "__attribute__((alias))".

Tested on sparc-sun-solaris2.9 and i686-pc-linux-gnu and applied on
the mainline.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2003-06-20  Mark Mitchell  <mark@codesourcery.com>

	* lib/target-supports.exp (check_alias_available): Make the test
	program acceptable to the Solaris assembler.

Index: target-supports.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/target-supports.exp,v
retrieving revision 1.6
diff -c -5 -p -r1.6 target-supports.exp
*** target-supports.exp	9 Jun 2003 15:33:36 -0000	1.6
--- target-supports.exp	20 Jun 2003 19:10:06 -0000
*************** proc check_alias_available { } {
*** 79,89 ****
      if [info exists alias_available_saved] {
          verbose "check_alias_available  returning saved $alias_available_saved" 2
      } else {
          verbose "check_alias_available  compiling testfile" 2
  	set f [open "tmp.c" "w"]
! 	puts $f "void f() __attribute__((alias(\"g\")));"
  	close $f
  	set lines [gcc_target_compile "tmp.c" "tmp.o" object ""]
  	file delete "tmp.c"
  
  	if [string match "" $lines] then {
--- 79,92 ----
      if [info exists alias_available_saved] {
          verbose "check_alias_available  returning saved $alias_available_saved" 2
      } else {
          verbose "check_alias_available  compiling testfile" 2
  	set f [open "tmp.c" "w"]
! 	# Compile a small test program.  The definition of "g" is
! 	# necessary to keep the Solaris assembler from complaining
! 	# about the program.
! 	puts $f "void g() {} void f() __attribute__((alias(\"g\")));"
  	close $f
  	set lines [gcc_target_compile "tmp.c" "tmp.o" object ""]
  	file delete "tmp.c"
  
  	if [string match "" $lines] then {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]