8000 ffi_powerpc.h: fix build failure with powerpc7 by geissonator · Pull Request #561 · libffi/libffi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ffi_powerpc.h: fix build failure with powerpc7 #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

geissonator
Copy link
Contributor

This is a patch pulled down from the following:
https://github.com/buildroot/buildroot/blob/78926f610b1411b03464152472fd430012deb9ac/package/libffi/0004-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch

This issue is being hit on OpenBMC code when pulling the latest
libffi tag and building on a P8 ppc64le machine. I verified this
patch fixes the issue we are seeing.

Below is the original commit message:

Sicne commit 73dd43a, build on powerpc7
fails on:

In file included from ../src/powerpc/ffi.c:33:0:
../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target
typedef _Float128 float128;
^~~~~~~~~

Fix this build failure by checking for __HAVE_FLOAT128 before using
_Float128, as _Float128 is enabled only on specific conditions, see
output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h:

/* Defined to 1 if the current compiler invocation provides a
floating-point type with the IEEE 754 binary128 format, and this glibc
includes corresponding *f128 interfaces for it. */
#if defined _ARCH_PWR8 && defined LITTLE_ENDIAN && (_CALL_ELF == 2)
&& defined FLOAT128 && !defined __NO_LONG_DOUBLE_MATH

define __HAVE_FLOAT128 1

#else

define __HAVE_FLOAT128 0

#endif

Fixes:

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com
Signed-off-by: Andrew Geissler geissonator@yahoo.com

This is a patch pulled down from the following:
https://github.com/buildroot/buildroot/blob/78926f610b1411b03464152472fd430012deb9ac/package/libffi/0004-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch

This issue is being hit on OpenBMC code when pulling the latest
libffi tag and building on a P8 ppc64le machine. I verified this
patch fixes the issue we are seeing.

Below is the original commit message:

Sicne commit 73dd43a, build on powerpc7
fails on:

In file included from ../src/powerpc/ffi.c:33:0:
../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target
 typedef _Float128 float128;
         ^~~~~~~~~

Fix this build failure by checking for __HAVE_FLOAT128 before using
_Float128, as _Float128 is enabled only on specific conditions, see
output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h:

 /* Defined to 1 if the current compiler invocation provides a
    floating-point type with the IEEE 754 binary128 format, and this glibc
    includes corresponding *f128 interfaces for it.  */
 #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \
     && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH
 # define __HAVE_FLOAT128 1
 #else
 # define __HAVE_FLOAT128 0
 #endif

Fixes:
 - http://autobuild.buildroot.org/results/5c9dd8fb3b6a128882b6250f197c80232d8a3b53

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
@geissonator
Copy link
Contributor Author

@ffontaine I assume there was no reason to not upstream this fix?

@ffontaine
Copy link
Contributor

There was one, non technical, reason: the total lack of answer to my first pull request which tried to upstream the first buildroot's patch more than one year ago: #448

halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Apr 27, 2020
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
armcc pushed a commit to lgirdk/poky that referenced this pull request Apr 27, 2020
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

(From OE-Core rev: 7bae99cd6c82fff6fa56bbddeb936e27b28e79ff)

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Apr 28, 2020
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/poky that referenced this pull request Apr 28, 2020
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

(From OE-Core rev: b461f10a6c456c63aa33fffd5e03692048904d48)

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kraj pushed a commit to YoeDistro/poky-old that referenced this pull request Apr 28, 2020
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

(From OE-Core rev: b461f10a6c456c63aa33fffd5e03692048904d48)

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kraj pushed a commit to YoeDistro/poky-old that referenced this pull request Apr 29, 2020
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

(From OE-Core rev: b461f10a6c456c63aa33fffd5e03692048904d48)

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Apr 29, 2020
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
@atgreen atgreen merged commit 4f9e20a into libffi:master May 1, 2020
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request May 7, 2020
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scheibelp pushed a commit to spack/spack that referenced this pull request Jun 12, 2020
Apply a patch to fix builds on Power7 and 8, wrongly requesting
float128 support.

Upstream patch: libffi/libffi#561
manifestoso pushed a commit to DeepThoughtHPC/spack that referenced this pull request Jun 19, 2020
Apply a patch to fix builds on Power7 and 8, wrongly requesting
float128 support.

Upstream patch: libffi/libffi#561
madvenka786 pushed a commit to madvenka786/libffi that referenced this pull request Aug 8, 2022
This is a patch pulled down from the following:
https://github.com/buildroot/buildroot/blob/78926f610b1411b03464152472fd430012deb9ac/package/libffi/0004-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch

This issue is being hit on OpenBMC code when pulling the latest
libffi tag and building on a P8 ppc64le machine. I verified this
patch fixes the issue we are seeing.

Below is the original commit message:

Sicne commit 73dd43a, build on powerpc7
fails on:

In file included from ../src/powerpc/ffi.c:33:0:
../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target
 typedef _Float128 float128;
         ^~~~~~~~~

Fix this build failure by checking for __HAVE_FLOAT128 before using
_Float128, as _Float128 is enabled only on specific conditions, see
output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h:

 /* Defined to 1 if the current compiler invocation provides a
    floating-point type with the IEEE 754 binary128 format, and this glibc
    includes corresponding *f128 interfaces for it.  */
 #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \
     && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH
 # define __HAVE_FLOAT128 1
 #else
 # define __HAVE_FLOAT128 0
 #endif

Fixes:
 - http://autobuild.buildroot.org/results/5c9dd8fb3b6a128882b6250f197c80232d8a3b53

Upstream-Status: Submitted [libffi#561]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

(From OE-Core rev: 76001bd4ae1e4f153f3d670b19e9ccd39c9fc4ef)

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
The latest released version of libffi no longer compiles on ppc64le
based machines. Some searching found a patch that fixed our issue but
had not been submitted upstream to libffi.

It has now been submitted upstream with this PR:
libffi/libffi#561

(From OE-Core rev: 76001bd4ae1e4f153f3d670b19e9ccd39c9fc4ef)

Signed-off-by: Andrew Geissler <geissonator@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0