diff options
author | tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-23 14:54:04 +0000 |
---|---|---|
committer | tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-23 14:54:04 +0000 |
commit | 84c1a54dea2e39c012a11b49a898ed3773d3587b (patch) | |
tree | 45ac92ade53e946016f64c4b5437c518e71aeede /libffi | |
parent | 71c6897652b5b4d4d4221cd6955ed4f044302827 (diff) | |
download | gcc-84c1a54dea2e39c012a11b49a898ed3773d3587b.tar.gz |
[PR libffi/65567] libffi: Fix, and simply libffi_feature_test
libffi/
PR libffi/65567
* testsuite/lib/libffi.exp (libffi_feature_test): Fix, and simply.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236594 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r-- | libffi/ChangeLog | 5 | ||||
-rw-r--r-- | libffi/testsuite/lib/libffi.exp | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog index 50276807528..8245f5b39f8 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,8 @@ +2016-05-23 Thomas Schwinge <thomas@codesourcery.com> + + PR libffi/65567 + * testsuite/lib/libffi.exp (libffi_feature_test): Fix, and simply. + 2016-03-17 Andreas Schwab <schwab@suse.de> * src/aarch64/ffitarget.h (FFI_SIZEOF_JAVA_RAW) [__ILP32__]: diff --git a/libffi/testsuite/lib/libffi.exp b/libffi/testsuite/lib/libffi.exp index 169fe74ca7c..a0f6ab397ee 100644 --- a/libffi/testsuite/lib/libffi.exp +++ b/libffi/testsuite/lib/libffi.exp @@ -227,20 +227,21 @@ proc libffi_target_compile { source dest type options } { # TEST should be a preprocessor condition. Returns true if it holds. proc libffi_feature_test { test } { - set src "ffitest.c" + set src "ffitest[pid].c" set f [open $src "w"] puts $f "#include <ffi.h>" puts $f $test - puts $f "xyzzy" + puts $f "/* OK */" + puts $f "#else" + puts $f "# error Failed $test" puts $f "#endif" close $f - set lines [libffi_target_compile $src "" "preprocess" ""] + set lines [libffi_target_compile $src /dev/null assembly ""] file delete $src - set last [lindex [split $lines] end] - return [regexp -- "xyzzy" $last] + return [string match "" $lines] } # Utility routines. |