package/gsl: fix powerpc build
PATCH 1/1 package/gsl: fix powerpc build
Fix the following powerpc build failures on:
- musl raised because fpu_control.h is not available:
In file included from fp.c:8:
fp-gnuppc.c:21:10: fatal error: fpu_control.h: No such file or directory
21 | #include <fpu_control.h>
| ^~~~~~~~~~~~~~~
- glibc raised because _FPU_RC_NEAREST is undefined if _SOFT_FLOAT is set:
In file included from fp.c:8:fp-gnuppc.c: In function 'gsl_ieee_set_mode':
fp-gnuppc.c:53:15: error: '_FPU_RC_NEAREST' undeclared (first use in this function)
53 | mode |= _FPU_RC_NEAREST ;
| ^~~~~~~~~~~~~~~These build failures are raised since the addition of the package in commit 9d9f7feba4ffbfeb54479f1ad90d47acca1a6f0b
Fixes:
- http://autobuild.buildroot.org/results/d73e116c81bf16d2e55fced215d6bd3b382fef10
- http://autobuild.buildroot.org/results/48403946bb4cda9013e51db59c1b2ffdcf4e2854
--- ...01-configure.ac-fix-build-on-powerpc.patch | 53 +++++++++++++++++++ package/gsl/gsl.mk | 2 + 2 files changed, 55 insertions(+) create mode 100644 package/gsl/0001-configure.ac-fix-build-on-powerpc.patch
package/gsl/0001-configure.ac-fix-build-on-powerpc.patch new file +53 -0
@@ -0,0 +1,53 @@ +From 84e62d57b90b41a0c96bb9fb6ec61ecaac76a1ab Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sat, 5 Nov 2022 21:31:36 +0100 +Subject: [PATCH] configure.ac: fix build on powerpc + +Fix the following powerpc build failures on: + - musl raised because fpu_control.h is not available: + +In file included from fp.c:8: +fp-gnuppc.c:21:10: fatal error: fpu_control.h: No such file or directory + 21 | #include <fpu_control.h> + | ^~~~~~~~~~~~~~~ + + - glibc raised because _FPU_RC_NEAREST is undefined if _SOFT_FLOAT is + set: + + In file included from fp.c:8: +fp-gnuppc.c: In function 'gsl_ieee_set_mode': +fp-gnuppc.c:53:15: error: '_FPU_RC_NEAREST' undeclared (first use in this function) + 53 | mode |= _FPU_RC_NEAREST ; + | ^~~~~~~~~~~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/d73e116c81bf16d2e55fced215d6bd3b382fef10 + - http://autobuild.buildroot.org/results/48403946bb4cda9013e51db59c1b2ffdcf4e2854 + +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + configure.ac | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/configure.ac b/configure.ac +index bfd9ca30..1ee6dca0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -389,6 +389,14 @@ if test "$ac_cv_c_ieee_interface" = "gnux86" ; then + fi + fi + ++if test "$ac_cv_c_ieee_interface" = "gnuppc" ; then ++ AC_CACHE_CHECK([for _FPU_RC_NEAREST], ac_cv_c__fpu_rc_nearest, ++ [ac_cv_c__fpu_rc_nearest=no ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <fpu_control.h> ++]], [[ unsigned short mode = _FPU_RC_NEAREST ; ]])],[ac_cv_c__fpu_rc_nearest="yes"],[ac_cv_c_ieee_interface=unknown]) ++ ]) ++fi ++ + ac_tr_ieee_interface=HAVE_`echo $ac_cv_c_ieee_interface | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_IEEE_INTERFACE + AC_DEFINE_UNQUOTED($ac_tr_ieee_interface,1,[IEEE Interface Type]) + +-- +2.35.1 +
package/gsl/gsl.mk +2 -0
@@ -10,6 +10,8 @@ GSL_INSTALL_STAGING = YES GSL_LICENSE = GPL-3.0 GSL_LICENSE_FILES = COPYING GSL_CONFIG_SCRIPTS = gsl-config +# We're patching configure.ac +GSL_AUTORECONF = YES # uClibc pretends to have fenv support as it installs <fenv.h>, but in # practice, it only implements it for i386. Problem reported upstream
Signature · 6 lines
2.35.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 24 lines · On Sat, 5 Nov 2022 21:52:39 +0100 Fabrice Fontaine…
Fix the following powerpc build failures on:
- musl raised becausefpu_control.his not available:In file included from fp.c:8:
fp-gnuppc.c:21:10: fatal error:fpu_control.h: No such file or directory
21 | #include <fpu_control.h>| ^~~~~~~~~~~~~~~- glibc raised because
_FPU_RC_NEARESTis undefined if_SOFT_FLOATis set:In file included from fp.c:8:
fp-gnuppc.c: In function 'gsl_ieee_set_mode':
fp-gnuppc.c:53:15: error: '_FPU_RC_NEAREST' undeclared (first use in this function)53 | mode |= _FPU_RC_NEAREST ; | ^~~~~~~~~~~~~~~These build failures are raised since the addition of the package in commit
9d9f7feba4ffbfeb54479f1ad90d47acca1a6f0bFixes:
- http://autobuild.buildroot.org/results/d73e116c81bf16d2e55fced215d6bd3b382fef10
- http://autobuild.buildroot.org/results/48403946bb4cda9013e51db59c1b2ffdcf4e2854
Quoted 6 lines
Signed-off-by Fabrice Fontaine <[email protected]>--- ...01-configure.ac-fix-build-on-powerpc.patch | 53 +++++++++++++++++++ package/gsl/gsl.mk | 2 + 2 files changed, 55 insertions(+) create mode 100644 package/gsl/0001-configure.ac-fix-build-on-powerpc.patch
Applied to master, thanks! Don't forget to submit upstream :-)
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Fix the following powerpc build failures on:
- musl raised becausefpu_control.his not available:In file included from fp.c:8:
fp-gnuppc.c:21:10: fatal error:fpu_control.h: No such file or directory
21 | #include <fpu_control.h>| ^~~~~~~~~~~~~~~- glibc raised because
_FPU_RC_NEARESTis undefined if_SOFT_FLOATis set:In file included from fp.c:8:
fp-gnuppc.c: In function 'gsl_ieee_set_mode':
fp-gnuppc.c:53:15: error: '_FPU_RC_NEAREST' undeclared (first use in this function)53 | mode |= _FPU_RC_NEAREST ; | ^~~~~~~~~~~~~~~
Quoted 8 lines
These build failures are raised since the addition of the package in commit
9d9f7feba4ffbfeb54479f1ad90d47acca1a6f0bFixes:
- http://autobuild.buildroot.org/results/d73e116c81bf16d2e55fced215d6bd3b382fef10
- http://autobuild.buildroot.org/results/48403946bb4cda9013e51db59c1b2ffdcf4e2854Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2022.08.x and 2022.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot