NetBSD Problem Report #45831

From www@NetBSD.org  Fri Jan 13 10:04:23 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 5177663BE07
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 13 Jan 2012 10:04:23 +0000 (UTC)
Message-Id: <20120113100422.402BF63B84C@www.NetBSD.org>
Date: Fri, 13 Jan 2012 10:04:22 +0000 (UTC)
From: alanh@fairlite.co.uk
Reply-To: alanh@fairlite.co.uk
To: gnats-bugs@NetBSD.org
Subject: devel/libffi-3.0.9 fails it's test on m68k (atari)
X-Send-Pr-Version: www-1.0

>Number:         45831
>Category:       toolchain
>Synopsis:       devel/libffi-3.0.9 fails it's test on m68k (atari)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 13 10:05:00 +0000 2012
>Last-Modified:  Mon Jan 23 03:00:40 +0000 2012
>Originator:     Alan Hourihane
>Release:        5.1.1
>Organization:
>Environment:
NetBSD ataritt 5.1.1 NetBSD 5.1.1 (ATARITT) #0: Wed Jan  4 20:28:06 UTC 2012  builds@b8.netbsd.org:/home/builds/ab/netbsd-5-1-1-RELEASE/atari/201201040549Z-obj/home/builds/ab/netbsd-5-1-1-RELEASE/src/sys/arch/atari/compile/ATARITT atari
>Description:
When executing the testsuite in devel/libffi, NetBSD 5.1.1 for m68k fails some of the tests with the following output.

You need dejagnu and expect in the same toplevel tree as libffi-3.0.9, then run "make check" in the testsuite directory of libffi.

I suspect it's the same for other m68k targets.

make  check-DEJAGNU
srcdir=`CDPATH="${ZSH_VERSION+.}:" && cd . && pwd`; export srcdir;  EXPECT=`if [ -f ../../expect/expect ] ; then  echo ../../expect/expect ;  else echo expect ; fi`; export EXPECT;  runtest=`if [ -f ../../dejagnu/runtest ] ; then  echo ../../dejagnu/runtest ;  else echo runtest; fi`;  if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then  exit_status=0; l='libffi'; for tool in $l; do  if $runtest  --tool $tool --srcdir $srcdir ;  then :; else exit_status=1; fi;  done;  else echo "WARNING: could not find \`runtest'" 1>&2; :; fi;  exit $exit_status
WARNING: Couldn't find the global config file.
WARNING: Couldn't find tool init file
Test Run By root on Fri Jan 13 08:22:44 2012
Native configuration is m68k--netbsdelf

                === libffi tests ===

Schedule of variations:
    unix

Running target unix
Using ../../dejagnu/baseboards/unix.exp as board description file for target.
Using ../../dejagnu/config/unix.exp as generic interface file for target.
Using /ISO/NetBSD/atari/pkgsrc/devel/libffi/work/libffi-3.0.9/testsuite/config/default.exp as tool-and-target-specific interface file.
Running /ISO/NetBSD/atari/pkgsrc/devel/libffi/work/libffi-3.0.9/testsuite/libffi.call/call.exp ...
FAIL: libffi.call/cls_12byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_16byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_18byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_19byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_1_1byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_20byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_20byte1.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_24byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_2byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_3_1byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_3byte1.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_3byte2.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_4_1byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_4byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_5_1_byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_5byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_64byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_6_1_byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_6byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_7_1_byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_7byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_8byte.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_9byte1.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_9byte2.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_double.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_float.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_longdouble.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_longdouble_split.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_longdouble_split2.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_pointer.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_sint16.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_sint32.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_sint64.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_uint16.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_uint32.c -O0 -W -Wall execution test
FAIL: libffi.call/cls_align_uint64.c -O0 -W -Wall execution test
FAIL: libffi.call/huge_struct.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct1.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct10.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct2.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct3.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct4.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct5.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct6.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct7.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct8.c -O0 -W -Wall execution test
FAIL: libffi.call/nested_struct9.c -O0 -W -Wall execution test
FAIL: libffi.call/problem1.c -O0 -W -Wall execution test
FAIL: libffi.call/stret_large.c -O0 -W -Wall execution test
FAIL: libffi.call/stret_large2.c -O0 -W -Wall execution test
FAIL: libffi.call/struct1.c -O0 -W -Wall execution test
FAIL: libffi.call/struct2.c -O0 -W -Wall execution test
FAIL: libffi.call/struct3.c -O0 -W -Wall execution test
FAIL: libffi.call/struct4.c -O0 -W -Wall execution test
FAIL: libffi.call/struct5.c -O0 -W -Wall execution test
FAIL: libffi.call/struct6.c -O0 -W -Wall execution test
FAIL: libffi.call/struct7.c -O0 -W -Wall execution test
FAIL: libffi.call/struct8.c -O0 -W -Wall execution test
FAIL: libffi.call/struct9.c -O0 -W -Wall execution test

