This is the mail archive of the 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: gcj shouldn't use hidden visibility if unsupported (PR target/32462, libgcj/32465)

As described in PR target/32462, gcj currently uses visibility(hidden)
unconditionally, even if the target doesn't support it.  This breaks
linking both the 32 and 64 bit on Solaris 10/x86 with gas and
the Sun ld.

The following patch fixes this:

Thu Jul 12 14:48:07 2007  Andrew Haley  <>
			  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	PR target/32462
	PR libgcj/32465
	* class.c (hide): Wrap in HAVE_GAS_HIDDEN.

Index: gcc/java/class.c
--- gcc/java/class.c	(revision 126588)
+++ gcc/java/class.c	(working copy)
@@ -691,10 +691,12 @@ build_java_method_type (tree fntype, tre
 static void
-hide (tree decl)
+hide (tree decl ATTRIBUTE_UNUSED)

I've already successfully run a C, C++, Java bootstrap of rev. 123476 with
this patch added, where linked successfully.  A full bootstrap on
i386-pc-solaris2.10 is in progress.

Ok if it passes?

As mentioned by Andrew Pinski in the PR, it may be necessary to somehow
test for Darwin as well; if so, I'd need someone to test a modified patch.


Rainer Orth, Faculty of Technology, Bielefeld University

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