From 3e43622856850d8c412e63897f9a9b74ea6e1606 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 24 Sep 2013 21:18:14 +0200 Subject: fix uclibc based toolchain for ppc targets --- toolchain/gcc/Makefile | 4 + toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch | 217 +++++++++++++++++++++ 2 files changed, 221 insertions(+) create mode 100644 toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch (limited to 'toolchain/gcc') diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 2bc954347..5d00be19b 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -62,8 +62,12 @@ GCC_CONFOPTS+= --enable-tls endif ifeq ($(ARCH),powerpc) +ifeq ($(ADK_TARGET_LIBC),musl) GCC_CONFOPTS+= --disable-target-optspace --with-long-double-64 --enable-secureplt else +GCC_CONFOPTS+= --disable-target-optspace --with-long-double-128 --enable-secureplt +endif +else GCC_CONFOPTS+= --enable-target-optspace endif diff --git a/toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch b/toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch new file mode 100644 index 000000000..0e64e8d0e --- /dev/null +++ b/toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch @@ -0,0 +1,217 @@ +diff -Nur gcc-4.7.3.orig/libstdc++-v3/include/tr1/cmath gcc-4.7.3/libstdc++-v3/include/tr1/cmath +--- gcc-4.7.3.orig/libstdc++-v3/include/tr1/cmath 2011-11-14 00:51:42.000000000 +0100 ++++ gcc-4.7.3/libstdc++-v3/include/tr1/cmath 2013-09-22 20:13:54.000000000 +0200 +@@ -159,143 +159,213 @@ + // functions + using ::acosh; + using ::acoshf; ++#ifdef __LONG_DOUBLE_128__ + using ::acoshl; ++#endif + + using ::asinh; + using ::asinhf; ++#ifdef __LONG_DOUBLE_128__ + using ::asinhl; ++#endif + + using ::atanh; + using ::atanhf; ++#ifdef __LONG_DOUBLE_128__ + using ::atanhl; ++#endif + + using ::cbrt; + using ::cbrtf; ++#ifdef __LONG_DOUBLE_128__ + using ::cbrtl; ++#endif + + using ::copysign; + using ::copysignf; ++#ifdef __LONG_DOUBLE_128__ + using ::copysignl; ++#endif + + using ::erf; + using ::erff; ++#ifdef __LONG_DOUBLE_128__ + using ::erfl; ++#endif + + using ::erfc; + using ::erfcf; ++#ifdef __LONG_DOUBLE_128__ + using ::erfcl; ++#endif + + using ::exp2; + using ::exp2f; ++#ifdef __LONG_DOUBLE_128__ + using ::exp2l; ++#endif + + using ::expm1; + using ::expm1f; ++#ifdef __LONG_DOUBLE_128__ + using ::expm1l; ++#endif + + using ::fdim; + using ::fdimf; ++#ifdef __LONG_DOUBLE_128__ + using ::fdiml; ++#endif + + using ::fma; + using ::fmaf; ++#ifdef __LONG_DOUBLE_128__ + using ::fmal; ++#endif + + using ::fmax; + using ::fmaxf; ++#ifdef __LONG_DOUBLE_128__ + using ::fmaxl; ++#endif + + using ::fmin; + using ::fminf; ++#ifdef __LONG_DOUBLE_128__ + using ::fminl; ++#endif + + using ::hypot; + using ::hypotf; ++#ifdef __LONG_DOUBLE_128__ + using ::hypotl; ++#endif + + using ::ilogb; + using ::ilogbf; ++#ifdef __LONG_DOUBLE_128__ + using ::ilogbl; ++#endif + + using ::lgamma; + using ::lgammaf; ++#ifdef __LONG_DOUBLE_128__ + using ::lgammal; ++#endif + + using ::llrint; + using ::llrintf; ++#ifdef __LONG_DOUBLE_128__ + using ::llrintl; ++#endif + + using ::llround; + using ::llroundf; ++#ifdef __LONG_DOUBLE_128__ + using ::llroundl; ++#endif + + using ::log1p; + using ::log1pf; ++#ifdef __LONG_DOUBLE_128__ + using ::log1pl; ++#endif + + using ::log2; + using ::log2f; ++#ifdef __LONG_DOUBLE_128__ + using ::log2l; ++#endif + + using ::logb; + using ::logbf; ++#ifdef __LONG_DOUBLE_128__ + using ::logbl; ++#endif + + using ::lrint; + using ::lrintf; ++#ifdef __LONG_DOUBLE_128__ + using ::lrintl; ++#endif + + using ::lround; + using ::lroundf; ++#ifdef __LONG_DOUBLE_128__ + using ::lroundl; ++#endif + + using ::nan; + using ::nanf; ++#ifdef __LONG_DOUBLE_128__ + using ::nanl; ++#endif + + using ::nearbyint; + using ::nearbyintf; ++#ifdef __LONG_DOUBLE_128__ + using ::nearbyintl; ++#endif + + using ::nextafter; + using ::nextafterf; ++#ifdef __LONG_DOUBLE_128__ + using ::nextafterl; ++#endif + + using ::nexttoward; + using ::nexttowardf; ++#ifdef __LONG_DOUBLE_128__ + using ::nexttowardl; ++#endif + + using ::remainder; + using ::remainderf; ++#ifdef __LONG_DOUBLE_128__ + using ::remainderl; ++#endif + + using ::remquo; + using ::remquof; ++#ifdef __LONG_DOUBLE_128__ + using ::remquol; ++#endif + + using ::rint; + using ::rintf; ++#ifdef __LONG_DOUBLE_128__ + using ::rintl; ++#endif + + using ::round; + using ::roundf; ++#ifdef __LONG_DOUBLE_128__ + using ::roundl; ++#endif + + using ::scalbln; + using ::scalblnf; ++#ifdef __LONG_DOUBLE_128__ + using ::scalblnl; ++#endif + + using ::scalbn; + using ::scalbnf; ++#ifdef __LONG_DOUBLE_128__ + using ::scalbnl; ++#endif + + using ::tgamma; + using ::tgammaf; ++#ifdef __LONG_DOUBLE_128__ + using ::tgammal; ++#endif + + using ::trunc; + using ::truncf; ++#ifdef __LONG_DOUBLE_128__ + using ::truncl; ++#endif + + #endif + -- cgit v1.2.3