]> gcc.gnu.org Git - gcc.git/commitdiff
[PR libffi/65567] libffi: Fix, and simply libffi_feature_test
authorThomas Schwinge <thomas@codesourcery.com>
Mon, 23 May 2016 14:54:04 +0000 (16:54 +0200)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Mon, 23 May 2016 14:54:04 +0000 (16:54 +0200)
libffi/
PR libffi/65567
* testsuite/lib/libffi.exp (libffi_feature_test): Fix, and simply.

From-SVN: r236594

libffi/ChangeLog
libffi/testsuite/lib/libffi.exp

index 50276807528c313a598ddd75c8b154a21b7445a2..8245f5b39f8a02a93eb58286a52ff9eee2727d0c 100644 (file)
@@ -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__]:
index 169fe74ca7c340c90874b8fa1b1b408af88262e7..a0f6ab397ee8e134ed3ba82a920e4ace1fd9529d 100644 (file)
@@ -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.
This page took 0.077785 seconds and 5 git commands to generate.