"H.J. Lu" <hjl.to...@gmail.com> writes: > On Fri, Jan 16, 2015 at 5:38 AM, Rainer Orth > <r...@cebitec.uni-bielefeld.de> wrote: >> Jakub Jelinek <ja...@redhat.com> writes: >> >>>> @@ -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] } { >>> >>> Shouldn't that be ia32 instead if ilp32 ? I mean, do you want >>> it for -mx32 too or not? >> >> I've no idea if x32 supports stdcall or not. > > No, x32 doesn't. You should check ia32, not ilp32.
2015-01-16 Rainer Orth <r...@cebitec.uni-bielefeld.de> * testsuite/lib/libffi.exp: Load target-supports.exp. (run-many-tests): Only set targetabis for ia32.
# HG changeset patch # Parent 5b70ffc67684f61ff23547e4b3ad25e64a2ca2a2 Correctly check 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 ia32] } { set targetabis { "" "-DABI_NUM=FFI_STDCALL -DABI_ATTR=__STDCALL__"
This patch worked for me. Ok for mainline now? Thanks. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University