Message ID | ortti5nyua.fsf@lxoliva.fsfla.org |
---|---|
State | New |
Headers | show |
Series | [testsuite,arm] test board cflags in multilib.exp | expand |
On 07/06/2024 05:47, Alexandre Oliva wrote: > > multilib.exp tests for multilib-altering flags in a board's > multilib_flags and skips the test, but if such flags appear in the > board's cflags, with the same distorting effects on tested multilibs, > we fail to skip the test. > > Extend the skipping logic to board's cflags as well. > > Regstrapping on x86_64-linux-gnu. Already tested on arm-eabi (gcc-13 > and trunk). Ok to install? > OK, thanks. R. > > for gcc/testsuite/ChangeLog > > * gcc.target/arm/multilib.exp: Skip based on board cflags too. > --- > gcc/testsuite/gcc.target/arm/multilib.exp | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp > index 4442d5d754bd6..12c93bc89d222 100644 > --- a/gcc/testsuite/gcc.target/arm/multilib.exp > +++ b/gcc/testsuite/gcc.target/arm/multilib.exp > @@ -18,13 +18,15 @@ load_lib gcc-dg.exp > > dg-init > > -if { [board_info [target_info name] exists multilib_flags] > - && [regexp {(-marm|-mthumb|-march=.*|-mcpu=.*|-mfpu=.*|-mfloat=abi=.*)\y} [board_info [target_info name] multilib_flags]] } { > +foreach flagsvar {multilib_flags cflags} { > + if { [board_info [target_info name] exists $flagsvar] > + && [regexp {(-marm|-mthumb|-march=.*|-mcpu=.*|-mfpu=.*|-mfloat=abi=.*)\y} [board_info [target_info name] $flagsvar]] } { > > # Multilib flags override anything we can apply to a test, so > # skip if any of the above options are set there. > - verbose "skipping multilib tests due to multilib_flags setting" 1 > + verbose "skipping multilib tests due to $flagsvar setting" 1 > return > + } > } > > # We don't want to run this test multiple times in a parallel make check. >
diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp index 4442d5d754bd6..12c93bc89d222 100644 --- a/gcc/testsuite/gcc.target/arm/multilib.exp +++ b/gcc/testsuite/gcc.target/arm/multilib.exp @@ -18,13 +18,15 @@ load_lib gcc-dg.exp dg-init -if { [board_info [target_info name] exists multilib_flags] - && [regexp {(-marm|-mthumb|-march=.*|-mcpu=.*|-mfpu=.*|-mfloat=abi=.*)\y} [board_info [target_info name] multilib_flags]] } { +foreach flagsvar {multilib_flags cflags} { + if { [board_info [target_info name] exists $flagsvar] + && [regexp {(-marm|-mthumb|-march=.*|-mcpu=.*|-mfpu=.*|-mfloat=abi=.*)\y} [board_info [target_info name] $flagsvar]] } { # Multilib flags override anything we can apply to a test, so # skip if any of the above options are set there. - verbose "skipping multilib tests due to multilib_flags setting" 1 + verbose "skipping multilib tests due to $flagsvar setting" 1 return + } } # We don't want to run this test multiple times in a parallel make check.