package/python-scipy: fix sh4 build
PATCH 1/1 package/python-scipy: fix sh4 build
Fix the following sh4 build failure raised since the addition of the package in commit e10431db29e08c3ae56c145165bf110bd17f2a6c:
INFO: sh4aeb-linux-gcc: scipy/special/_test_round.cscipy/special/_test_round.c: In function '__pyx_pf_5scipy_7special_11_test_round_have_fenv':scipy/special/_test_round.c:2353:30: error: 'FE_UPWARD' undeclared (first use in this function)
2353 | __pyx_t_1 = ((fesetround(FE_UPWARD) != 0) != 0);
| ^~~~~~~~~
Retrieve debian patch as upstream doesn't want to fix this SH4 specific
issue: https://github.com/scipy/scipy/issues/15584
Fixes:
- http://autobuild.buildroot.org/results/b82d8ed02ba5d094a0d4054e0de28e95c9d3554d
--- package/python-scipy/0001-build_sh4_FE.patch | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/python-scipy/0001-build_sh4_FE.patch
package/python-scipy/0001-build_sh4_FE.patch new file +27 -0
@@ -0,0 +1,27 @@ +build sh4 FE + +ensures FE_UPWARD and FE_DOWNWARD are defined for sh4 architecture. + +Closes: #1007769. + +[Retrieved from: +https://salsa.debian.org/python-team/packages/scipy/-/blob/master/debian/patches/build_sh4_FE.patch] +Signed-off-by: Fabrice Fontaine <[email protected]> + +Index: scipy/scipy/special/_round.h +=================================================================== +--- scipy.orig/scipy/special/_round.h 2021-08-17 17:46:09.254650951 +0200 ++++ scipy/scipy/special/_round.h 2022-06-14 08:40:23.531748220 +0200 +@@ -69,5 +69,12 @@ + + #endif + ++/* SH4 is not C99 compliant, see https://github.com/scipy/scipy/issues/15584 */ ++#ifndef FE_UPWARD ++#define FE_UPWARD -1 ++#endif ++#ifndef FE_DOWNWARD ++#define FE_DOWNWARD -1 ++#endif + + #endif /* _round.h */
Signature · 6 lines
2.35.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Fix the following sh4 build failure raised since the addition of the package in commit
e10431db29e08c3ae56c145165bf110bd17f2a6c:INFO: sh4aeb-linux-gcc:
scipy/special/_test_round.cscipy/special/_test_round.c: In function '__pyx_pf_5scipy_7special_11_test_round_have_fenv':scipy/special/_test_round.c:2353:30: error: 'FE_UPWARD' undeclared (first use in this function)
2353 |__pyx_t_1= ((fesetround(FE_UPWARD)!= 0) != 0);
| ^~~~~~~~~
Quoted 7 lines
Retrieve debian patch as upstream doesn't want to fix this SH4 specific
issue: https://github.com/scipy/scipy/issues/15584Fixes:
- http://autobuild.buildroot.org/results/b82d8ed02ba5d094a0d4054e0de28e95c9d3554dSigned-off-by Fabrice Fontaine <[email protected]>
Committed to 2022.08.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot