public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][Revisedx2] eliminate UNRESOLVED errors on attr-ifunc-[1,5].c/attr-ifunc-[1,4].C
@ 2010-09-24 15:05 Jack Howarth
  2010-09-27  9:14 ` Nathan Sidwell
  2010-09-30  5:50 ` Nathan Sidwell
  0 siblings, 2 replies; 4+ messages in thread
From: Jack Howarth @ 2010-09-24 15:05 UTC (permalink / raw)
  To: dot, guenther, gcc-patches; +Cc: nathan, mikestump, richard

   Currently on targets like darwin which lack alias support in their object file
format, the ifunc test case gcc.dg/attr-ifunc-1.c erroneously reports as UNRESOLVED.
This is due to the fact that assemble_alias() is called before the error can be
emiited in do_assemble_alias(). Thus an inappropriate error message is given. The
attached patch resolves this by checking for the ifunc attribute and emitting the
correct error message in assemble_alias. Bootstrap and regression tested on
x86_64-apple-darwin10. Okay for gcc trunk?
                          Jack


2010-09-23  Jack Howarth <howarth@bromo.med.uc.edu>

	* gcc/varasm.c (assemble_alias): Add error message for unsupported ifunc.

Index: gcc/varasm.c
===================================================================
--- gcc/varasm.c	(revision 164573)
+++ gcc/varasm.c	(working copy)
@@ -5535,8 +5535,12 @@
 # else
       if (!DECL_WEAK (decl))
 	{
-	  error_at (DECL_SOURCE_LOCATION (decl),
-		    "only weak aliases are supported in this configuration");
+	  if (lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)))
+	    error_at (DECL_SOURCE_LOCATION (decl),
+		      "ifunc is not supported in this configuration");
+	  else	
+	    error_at (DECL_SOURCE_LOCATION (decl),
+		      "only weak aliases are supported in this configuration");
 	  return;
 	}
 # endif

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][Revisedx2] eliminate UNRESOLVED errors on attr-ifunc-[1,5].c/attr-ifunc-[1,4].C
  2010-09-24 15:05 [PATCH][Revisedx2] eliminate UNRESOLVED errors on attr-ifunc-[1,5].c/attr-ifunc-[1,4].C Jack Howarth
@ 2010-09-27  9:14 ` Nathan Sidwell
  2010-09-27 10:17   ` Mike Stump
  2010-09-30  5:50 ` Nathan Sidwell
  1 sibling, 1 reply; 4+ messages in thread
From: Nathan Sidwell @ 2010-09-27  9:14 UTC (permalink / raw)
  To: Jack Howarth; +Cc: dot, guenther, gcc-patches, mikestump, richard

On 09/24/10 01:35, Jack Howarth wrote:
>     Currently on targets like darwin which lack alias support in their object file
> format, the ifunc test case gcc.dg/attr-ifunc-1.c erroneously reports as UNRESOLVED.
> This is due to the fact that assemble_alias() is called before the error can be
> emiited in do_assemble_alias(). Thus an inappropriate error message is given. The
> attached patch resolves this by checking for the ifunc attribute and emitting the
> correct error message in assemble_alias. Bootstrap and regression tested on
> x86_64-apple-darwin10. Okay for gcc trunk?

this seems sensible, unfortunately I cannot approve it.


nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][Revisedx2] eliminate UNRESOLVED errors on attr-ifunc-[1,5].c/attr-ifunc-[1,4].C
  2010-09-27  9:14 ` Nathan Sidwell
@ 2010-09-27 10:17   ` Mike Stump
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Stump @ 2010-09-27 10:17 UTC (permalink / raw)
  To: Jack Howarth; +Cc: gcc-patches Patches

On Sep 26, 2010, at 10:53 AM, Nathan Sidwell wrote:
> On 09/24/10 01:35, Jack Howarth wrote:
>>    Currently on targets like darwin which lack alias support in their object file
>> format, the ifunc test case gcc.dg/attr-ifunc-1.c erroneously reports as UNRESOLVED.
>> This is due to the fact that assemble_alias() is called before the error can be
>> emiited in do_assemble_alias(). Thus an inappropriate error message is given. The
>> attached patch resolves this by checking for the ifunc attribute and emitting the
>> correct error message in assemble_alias. Bootstrap and regression tested on
>> x86_64-apple-darwin10. Okay for gcc trunk?
> 
> this seems sensible, unfortunately I cannot approve it.

I likewise, want an ifunc person to review approve it.  The darwin aspects of it look fine to me.

Hey, I had a random though, can we delay codegen using lto so that we can support more codegen things, like aliases, elf style weaks and ifunc on darwin?  That'd be a curious way to gain more compatibility...  [ this is just a wild thought, don't laugh at me :-) ]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][Revisedx2] eliminate UNRESOLVED errors on attr-ifunc-[1,5].c/attr-ifunc-[1,4].C
  2010-09-24 15:05 [PATCH][Revisedx2] eliminate UNRESOLVED errors on attr-ifunc-[1,5].c/attr-ifunc-[1,4].C Jack Howarth
  2010-09-27  9:14 ` Nathan Sidwell
@ 2010-09-30  5:50 ` Nathan Sidwell
  1 sibling, 0 replies; 4+ messages in thread
From: Nathan Sidwell @ 2010-09-30  5:50 UTC (permalink / raw)
  To: Jack Howarth; +Cc: dot, guenther, gcc-patches, mikestump, richard

On 09/24/10 01:35, Jack Howarth wrote:
> 2010-09-23  Jack Howarth<howarth@bromo.med.uc.edu>
>
> 	* gcc/varasm.c (assemble_alias): Add error message for unsupported ifunc.

I have committed this patch, after rth approved it off list.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-29 17:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-24 15:05 [PATCH][Revisedx2] eliminate UNRESOLVED errors on attr-ifunc-[1,5].c/attr-ifunc-[1,4].C Jack Howarth
2010-09-27  9:14 ` Nathan Sidwell
2010-09-27 10:17   ` Mike Stump
2010-09-30  5:50 ` Nathan Sidwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).