Then it goes on to do the same tests with -O2 and other GCC options, with similar failures.
>How-To-Repeat:
Go to pkgsrc/devel/libffi and type "make".

Then go to pkgsrc/devel/dejagnu and type "make".

Go to devel/libffi/work and "ln -s ../../dejagnu/work/dejagnu-1.4.4 ." 

Then "mkdir expect" and "cp /usr/pkg/bin/expect expect"

Now change directory to "pkgsrc/devel/libffi/work/libffi-3.0.9/testsuite" and run "make check"

Expect the failures above.
>Fix:

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 (atari)
Date: Sun, 15 Jan 2012 07:47:41 +0000

 On Fri, Jan 13, 2012 at 10:05:00AM +0000, alanh@fairlite.co.uk wrote:
  > When executing the testsuite in devel/libffi, NetBSD 5.1.1 for m68k
  > fails some of the tests with the following output.

 Do you know if it works on any other m68k netbsd (or non-netbsd)
 platform?

 -- 
 David A. Holland
 dholland@netbsd.org

From: Alan Hourihane <alanh@fairlite.co.uk>
To: gnats-bugs@NetBSD.org
Cc: David Holland <dholland-bugs@netbsd.org>, 
 port-atari-maintainer@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org
Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 (atari)
Date: Mon, 16 Jan 2012 17:26:00 +0000

 On 15/01/12 07:50, David Holland wrote:
 > The following reply was made to PR port-atari/45831; it has been noted by GNATS.
 >
 > From: David Holland<dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 >   (atari)
 > Date: Sun, 15 Jan 2012 07:47:41 +0000
 >
 >   On Fri, Jan 13, 2012 at 10:05:00AM +0000, alanh@fairlite.co.uk wrote:
 >    >  When executing the testsuite in devel/libffi, NetBSD 5.1.1 for m68k
 >    >  fails some of the tests with the following output.
 >
 >   Do you know if it works on any other m68k netbsd (or non-netbsd)
 >   platform?
 >
 >
 There's a couple of patches that's been used on Linux too, but they fix 
 the err_bad_abi.c test and a macro for the 68881.

 I'm going to re-run on NetBSD later and update with the latest failures.

 Alan.

From: Alan Hourihane <alanh@fairlite.co.uk>
To: gnats-bugs@NetBSD.org
Cc: David Holland <dholland-bugs@netbsd.org>, 
 port-atari-maintainer@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org
Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 (atari)
Date: Mon, 16 Jan 2012 17:24:23 +0000

 On 15/01/12 07:50, David Holland wrote:
 > The following reply was made to PR port-atari/45831; it has been noted by GNATS.
 >
 > From: David Holland<dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 >   (atari)
 > Date: Sun, 15 Jan 2012 07:47:41 +0000
 >
 >   On Fri, Jan 13, 2012 at 10:05:00AM +0000, alanh@fairlite.co.uk wrote:
 >    >  When executing the testsuite in devel/libffi, NetBSD 5.1.1 for m68k
 >    >  fails some of the tests with the following output.
 >
 >   Do you know if it works on any other m68k netbsd (or non-netbsd)
 >   platform?
 >
 Yes, I posted to the Linux debian-m68k lists and there's only a couple 
 of failures there.

 return_sc.c (only when not -O0 - could be a compiler bug)
 nested_struct2.c

 All others pass.

 I've not tested another NetBSD m68k system though, but I'd expect to be 
 similar problems.

 Alan.

