perl: fix musl compatibility

- Add patch to inhibit the libm IEEE math switch on musl
 - Add postprocessing for config.sh to the Makefile to fixup
   defines for musl, idea taken
   from http://patchwork.openembedded.org/patch/91707/

This is the least invasive approach I could come up to fix the build
failure asap. Another possibility is maintaining yet another set of
musl specific architecture config files, but I think that this introduces
a lot of maintenance overhead.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
Jo-Philipp Wich
2015-06-17 17:36:03 +02:00
parent 4116e327af
commit f9ac3e632b
2 changed files with 32 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
--- a/pp.c
+++ b/pp.c
@@ -43,7 +43,7 @@ extern Pid_t getpid (void);
* Some BSDs and Cygwin default to POSIX math instead of IEEE.
* This switches them over to IEEE.
*/
-#if defined(LIBM_LIB_VERSION)
+#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__))
_LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
#endif