Olivier Hainque <hain...@adacore.com> writes: > Hello, > > Some tests from gcc/testsuite/gcc.target/aarch64/aapcs64 > resort to the abitest.S source, which defines a few weak symbols: > > ... > .weak testfunc > .weak testfunc_ptr > .weak saved_return_address > > The attached patch is a proposal to prevent the execution of > those tests in configurations where weak symbols are advertised > as not supported. > > This cures a significant number of failures on VxWorks and bootstrap > + regress tests fine on aarch64-linux. > > Is this ok to commit ? > > Thanks in advance! > > With Kind Regards, > > Olivier > > 2019-12-16 Joel Brobecker <brobec...@adacore.com> > Olivier Hainque <hain...@adacore.com> > > testsuite/ > > * gcc.target/aarch64/aapcs64/aapcs64.exp: Guard tests using > abitest.S by check_weak_available.
OK, thanks. Richard > > .../gcc.target/aarch64/aapcs64/aapcs64.exp | 36 ++++++++++++------- > 1 file changed, 23 insertions(+), 13 deletions(-) > > diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp > b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp > index c17af6c3084..36687800ecd 100644 > --- a/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp > +++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp > @@ -29,12 +29,16 @@ torture-init > set-torture-options $C_TORTURE_OPTIONS > set additional_flags "-W -Wall -Wno-abi" > > -# Test parameter passing. > -foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] { > - if {[runtest_file_p $runtests $src]} { > +# Test parameter passing. This uses abitest.S which relies on weak > +# symbols. > + > +if { [check_weak_available] } { > + foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] { > + if {[runtest_file_p $runtests $src]} { > c-torture-execute [list $src \ > $srcdir/$subdir/abitest.S] \ > $additional_flags > + } > } > } > > @@ -48,25 +52,31 @@ foreach src [lsort [glob -nocomplain > $srcdir/$subdir/rec_*.c]] { > } > } > > -# Test unnamed argument retrieval via the va_arg macro. > -foreach src [lsort [glob -nocomplain $srcdir/$subdir/va_arg-*.c]] { > - if {[runtest_file_p $runtests $src]} { > +# Test unnamed argument retrieval via the va_arg macro. This uses abitest.S > +# which relies on weak symbols. > +if { [check_weak_available] } { > + foreach src [lsort [glob -nocomplain $srcdir/$subdir/va_arg-*.c]] { > + if {[runtest_file_p $runtests $src]} { > c-torture-execute [list $src \ > $srcdir/$subdir/abitest.S] \ > $additional_flags > + } > } > } > > -# Test function return value. > -# Disable -fipa-ra to prevent the compiler from generating > -# conflicting code. > -set additional_flags_for_func_ret $additional_flags > -append additional_flags_for_func_ret " -fno-ipa-ra" > -foreach src [lsort [glob -nocomplain $srcdir/$subdir/func-ret-*.c]] { > - if {[runtest_file_p $runtests $src]} { > +# Test function return value. This uses abitest.S which relies on > +# weak symbols. > +if { [check_weak_available] } { > + # Disable -fipa-ra to prevent the compiler from generating > + # conflicting code. > + set additional_flags_for_func_ret $additional_flags > + append additional_flags_for_func_ret " -fno-ipa-ra" > + foreach src [lsort [glob -nocomplain $srcdir/$subdir/func-ret-*.c]] { > + if {[runtest_file_p $runtests $src]} { > c-torture-execute [list $src \ > $srcdir/$subdir/abitest.S] \ > $additional_flags_for_func_ret > + } > } > }