Rainer Orth <[email protected]> writes:
> Richard Henderson <[email protected]> writes:
>
>> Upstream libffi has added support for Go closures (using the static chain),
>> and support for complex numbers. Perhaps less relevant is new support for
>> arc, microblaze, moxie, nios, and or1k targets.
>>
>> Without additional changes for Go, this merge has little effect. Within the
>> gcc tree libffi is primarily used by libjava.
>>
>> Tested with no regressions on {i686,x86_64,ppc64,s390x,aarch64,alpha}-linux.
>>
>> Due to upstream breakage, and difficulty debugging on Darwin,
>> {i686,x86_64}-darwin retains copies of the existing sources and thus remains
>> 100% unchanged. Since libgo doesn't support darwin, this should cause no
>> immediate problems.
>
> The patch introduced massive problems on Solaris, both SPARC and x86:
I've noticed another issue with x86 testing: both on Solaris/x86
(i386-pc-solaris2.11) and Linux/x86 (i686-unknown-linux-gnu), many tests
fail for the 64-bit multilib:
FAIL: libffi.call/closure_simple.c -W -Wall -Wno-psabi -O0
-DABI_NUM=FFI_STDCALL -DABI_ATTR=__STDCALL__ (test for excess errors)
Excess errors:
[01m[K/vol/gcc/src/hg/trunk/local/libffi/testsuite/libffi.call/closure_simple.c:25:1:[m[K
[01;35m[Kwarning: [m[K'[01m[Kstdcall[m[K' attribute ignored [-Wattributes]
typedef int (ABI_ATTR *closure_test_type0)(int, int, int, int);
[01;32m[K ^[m[K
In file included from
[01m[K/vol/gcc/src/hg/trunk/local/libffi/testsuite/libffi.call/closure_simple.c:8:0[m[K:
[01m[K/vol/gcc/src/hg/trunk/local/libffi/testsuite/libffi.call/closure_simple.c:[m[K
In function '[01m[Kmain[m[K':
[01m[K<command-line>:0:9:[m[K [01;31m[Kerror: [m[K'[01m[KFFI_STDCALL[m[K'
undeclared (first use in this function)
[01m[K/vol/gcc/src/hg/trunk/local/libffi/testsuite/libffi.call/ffitest.h:18:27:[m[K
[01;36m[Knote: [m[Kin definition of macro '[01m[KCHECK[m[K'
#define CHECK(x) (void)(!(x) ? (abort(), 1) : 0)
[01;32m[K ^[m[K
[01m[K/vol/gcc/src/hg/trunk/local/libffi/testsuite/libffi.call/closure_simple.c:42:28:[m[K
[01;36m[Knote: [m[Kin expansion of macro '[01m[KABI_NUM[m[K'
CHECK(ffi_prep_cif(&cif, ABI_NUM, 4,
[01;32m[K ^[m[K
[01m[K<command-line>:0:9:[m[K [01;36m[Knote: [m[Keach undeclared identifier is
reported only once for each function it appears in
[01m[K/vol/gcc/src/hg/trunk/local/libffi/testsuite/libffi.call/ffitest.h:18:27:[m[K
[01;36m[Knote: [m[Kin definition of macro '[01m[KCHECK[m[K'
#define CHECK(x) (void)(!(x) ? (abort(), 1) : 0)
[01;32m[K ^[m[K
[01m[K/vol/gcc/src/hg/trunk/local/libffi/testsuite/libffi.call/closure_simple.c:42:28:[m[K
[01;36m[Knote: [m[Kin expansion of macro '[01m[KABI_NUM[m[K'
CHECK(ffi_prep_cif(&cif, ABI_NUM, 4,
[01;32m[K ^[m[K
The 32-bit x86 test in libffi.exp is bogus. The following patch fixes
this, tested with the appropriate runtest invocation on
i386-pc-solaris2.11. Ok for mainline?
Rainer
2015-01-16 Rainer Orth <[email protected]>
* testsuite/lib/libffi.exp: Load target-supports.exp.
(run-many-tests): Only set targetabis for 32-bit x86.
diff --git a/libffi/testsuite/lib/libffi.exp b/libffi/testsuite/lib/libffi.exp
--- a/libffi/testsuite/lib/libffi.exp
+++ b/libffi/testsuite/lib/libffi.exp
@@ -23,6 +23,7 @@ proc load_gcc_lib { filename } {
load_lib dg.exp
load_lib libgloss.exp
+load_gcc_lib target-supports.exp
load_gcc_lib target-libpath.exp
load_gcc_lib wrapper.exp
@@ -311,7 +312,8 @@ proc run-many-tests { testcases extra_fl
set targetabis { "" }
if [string match $compiler_vendor "gnu"] {
- if [istarget "i?86-*-*"] {
+ if { ([istarget "i?86-*-*"] || [istarget "x86_64-*-*"])
+ && [is-effective-target ilp32] } {
set targetabis {
""
"-DABI_NUM=FFI_STDCALL -DABI_ATTR=__STDCALL__"
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University