From: Alan Hourihane <alanh@fairlite.co.uk>
To: gnats-bugs@NetBSD.org
Cc: port-atari-maintainer@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org
Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 (atari)
Date: Tue, 17 Jan 2012 08:24:01 +0000

 On 16/01/12 18:45, Alan Hourihane wrote:
 > The following reply was made to PR port-atari/45831; it has been noted by GNATS.
 >
 > From: Alan Hourihane<alanh@fairlite.co.uk>
 > To: gnats-bugs@NetBSD.org
 > Cc: David Holland<dholland-bugs@netbsd.org>,
 >   port-atari-maintainer@netbsd.org, gnats-admin@netbsd.org,
 >   netbsd-bugs@netbsd.org
 > Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 >   (atari)
 > Date: Mon, 16 Jan 2012 17:24:23 +0000
 >
 >   On 15/01/12 07:50, David Holland wrote:
 >   >  The following reply was made to PR port-atari/45831; it has been noted by GNATS.
 >   >
 >   >  From: David Holland<dholland-bugs@netbsd.org>
 >   >  To: gnats-bugs@NetBSD.org
 >   >  Cc:
 >   >  Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 >   >    (atari)
 >   >  Date: Sun, 15 Jan 2012 07:47:41 +0000
 >   >
 >   >    On Fri, Jan 13, 2012 at 10:05:00AM +0000, alanh@fairlite.co.uk wrote:
 >   >     >   When executing the testsuite in devel/libffi, NetBSD 5.1.1 for m68k
 >   >     >   fails some of the tests with the following output.
 >   >
 >   >    Do you know if it works on any other m68k netbsd (or non-netbsd)
 >   >    platform?
 >   >
 >   Yes, I posted to the Linux debian-m68k lists and there's only a couple
 >   of failures there.
 >
 >   return_sc.c (only when not -O0 - could be a compiler bug)
 >   nested_struct2.c
 >
 >   All others pass.
 >
 >   I've not tested another NetBSD m68k system though, but I'd expect to be
 >   similar problems.
 >
 >

 I've re-tested with libffi 3.0.10 and the NetBSD m68k patch as well as 
 they additional ones I mentioned. Unfortunately these are still failures....

 FAIL: libffi.call/cls_12byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_16byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_18byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_19byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_1_1byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_20byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_20byte1.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_24byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_2byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_3_1byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_3byte1.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_3byte2.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_4_1byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_4byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_5_1_byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_5byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_64byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_6_1_byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_6byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_7_1_byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_7byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_8byte.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_9byte1.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_9byte2.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_double.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_float.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_longdouble.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_longdouble_split.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_longdouble_split2.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_pointer.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_sint16.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_sint32.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_sint64.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_uint16.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_uint32.c -O0 -W -Wall execution test
 FAIL: libffi.call/cls_align_uint64.c -O0 -W -Wall execution test
 FAIL: libffi.call/huge_struct.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct1.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct10.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct2.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct3.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct4.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct5.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct6.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct7.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct8.c -O0 -W -Wall execution test
 FAIL: libffi.call/nested_struct9.c -O0 -W -Wall execution test
 FAIL: libffi.call/problem1.c -O0 -W -Wall execution test
 FAIL: libffi.call/stret_large.c -O0 -W -Wall execution test
 FAIL: libffi.call/stret_large2.c -O0 -W -Wall execution test
 FAIL: libffi.call/stret_medium.c -O0 -W -Wall execution test
 FAIL: libffi.call/stret_medium2.c -O0 -W -Wall execution test
 FAIL: libffi.call/struct1.c -O0 -W -Wall execution test
 FAIL: libffi.call/struct2.c -O0 -W -Wall execution test
 FAIL: libffi.call/struct3.c -O0 -W -Wall execution test
 FAIL: libffi.call/struct4.c -O0 -W -Wall execution test
 FAIL: libffi.call/struct5.c -O0 -W -Wall execution test
 FAIL: libffi.call/struct6.c -O0 -W -Wall execution test
 FAIL: libffi.call/struct7.c -O0 -W -Wall execution test
 FAIL: libffi.call/struct8.c -O0 -W -Wall execution test
 FAIL: libffi.call/struct9.c -O0 -W -Wall execution test

 It seems the calling convention used for NetBSD is different from Linux 
 and therefore this will need investigation and fixing.

 Alan.

