diff mbox

[COMMITTED] Merge libffi with upstream

Message ID ydd1tmhmxp3.fsf@lokon.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Jan. 26, 2015, 2:19 p.m. UTC
"H.J. Lu" <hjl.tools@gmail.com> writes:

> On Fri, Jan 16, 2015 at 5:38 AM, Rainer Orth
> <ro@cebitec.uni-bielefeld.de> wrote:
>> Jakub Jelinek <jakub@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  <ro@CeBiTec.Uni-Bielefeld.DE>

	* testsuite/lib/libffi.exp: Load target-supports.exp.
	(run-many-tests): Only set targetabis for ia32.
This patch worked for me.  Ok for mainline now?

Thanks.
	Rainer

Comments

Richard Henderson Jan. 26, 2015, 6:30 p.m. UTC | #1
On 01/26/2015 06:19 AM, Rainer Orth wrote:
> 2015-01-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* testsuite/lib/libffi.exp: Load target-supports.exp.
> 	(run-many-tests): Only set targetabis for ia32.

Ok.


r~
diff mbox

Patch

# 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__"