public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: libffi fails to build on powerpc64-linux
@ 2012-03-07  4:13 Dennis Clarke
  0 siblings, 0 replies; 15+ messages in thread
From: Dennis Clarke @ 2012-03-07  4:13 UTC (permalink / raw)
  To: Peter Bergner; +Cc: Anthony Green, libffi-discuss, dclarke, Andreas Schwab


> Removing Kyle from the CC list, since his email address doesn't seem to
> be valid anymore and adding Andreas since his patch from 2009 mentioned
> below triggers the assert.
>
 I'll do some testing here on ppc970 and let you know what I see.

-- 
--
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x1D936C72FA35B44B
+-------------------------+-----------------------------------+
| Dennis Clarke           | Solaris and Linux and Open Source |
| dclarke@blastwave.org   | Respect for open standards.       |
+-------------------------+-----------------------------------+

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: libffi fails to build on powerpc64-linux
@ 2012-03-09  2:37 David Edelsohn
  2012-03-09  8:02 ` Kyle Moffett
  0 siblings, 1 reply; 15+ messages in thread
From: David Edelsohn @ 2012-03-09  2:37 UTC (permalink / raw)
  To: libffi-discuss, Peter Bergner, Anthony Green, kyle, dclarke

> On Tue, 2012-03-06 at 09:34 -0600, Peter Bergner wrote:
> > On Mon, 2012-03-05 at 22:18 -0500, Anthony Green wrote:
> > > At this point, I'm hoping that Kyle Moffett, the author of this patch
> > > can have a look.  My guess is that either I mis-applied the patch, or
> > > he posted the wrong patch to apply.
> >
> > Agreed, it would be nice for Kyle to comment.  Looking at the bugzilla
> > above, he said:
> >
> > > This passes the testsuite on soft-floating-point PowerPC, and it builds
> > > and passes the testsuite on PowerPC e500 systems which cannot even
> > > assemble the regular floating-point instruction set.
> >
> > Both of these are non FP power systems, so I can see why he didn't
> > see these build errors, since the broken code is inside of
> > "#ifndef __NO_FPRS__" (double negative?).
>
> Looking at the bugzilla further, I noticed Kyle has a blog here that
> mentions he has moved to Google, so that explains why his email address
> was bouncing.  I'm also guessing he's no longer interested in PowerPC
> issues now that he's no longer at Boeing.
>
> That said, looking farther down that debian bugzilla, I noticed someone
> complained about his patch breaking the debian build.  He attached a
> patch:
>
>  http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=40;filename=libffi-powerpc-build-fix.patch;att=1;bug=644338
>
> If you ignore the debian specific changes and look at the src/powerpc/ffi.c
> change, you'll see it's the same as my patch, minus the hunks of my patch
> that are silencing warnings, so I think my patch is probably safe to take
> as is.  Therefore, I'm officially submitting the patch below to fix the
> build issues.
>
> That still leaves the 32-bit many.c testsuite breakage I am seeing, but I
> think that should be fixed in a separate patch since it is not related to
> these changes at all.
>
> Peter

Adding a different email address for Kyle to possibly entice him to
participate in this email thread.

- David

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: libffi fails to build on powerpc64-linux
@ 2012-03-06  4:21 Dennis Clarke
  2012-03-06 16:17 ` Peter Bergner
  0 siblings, 1 reply; 15+ messages in thread
From: Dennis Clarke @ 2012-03-06  4:21 UTC (permalink / raw)
  To: Anthony Green; +Cc: Peter Bergner, kyle.d.moffett, libffi-discuss, dclarke


> (let me preface this by apologizing for the build breakage)
>
> On Mon, Mar 5, 2012 at 7:28 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
>> Taking my best swag at where the soft_double_prep label should be
>> (comment said it should be handled like UINT64), I tried the following
>> patch which allows everything to build without warnings and seems to
>> pass the testsuite:
>>
>>
>>                === libffi Summary ===
>>
>> # of expected passes            1659
>> # of unsupported tests          55
>
> Those results look fine, however, the soft_double_prep label was
> specifically removed by this patch...
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=powerpc-ffi-softfloat.patch;att=1;bug=644338
>
> ...which was designed to enable support for soft-float ppc targets,
> among other things.   I see now that the original patch didn't remove
> all references to soft_double_prep.
>
> At this point, I'm hoping that Kyle Moffett, the author of this patch
> can have a look.  My guess is that either I mis-applied the patch, or
> he posted the wrong patch to apply.

I am no where near my powermac g5 but as soon as I can I'll climb back
in and see what I can get done with libffi. The entire objective of my
efforts was to get a clean bootstrap of GCC 4.6.2 for ppc970 and then
to work towards GCC 4.7.0RC1 etc.  Thus this is a bit of a road block
that must be cleared on ppc.