From: Alan Hourihane <alanh@fairlite.co.uk>
To: gnats-bugs@NetBSD.org
Cc: port-atari-maintainer@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org
Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 (atari)
Date: Tue, 17 Jan 2012 08:50:45 +0000

 On 17/01/12 08:25, Alan Hourihane wrote:
 > The following reply was made to PR port-atari/45831; it has been noted by GNATS.
 >
 > From: Alan Hourihane<alanh@fairlite.co.uk>
 > To: gnats-bugs@NetBSD.org
 > Cc: port-atari-maintainer@netbsd.org, gnats-admin@netbsd.org,
 >   netbsd-bugs@netbsd.org
 > Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 >   (atari)
 > Date: Tue, 17 Jan 2012 08:24:01 +0000
 >
 >   On 16/01/12 18:45, Alan Hourihane wrote:
 >   >  The following reply was made to PR port-atari/45831; it has been noted by GNATS.
 >   >
 >   >  From: Alan Hourihane<alanh@fairlite.co.uk>
 >   >  To: gnats-bugs@NetBSD.org
 >   >  Cc: David Holland<dholland-bugs@netbsd.org>,
 >   >    port-atari-maintainer@netbsd.org, gnats-admin@netbsd.org,
 >   >    netbsd-bugs@netbsd.org
 >   >  Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 >   >    (atari)
 >   >  Date: Mon, 16 Jan 2012 17:24:23 +0000
 >   >
 >   >    On 15/01/12 07:50, David Holland wrote:
 >   >    >   The following reply was made to PR port-atari/45831; it has been noted by GNATS.
 >   >    >
 >   >    >   From: David Holland<dholland-bugs@netbsd.org>
 >   >    >   To: gnats-bugs@NetBSD.org
 >   >    >   Cc:
 >   >    >   Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 >   >    >     (atari)
 >   >    >   Date: Sun, 15 Jan 2012 07:47:41 +0000
 >   >    >
 >   >    >     On Fri, Jan 13, 2012 at 10:05:00AM +0000, alanh@fairlite.co.uk wrote:
 >   >    >      >    When executing the testsuite in devel/libffi, NetBSD 5.1.1 for m68k
 >   >    >      >    fails some of the tests with the following output.
 >   >    >
 >   >    >     Do you know if it works on any other m68k netbsd (or non-netbsd)
 >   >    >     platform?
 >   >    >
 >   >    Yes, I posted to the Linux debian-m68k lists and there's only a couple
 >   >    of failures there.
 >   >
 >   >    return_sc.c (only when not -O0 - could be a compiler bug)
 >   >    nested_struct2.c
 >   >
 >   >    All others pass.
 >   >
 >   >    I've not tested another NetBSD m68k system though, but I'd expect to be
 >   >    similar problems.
 >   >
 >   >
 >
 >   I've re-tested with libffi 3.0.10 and the NetBSD m68k patch as well as
 >   they additional ones I mentioned. Unfortunately these are still failures....
 >
 >   FAIL: libffi.call/cls_12byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_16byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_18byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_19byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_1_1byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_20byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_20byte1.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_24byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_2byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_3_1byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_3byte1.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_3byte2.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_4_1byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_4byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_5_1_byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_5byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_64byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_6_1_byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_6byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_7_1_byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_7byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_8byte.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_9byte1.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_9byte2.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_double.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_float.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_longdouble.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_longdouble_split.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_longdouble_split2.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_pointer.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_sint16.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_sint32.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_sint64.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_uint16.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_uint32.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/cls_align_uint64.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/huge_struct.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct1.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct10.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct2.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct3.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct4.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct5.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct6.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct7.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct8.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/nested_struct9.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/problem1.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/stret_large.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/stret_large2.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/stret_medium.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/stret_medium2.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/struct1.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/struct2.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/struct3.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/struct4.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/struct5.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/struct6.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/struct7.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/struct8.c -O0 -W -Wall execution test
 >   FAIL: libffi.call/struct9.c -O0 -W -Wall execution test
 >
 >   It seems the calling convention used for NetBSD is different from Linux
 >   and therefore this will need investigation and fixing.
 >

 I'm convinced most (if not all) of these are because of this in GCC, and 
 therefore libffi needs fixing for the different mode of structs.

 On Linux m68k, this is done...

 /* For m68k SVR4, structures are returned using the reentrant
     technique.  */
 #undef PCC_STATIC_STRUCT_RETURN
 #define DEFAULT_PCC_STRUCT_RETURN 0

 On NetBSD m68k, this is done...

 /* The svr4 ABI for the m68k says that records and unions are returned
     in memory.  */

 #undef DEFAULT_PCC_STRUCT_RETURN
 #define DEFAULT_PCC_STRUCT_RETURN 1

 Alan.

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-atari/45831: devel/libffi-3.0.9 fails it's test on m68k
 (atari)
Date: Mon, 23 Jan 2012 01:14:00 +0000

 On Mon, Jan 16, 2012 at 06:45:02PM +0000, Alan Hourihane wrote:
  >  >   Do you know if it works on any other m68k netbsd (or non-netbsd)
  >  >   platform?
  >
  >  There's a couple of patches that's been used on Linux too, but they fix 
  >  the err_bad_abi.c test and a macro for the 68881.
  >  
  >  I'm going to re-run on NetBSD later and update with the latest failures.
  >  
  > [various later stuff]

 ok, sounds like I should refile it under port-m68k where it will get a
 (somewhat) wider audience.

 -- 
 David A. Holland
 dholland@netbsd.org

Responsible-Changed-From-To: port-atari-maintainer->toolchain-bug-people
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Mon, 23 Jan 2012 02:59:16 +0000
Responsible-Changed-Why:
Since there are some compiler issues in here, set it to "toolchain" first to
get those sorted out.


Responsible-Changed-From-To: toolchain-bug-people->toolchain-manager
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Mon, 23 Jan 2012 03:00:40 +0000
Responsible-Changed-Why:
use right address. sigh


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.