| Submitter | Jack Howarth |
|---|---|
| Date | Sept. 14, 2010, 2:45 p.m. |
| Message ID | <20100914144536.GA10080@bromo.med.uc.edu> |
| Download | mbox | patch |
| Permalink | /patch/64705/ |
| State | New |
| Headers | show |
Comments
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.
Patch
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 + if [regexp "only weak aliases are supported" $lines] { + verbose "check_ifunc_available target supports only weak aliases" 2 + set ifunc_available_saved 1 + } else { + set ifunc_available_saved -1 + } } }
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 compiler exited with status 1 output is: ifunc94739.c:5:18: error: only weak aliases are supported in this configuration^M UNRESOLVED: gcc.dg/attr-ifunc-1.c UNSUPPORTED: gcc.dg/attr-ifunc-1.c UNRESOLVED: gcc.dg/attr-ifunc-2.c UNSUPPORTED: gcc.dg/attr-ifunc-2.c UNRESOLVED: gcc.dg/attr-ifunc-3.c UNSUPPORTED: gcc.dg/attr-ifunc-3.c UNRESOLVED: gcc.dg/attr-ifunc-4.c UNSUPPORTED: gcc.dg/attr-ifunc-4.c UNRESOLVED: gcc.dg/attr-ifunc-5.c UNSUPPORTED: gcc.dg/attr-ifunc-5.c This due to the fact that, unlike check_alias_available(), check_ifunc_available() doesn't handle the case of targets that support only weak aliases. Tested on x86_64-apple-darwin10. Okay for gcc trunk? Jack 2010-09-14 Jack Howarth <howarth@bromo.med.uc.edu> * lib/target-supports.exp (check_alias_available): Handle weak aliases only.