[PATCH] Fix dejagnu test support for --tool_opts

Filipe Brandenburger filbranden@google.com
Wed Feb 3 21:39:00 GMT 2016


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.
---
Also available as a GitHub PR:
https://github.com/atgreen/libffi/pull/205

Re-sending it to this mailing list, in case GitHub PRs are not the best way to
push this, and e-mail submissions are preferred.

Thanks!
Filipe

 testsuite/lib/libffi.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuite/lib/libffi.exp b/testsuite/lib/libffi.exp
index 1b8b008fe297..0d74627207dc 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
-- 
2.7.0.rc3.207.g0ac5344



More information about the Libffi-discuss mailing list