[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#644338: libffi: Build errors on PowerPC e500, test-suite failures on PowerPC soft-float



Hi Matthias!

On Oct 12, 2011, at 12:26, Matthias Klose wrote:
> On 10/05/2011 12:12 AM, Kyle Moffett wrote:
>> Package: libffi
>> Severity: normal
>> Tags: patch upstream
>> User: debian-powerpcspe@breakpoint.cc
>> Usertags: powerpcspe
>> 
>> The Debian-Ports "powerpcspe" architecture can't currently build the
>> libffi package for a couple reasons:
>> 
>>  (1) The package contains lots of FP assembly instructions even when
>>      built on a soft-float target, resulting in compile errors on the
>>      Debian powerpcspe architecture (totally different FPU ops).
>> 
>>  (2) The existing soft-float support code has buggy handling of 128-bit
>>      values and results in testsuite failures on soft-float and e500
>>      (powerpcspe) platforms even when it can be made to compile.
>> 
>> The attached patch resolves both issues.
> 
> and ftbfs on powerpc:
> https://buildd.debian.org/status/fetch.php?pkg=libffi&arch=powerpc&ver=3.0.10-2&stamp=1318082452

Again, sorry for the trouble.

I have attached an incremental patch to be applied on top of the previous
one with the following changes:

* Fix a few compile errors introduced by the powerpcspe port by adding
  back accidentally-removed variable declarations.

* Fix a compile error by removing an extraneous soft-float conditional
  goto that can never be reached due to the powerpcspe soft-float rework.

* Remove unintentionally-exported global variables NUM_FPR_ARG_REGISTERS
  and NUM_GPR_ARG_REGISTERS from the ppc/ppc64 symbols files.  These were
  treated as pseudo-constants by the internal implementation and were
  converted to "#define"s in the powerpcspe soft-float rework.

* Add a new libffi5.symbols.powerpcspe file copied from powerpc.

I have performed a native build of this patch on a PowerPC64 system,
compiling both the libffi5 and lib64ffi5 versions successfully, with no
test-suite failures.

Unfortunately I am having issues with my powerpcspe build environment at
the moment, so this patch has not been tested there, but with the
exception of the new symbols file it does not modify any code outside of
the "#ifndef __NO_FPRS__" conditionals.  If there are any new problems
on that architecture I will follow up with another patch later.

Cheers,
Kyle Moffett

--
Curious about my work on the Debian powerpcspe port?
I'm keeping a blog here: http://pureperl.blogspot.com/

Attachment: libffi-powerpc-build-fix.patch
Description: libffi-powerpc-build-fix.patch


Reply to: