Message ID | yddfwy172n8.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes: > The latest patch 119961-07 for the Solaris 10/x86 assembler added AVX > support. When I tried a bootstrap with it, I noticed that all > gcc.target/x86_64 AVX execution test were failing: > > FAIL: gcc.target/x86_64/abi/avx/test_m256_returning.c execution, -O1 > > The reason is already well known: the executables are tagged to require > AVX hardware support, but the machine obviously doesn't have it: > > ld.so.1: test_m256_returning.x0: fatal: hardware capability unsupported: 0x20000000 [ 0x20000000 ] > > The solution is the same as in > > PATCH: Clear hardware capabilities from gcc.target/i386 executables with Sun ld > http://gcc.gnu.org/ml/gcc-patches/2010-02/msg00985.html > > clear them via an apporpriate linker map if the linker used supports > that. The following patch implements this and lets the failures go > away. Ok for mainline? Uros suggested in private mail that I could approve the patch myself as purely Solaris-specific. So I've installed it on mainline and the 4.4 and 4.5 branches, which are equally affected. Tested on those was done with the appropriate runtest invocations. Rainer
diff -r 0cf77b5772bf gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp --- a/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp Mon Aug 23 13:25:29 2010 +0200 +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp Thu Aug 26 18:26:25 2010 +0200 @@ -28,9 +28,20 @@ } +# If the linker used understands -M <mapfile>, pass it to clear hardware +# capabilities set by the Sun assembler. +set flags "" +set clearcap_ldflags "-Wl,-M,$srcdir/gcc.target/i386/clearcap.map" + +if [check_no_compiler_messages mapfile executable { + int main (void) { return 0; } + } $clearcap_ldflags ] { + set flags $clearcap_ldflags +} + torture-init set-torture-options $C_TORTURE_OPTIONS -set additional_flags "-W -Wall -mavx" +set additional_flags "-W -Wall -mavx $flags" foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] { if {[runtest_file_p $runtests $src]} {