]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Pattern does not match when using --specs=nano.specs
authorTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Tue, 6 Feb 2024 16:58:26 +0000 (17:58 +0100)
committerTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Fri, 9 Feb 2024 08:37:42 +0000 (09:37 +0100)
When running the testsuite for newlib nano, the --specs=nano.specs
option is used.  This option prepends cpp_unique_options with
"-isystem =/include/newlib-nano" so that the newlib nano header files
override the newlib standard ones.  As the -isystem option is prepended,
the -quiet option is no longer the first option to cc1.  Adjust the test
accordingly.

Patch has been verified on Windows and Linux.

gcc/testsuite/ChangeLog:

* gcc.misc-tests/options.exp: Allow other options before the
-quite option for cc1.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
gcc/testsuite/gcc.misc-tests/options.exp

index ec026ecf77de4a4c57fd6e6085e7be49a2c8ea36..6e6e40c183d5019eb683dce749f41352156643ee 100644 (file)
@@ -57,7 +57,7 @@ proc check_for_all_options {language gcc_options compiler_pattern as_pattern ld_
        remote_file build delete $dumpfile
     }   
 
-    if {![regexp -- "/${compiler}(\\.exe)? -quiet.*$compiler_pattern" $gcc_output]} {
+    if {![regexp -- "/${compiler}(\\.exe)? \[^\r\n\]*-quiet.*$compiler_pattern" $gcc_output]} {
        fail "$test (compiler options)"
        return
     }