Commit 89b760503ed017233c98531908dfe8d8affab65e

Filipe Brandenburger 2015-10-19T15:33:23

Fix dejagnu test support for --tool_opts Right now it concatenates it with the existing options and then appends it to that list, fix it to simply append it as is, same as it is done with the other variables. Tested by running the following command which includes gcc options: $ make check RUNTESTFLAGS="--tool_opts '-Werror'" Without this patch, all the tests fail. With it, the test succeed. Inspecting the logs shows that -Werror was indeed used when compiling the test sources.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/testsuite/lib/libffi.exp b/testsuite/lib/libffi.exp
index 1b8b008..0d74627 100644
--- a/testsuite/lib/libffi.exp
+++ b/testsuite/lib/libffi.exp
@@ -182,7 +182,7 @@ proc libffi_target_compile { source dest type options } {
     # TOOL_OPTIONS must come first, so that it doesn't override testcase
     # specific options.
     if [info exists TOOL_OPTIONS] {
-	lappend  options [concat "additional_flags=$TOOL_OPTIONS" $options];
+	lappend  options "additional_flags=$TOOL_OPTIONS"
     }
 
     # search for ffi_mips.h in srcdir, too