Dennis



-- 
--
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x1D936C72FA35B44B
+-------------------------+-----------------------------------+
| Dennis Clarke           | Solaris and Linux and Open Source |
| dclarke@blastwave.org   | Respect for open standards.       |
+-------------------------+-----------------------------------+

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: libffi fails to build on powerpc64-linux
@ 2012-03-05 23:05 Dennis Clarke
  2012-03-05 23:29 ` Peter Bergner
  0 siblings, 1 reply; 15+ messages in thread
From: Dennis Clarke @ 2012-03-05 23:05 UTC (permalink / raw)
  To: Peter Bergner; +Cc: libffi-discuss, Anthony Green


> After the latest libffi merge into GCC, GCC no longer builds on
> powerpc64-linux due to the following errors:

I ran into a bucket of issues with libffi also :

  http://sourceware.org/ml/libffi-discuss/2012/msg00048.html

May or may not be related.

dc



-- 
--
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x1D936C72FA35B44B
+-------------------------+-----------------------------------+
| Dennis Clarke           | Solaris and Linux and Open Source |
| dclarke@blastwave.org   | Respect for open standards.       |
+-------------------------+-----------------------------------+

^ permalink raw reply	[flat|nested] 15+ messages in thread
* libffi fails to build on powerpc64-linux
@ 2012-03-05 22:56 Peter Bergner
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Bergner @ 2012-03-05 22:56 UTC (permalink / raw)
  To: libffi-discuss; +Cc: Anthony Green

After the latest libffi merge into GCC, GCC no longer builds on
powerpc64-linux due to the following errors:

/home/bergner/gcc/gcc-mainline-testsuite-base/libffi/src/powerpc/ffi.c: In function ‘ffi_prep_args_SYSV’:
/home/bergner/gcc/gcc-mainline-testsuite-base/libffi/src/powerpc/ffi.c:199:4: error: ‘double_tmp’ undeclared (first use in this function)
/home/bergner/gcc/gcc-mainline-testsuite-base/libffi/src/powerpc/ffi.c:199:4: note: each undeclared identifier is reported only once for each function it appears in
/home/bergner/gcc/gcc-mainline-testsuite-base/libffi/src/powerpc/ffi.c:215:6: error: label ‘soft_double_prep’ used but not defined
/home/bergner/gcc/gcc-mainline-testsuite-base/libffi/src/powerpc/ffi.c: In function ‘ffi_closure_helper_SYSV’:
/home/bergner/gcc/gcc-mainline-testsuite-base/libffi/src/powerpc/ffi.c:1135:8: error: ‘temp’ undeclared (first use in this function)


Building upstream libffi code directly, it fails exactly the same way.
The "double_tmp" and "temp" errors are easily fixed with the following
obvious patch:

diff --git a/src/powerpc/ffi.c b/src/powerpc/ffi.c
index 1920c91..191b9dc 100644
--- a/src/powerpc/ffi.c
+++ b/src/powerpc/ffi.c
@@ -146,6 +146,7 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
   gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS;
   intarg_count = 0;
 #ifndef __NO_FPRS__
+  double double_tmp;
   fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS;
   fparg_count = 0;
   copy_space.c = ((flags & FLAG_FP_ARGUMENTS) ? fpr_base.c : gpr_base.c);
@@ -1132,7 +1133,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
 
          if (nf < 8)
            {
-             temp = pfr->d;
+             double temp = pfr->d;
              pfr->f = (float) temp;
              avalue[i] = pfr;
              nf++;

But I'm not confident enough to place the missing ‘soft_double_prep’ label.
Can someone more familiar with this code patch that and then remerge the
updated code into GCC?  I'm willing to help build and test any patch
someone comes up with.

As an FYI, I'll mention I opened a GCC bugzilla to track this on the
GCC side of things:

    http://gcc.gnu.org/PR52497


Peter




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-03-09  8:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-07  4:13 libffi fails to build on powerpc64-linux Dennis Clarke
  -- strict thread matches above, loose matches on Subject: below --
2012-03-09  2:37 David Edelsohn
2012-03-09  8:02 ` Kyle Moffett
2012-03-06  4:21 Dennis Clarke
2012-03-06 16:17 ` Peter Bergner
2012-03-05 23:05 Dennis Clarke
2012-03-05 23:29 ` Peter Bergner
2012-03-06  0:29   ` Peter Bergner
2012-03-06  3:18     ` Anthony Green
2012-03-06 15:36       ` Peter Bergner
2012-03-06 16:16         ` Peter Bergner
2012-03-07  4:03         ` Peter Bergner
2012-03-08 23:14         ` Peter Bergner
2012-03-09  1:01           ` Peter Bergner
2012-03-05 22:56 Peter Bergner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).