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]

Re: [PATCH][Revised] eliminate UNRESOLVED errors on attr-ifunc-[1,5].c/attr-ifunc-[1,4].C


Hi,

On Tue, 14 Sep 2010, Jack Howarth wrote:

>    Currently on targets like darwin which lack alias support in their
> object format, the gcc.dg/attr-ifunc-[1,5].c and g++.dg/ext/attr-ifunc-[1,4].C
> test cases produce UNRESOLVED testsuite results...
> 
> Executing on host: /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/  -c  -m32 -o if
> unc94739.o ifunc94739.c    (timeout = 300)
> ifunc94739.c:5:18: error: only weak aliases are supported in this configuration^M

This doesn't make sense.  The test-program that target-supports.exp uses 
looks like so:
------------------------------
#ifdef __cplusplus
extern "C"
#endif
void g() {} void f() __attribute__((ifunc("g")));
------------------------------

No aliases are used in the source, hence the error message really 
should have been "ifunc is not supported".  Now, even if that remains 
unfixed it still means that ifunc support is not available, right (or does 
darwin in fact support the ifunc mechanism?).  Which means that instead of 
returning '-1' (meaning that the state can't be determined) or '1'/'2'
(meaning that ifunc is supported) you have to return 0.

> Index: gcc/testsuite/lib/target-supports.exp
> ===================================================================
> --- gcc/testsuite/lib/target-supports.exp	(revision 164258)
> +++ gcc/testsuite/lib/target-supports.exp	(working copy)
> @@ -408,7 +408,12 @@
>  		verbose "check_ifunc_available  target does not support ifunc" 2
>  		set ifunc_available_saved 0
>  	    } else {
> -		set ifunc_available_saved -1

So this should probably be just 0, merged with the test before, and 
therefore then not differ at all between only weak aliases being supported 
or not, because this whole predicate is about ifunc support, not aliases.


Ciao,
Michael.


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