From 41d97c378987786111ef78c30aa8de597e53f7e2 Mon Sep 17 00:00:00 2001 From: cm8 Date: Fri, 22 Jun 2018 15:33:20 +0200 Subject: [PATCH] define long double math only if sizeof long double > sizeof double - the gcc-5.5.0 toolchain cross-compiled for mips is built without long double math functions (acosl, roundl, etc. are unavailable) - this lead to libstdc++ disabling support for C99_MATH_TR1 funcs _fully_ during its configure (glibcxx_cv_c99_math_tr1=no) -> Enable the subset (float, double) of C99_MATH_TR1 funcs, by masking long double math functions IF long double size equals that of double, for now (if long double is greater, assume that acosl, roundl are indeed implemented) Freetz uses the toolchain with soft-float and the o32 mips abi. Consequently gcc/config/mips/mips.h sets long double size = 64 (bits). [1] The t-softfp-tf tetra float support on mips is enabled conditionally. It is only enabled if ac_cv_sizeof_long_double = 16 (bytes), which is true for mips_abi == ABI_N32 || mips_abi == ABI_64 (TARGET_NEWABI). [2] Thus to have long double math support backed by soft-float an ABI change is necessary. This is impractical since freetz often modifies (instead of replacing) an existing firmware, the ABI of which is factory-preset. Some compilers treat using long double with O32 ABI (i.e. "old 32" abi) an error, not so gcc, because the abi spec did not consider long double types. [3] Long story short, having acosl, roundl, etc. builtins backed by a gcc soft-float emulation lib in TFmode won't work without ABI change. Violating O32 ABI using -mlong-double-128 qualifies as such (e.g. a lib on the target /may/ have used long-double-64 in function defs, demanding for recompilation of all target executables). [4], [5] Unfortunately llvm/clang add to the confusion, since comments in their target calling convention definitions say N32 ABI long double is equivalent to double. This is inconsistent with [1], [3]. [6] There's added commented lines in uclibc.mk that show how to enable long double within the scope of uclibc only - this actually builds with a long double size of 8 (bytes) as well, if aliasing double. UCLIBC_HAS_LONG_DOUBLE should be consistent with the setting of UCLIBCXX_HAS_LONG_DOUBLE and with long double support in GLIBCXX (i.e. in libstdc++), so this is inactive/commented work not only for the fact that we cannot/should not use it with O32 ABI. The approach of this patch is thus to separate long_double and non-long_double math support in cmath headers, as to enable the latter for c++11 applications in O32 ABI soft-float environments, (which somewhat violates c++11 since the spec demands presence of long double specializations), and enable both in NEWABI envs. In its current form it may work for gcc-4.8.x and gcc-4.9.x as well, adapt toolchain/make/target/gcc/5/850*.patch and copy to gcc/4.8 or gcc/4.9 patch directories to try (not tested here as 5.5.0 tc works). [1] https://github.com/gcc-mirror/gcc/blob/561e857cd34210c92a41e540d33f104665533859/gcc/config/mips/mips.h#L1572 [2] https://github.com/gcc-mirror/gcc/blob/a5a22b4fd40aec08398ab45c6b33a698789f0d29/libgcc/config.host#L151 [3] ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf (page 20) [4] https://gcc.gnu.org/onlinedocs/gccint/Soft-float-library-routines.html [5] https://gcc.gnu.org/onlinedocs/gccint/Machine-Modes.html [6] https://github.com/Microsoft/llvm/blob/71f3f90b04c63182b7ba28d0f33cd6bdda56d95a/lib/Target/Mips/MipsCallingConv.td#L197 --- ...bstdc++-long_double_math_conditional.patch | 732 ++++++++++++++++++ toolchain/make/target/uclibc/uclibc.mk | 4 + 2 files changed, 736 insertions(+) create mode 100644 toolchain/make/target/gcc/5/850-libstdc++-long_double_math_conditional.patch diff --git a/toolchain/make/target/gcc/5/850-libstdc++-long_double_math_conditional.patch b/toolchain/make/target/gcc/5/850-libstdc++-long_double_math_conditional.patch new file mode 100644 index 0000000000..dbad237455 --- /dev/null +++ b/toolchain/make/target/gcc/5/850-libstdc++-long_double_math_conditional.patch @@ -0,0 +1,732 @@ +diff -ur libstdc++-v3/acinclude.m4 libstdc++-v3.patched/acinclude.m4 +--- libstdc++-v3/acinclude.m4 2016-12-13 12:53:03.000000000 +0100 ++++ libstdc++-v3.patched/acinclude.m4 2018-06-22 14:33:57.290147145 +0200 +@@ -1643,109 +1643,111 @@ + typedef float_t my_float_t; + acosh(0.0); + acoshf(0.0f); +- acoshl(0.0l); + asinh(0.0); + asinhf(0.0f); +- asinhl(0.0l); + atanh(0.0); + atanhf(0.0f); +- atanhl(0.0l); + cbrt(0.0); + cbrtf(0.0f); +- cbrtl(0.0l); + copysign(0.0, 0.0); + copysignf(0.0f, 0.0f); +- copysignl(0.0l, 0.0l); + erf(0.0); + erff(0.0f); +- erfl(0.0l); + erfc(0.0); + erfcf(0.0f); +- erfcl(0.0l); + exp2(0.0); + exp2f(0.0f); +- exp2l(0.0l); + expm1(0.0); + expm1f(0.0f); +- expm1l(0.0l); + fdim(0.0, 0.0); + fdimf(0.0f, 0.0f); +- fdiml(0.0l, 0.0l); + fma(0.0, 0.0, 0.0); + fmaf(0.0f, 0.0f, 0.0f); +- fmal(0.0l, 0.0l, 0.0l); + fmax(0.0, 0.0); + fmaxf(0.0f, 0.0f); +- fmaxl(0.0l, 0.0l); + fmin(0.0, 0.0); + fminf(0.0f, 0.0f); +- fminl(0.0l, 0.0l); + hypot(0.0, 0.0); + hypotf(0.0f, 0.0f); +- hypotl(0.0l, 0.0l); + ilogb(0.0); + ilogbf(0.0f); +- ilogbl(0.0l); + lgamma(0.0); + lgammaf(0.0f); +- lgammal(0.0l); + llrint(0.0); + llrintf(0.0f); +- llrintl(0.0l); + llround(0.0); + llroundf(0.0f); +- llroundl(0.0l); + log1p(0.0); + log1pf(0.0f); +- log1pl(0.0l); + log2(0.0); + log2f(0.0f); +- log2l(0.0l); + logb(0.0); + logbf(0.0f); +- logbl(0.0l); + lrint(0.0); + lrintf(0.0f); +- lrintl(0.0l); + lround(0.0); + lroundf(0.0f); +- lroundl(0.0l); + nan(0); + nanf(0); +- nanl(0); + nearbyint(0.0); + nearbyintf(0.0f); +- nearbyintl(0.0l); + nextafter(0.0, 0.0); + nextafterf(0.0f, 0.0f); +- nextafterl(0.0l, 0.0l); + nexttoward(0.0, 0.0); + nexttowardf(0.0f, 0.0f); +- nexttowardl(0.0l, 0.0l); + remainder(0.0, 0.0); + remainderf(0.0f, 0.0f); +- remainderl(0.0l, 0.0l); + remquo(0.0, 0.0, 0); + remquof(0.0f, 0.0f, 0); +- remquol(0.0l, 0.0l, 0); + rint(0.0); + rintf(0.0f); +- rintl(0.0l); + round(0.0); + roundf(0.0f); +- roundl(0.0l); + scalbln(0.0, 0l); + scalblnf(0.0f, 0l); +- scalblnl(0.0l, 0l); + scalbn(0.0, 0); + scalbnf(0.0f, 0); +- scalbnl(0.0l, 0); + tgamma(0.0); + tgammaf(0.0f); +- tgammal(0.0l); + trunc(0.0); + truncf(0.0f); ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ ++ acoshl(0.0l); ++ asinhl(0.0l); ++ atanhl(0.0l); ++ cbrtl(0.0l); ++ copysignl(0.0l, 0.0l); ++ erfl(0.0l); ++ erfcl(0.0l); ++ exp2l(0.0l); ++ expm1l(0.0l); ++ fdiml(0.0l, 0.0l); ++ fmal(0.0l, 0.0l, 0.0l); ++ fmaxl(0.0l, 0.0l); ++ fminl(0.0l, 0.0l); ++ hypotl(0.0l, 0.0l); ++ ilogbl(0.0l); ++ lgammal(0.0l); ++ llrintl(0.0l); ++ llroundl(0.0l); ++ log1pl(0.0l); ++ log2l(0.0l); ++ logbl(0.0l); ++ lrintl(0.0l); ++ lroundl(0.0l); ++ nanl(0); ++ nearbyintl(0.0l); ++ nextafterl(0.0l, 0.0l); ++ nexttowardl(0.0l, 0.0l); ++ remainderl(0.0l, 0.0l); ++ remquol(0.0l, 0.0l, 0); ++ rintl(0.0l); ++ roundl(0.0l); ++ scalblnl(0.0l, 0l); ++ scalbnl(0.0l, 0); ++ tgammal(0.0l); + truncl(0.0l); ++#endif + ],[glibcxx_cv_c99_math_tr1=yes], [glibcxx_cv_c99_math_tr1=no]) + ]) + AC_MSG_RESULT($glibcxx_cv_c99_math_tr1) +diff -ur libstdc++-v3/include/c_global/cmath libstdc++-v3.patched/include/c_global/cmath +--- libstdc++-v3/include/c_global/cmath 2016-12-01 16:15:40.000000000 +0100 ++++ libstdc++-v3.patched/include/c_global/cmath 2018-06-22 13:55:15.539241639 +0200 +@@ -1094,143 +1094,213 @@ + // functions + using ::acosh; + using ::acoshf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::acoshl; ++#endif + + using ::asinh; + using ::asinhf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::asinhl; ++#endif + + using ::atanh; + using ::atanhf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::atanhl; ++#endif + + using ::cbrt; + using ::cbrtf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::cbrtl; ++#endif + + using ::copysign; + using ::copysignf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::copysignl; ++#endif + + using ::erf; + using ::erff; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::erfl; ++#endif + + using ::erfc; + using ::erfcf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::erfcl; ++#endif + + using ::exp2; + using ::exp2f; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::exp2l; ++#endif + + using ::expm1; + using ::expm1f; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::expm1l; ++#endif + + using ::fdim; + using ::fdimf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::fdiml; ++#endif + + using ::fma; + using ::fmaf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::fmal; ++#endif + + using ::fmax; + using ::fmaxf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::fmaxl; ++#endif + + using ::fmin; + using ::fminf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::fminl; ++#endif + + using ::hypot; + using ::hypotf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::hypotl; ++#endif + + using ::ilogb; + using ::ilogbf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::ilogbl; ++#endif + + using ::lgamma; + using ::lgammaf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::lgammal; ++#endif + + using ::llrint; + using ::llrintf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::llrintl; ++#endif + + using ::llround; + using ::llroundf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::llroundl; ++#endif + + using ::log1p; + using ::log1pf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::log1pl; ++#endif + + using ::log2; + using ::log2f; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::log2l; ++#endif + + using ::logb; + using ::logbf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::logbl; ++#endif + + using ::lrint; + using ::lrintf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::lrintl; ++#endif + + using ::lround; + using ::lroundf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::lroundl; ++#endif + + using ::nan; + using ::nanf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::nanl; ++#endif + + using ::nearbyint; + using ::nearbyintf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::nearbyintl; ++#endif + + using ::nextafter; + using ::nextafterf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::nextafterl; ++#endif + + using ::nexttoward; + using ::nexttowardf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::nexttowardl; ++#endif + + using ::remainder; + using ::remainderf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::remainderl; ++#endif + + using ::remquo; + using ::remquof; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::remquol; ++#endif + + using ::rint; + using ::rintf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::rintl; ++#endif + + using ::round; + using ::roundf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::roundl; ++#endif + + using ::scalbln; + using ::scalblnf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::scalblnl; ++#endif + + using ::scalbn; + using ::scalbnf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::scalbnl; ++#endif + + using ::tgamma; + using ::tgammaf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::tgammal; ++#endif + + using ::trunc; + using ::truncf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::truncl; ++#endif + + /// Additional overloads. + #ifndef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP +diff -ur libstdc++-v3/include/tr1/cmath libstdc++-v3.patched/include/tr1/cmath +--- libstdc++-v3/include/tr1/cmath 2016-12-01 16:15:40.000000000 +0100 ++++ libstdc++-v3.patched/include/tr1/cmath 2018-06-22 13:55:02.503425345 +0200 +@@ -158,143 +158,213 @@ + // functions + using ::acosh; + using ::acoshf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::acoshl; ++#endif + + using ::asinh; + using ::asinhf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::asinhl; ++#endif + + using ::atanh; + using ::atanhf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::atanhl; ++#endif + + using ::cbrt; + using ::cbrtf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::cbrtl; ++#endif + + using ::copysign; + using ::copysignf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::copysignl; ++#endif + + using ::erf; + using ::erff; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::erfl; ++#endif + + using ::erfc; + using ::erfcf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::erfcl; ++#endif + + using ::exp2; + using ::exp2f; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::exp2l; ++#endif + + using ::expm1; + using ::expm1f; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::expm1l; ++#endif + + using ::fdim; + using ::fdimf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::fdiml; ++#endif + + using ::fma; + using ::fmaf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::fmal; ++#endif + + using ::fmax; + using ::fmaxf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::fmaxl; ++#endif + + using ::fmin; + using ::fminf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::fminl; ++#endif + + using ::hypot; + using ::hypotf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::hypotl; ++#endif + + using ::ilogb; + using ::ilogbf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::ilogbl; ++#endif + + using ::lgamma; + using ::lgammaf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::lgammal; ++#endif + + using ::llrint; + using ::llrintf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::llrintl; ++#endif + + using ::llround; + using ::llroundf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::llroundl; ++#endif + + using ::log1p; + using ::log1pf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::log1pl; ++#endif + + using ::log2; + using ::log2f; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::log2l; ++#endif + + using ::logb; + using ::logbf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::logbl; ++#endif + + using ::lrint; + using ::lrintf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::lrintl; ++#endif + + using ::lround; + using ::lroundf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::lroundl; ++#endif + + using ::nan; + using ::nanf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::nanl; ++#endif + + using ::nearbyint; + using ::nearbyintf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::nearbyintl; ++#endif + + using ::nextafter; + using ::nextafterf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::nextafterl; ++#endif + + using ::nexttoward; + using ::nexttowardf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::nexttowardl; ++#endif + + using ::remainder; + using ::remainderf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::remainderl; ++#endif + + using ::remquo; + using ::remquof; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::remquol; ++#endif + + using ::rint; + using ::rintf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::rintl; ++#endif + + using ::round; + using ::roundf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::roundl; ++#endif + + using ::scalbln; + using ::scalblnf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::scalblnl; ++#endif + + using ::scalbn; + using ::scalbnf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::scalbnl; ++#endif + + using ::tgamma; + using ::tgammaf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::tgammal; ++#endif + + using ::trunc; + using ::truncf; ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ + using ::truncl; ++#endif + + #endif + +diff -ur libstdc++-v3/configure libstdc++-v3.patched/configure +--- libstdc++-v3/configure 2018-06-22 14:56:35.078749516 +0200 ++++ libstdc++-v3.patched/configure 2018-06-22 16:44:23.632891455 +0200 +@@ -19254,109 +19254,111 @@ + typedef float_t my_float_t; + acosh(0.0); + acoshf(0.0f); +- acoshl(0.0l); + asinh(0.0); + asinhf(0.0f); +- asinhl(0.0l); + atanh(0.0); + atanhf(0.0f); +- atanhl(0.0l); + cbrt(0.0); + cbrtf(0.0f); +- cbrtl(0.0l); + copysign(0.0, 0.0); + copysignf(0.0f, 0.0f); +- copysignl(0.0l, 0.0l); + erf(0.0); + erff(0.0f); +- erfl(0.0l); + erfc(0.0); + erfcf(0.0f); +- erfcl(0.0l); + exp2(0.0); + exp2f(0.0f); +- exp2l(0.0l); + expm1(0.0); + expm1f(0.0f); +- expm1l(0.0l); + fdim(0.0, 0.0); + fdimf(0.0f, 0.0f); +- fdiml(0.0l, 0.0l); + fma(0.0, 0.0, 0.0); + fmaf(0.0f, 0.0f, 0.0f); +- fmal(0.0l, 0.0l, 0.0l); + fmax(0.0, 0.0); + fmaxf(0.0f, 0.0f); +- fmaxl(0.0l, 0.0l); + fmin(0.0, 0.0); + fminf(0.0f, 0.0f); +- fminl(0.0l, 0.0l); + hypot(0.0, 0.0); + hypotf(0.0f, 0.0f); +- hypotl(0.0l, 0.0l); + ilogb(0.0); + ilogbf(0.0f); +- ilogbl(0.0l); + lgamma(0.0); + lgammaf(0.0f); +- lgammal(0.0l); + llrint(0.0); + llrintf(0.0f); +- llrintl(0.0l); + llround(0.0); + llroundf(0.0f); +- llroundl(0.0l); + log1p(0.0); + log1pf(0.0f); +- log1pl(0.0l); + log2(0.0); + log2f(0.0f); +- log2l(0.0l); + logb(0.0); + logbf(0.0f); +- logbl(0.0l); + lrint(0.0); + lrintf(0.0f); +- lrintl(0.0l); + lround(0.0); + lroundf(0.0f); +- lroundl(0.0l); + nan(0); + nanf(0); +- nanl(0); + nearbyint(0.0); + nearbyintf(0.0f); +- nearbyintl(0.0l); + nextafter(0.0, 0.0); + nextafterf(0.0f, 0.0f); +- nextafterl(0.0l, 0.0l); + nexttoward(0.0, 0.0); + nexttowardf(0.0f, 0.0f); +- nexttowardl(0.0l, 0.0l); + remainder(0.0, 0.0); + remainderf(0.0f, 0.0f); +- remainderl(0.0l, 0.0l); + remquo(0.0, 0.0, 0); + remquof(0.0f, 0.0f, 0); +- remquol(0.0l, 0.0l, 0); + rint(0.0); + rintf(0.0f); +- rintl(0.0l); + round(0.0); + roundf(0.0f); +- roundl(0.0l); + scalbln(0.0, 0l); + scalblnf(0.0f, 0l); +- scalblnl(0.0l, 0l); + scalbn(0.0, 0); + scalbnf(0.0f, 0); +- scalbnl(0.0l, 0); + tgamma(0.0); + tgammaf(0.0f); +- tgammal(0.0l); + trunc(0.0); + truncf(0.0f); ++#if __SIZEOF_LONG_DOUBLE__ > __SIZEOF_DOUBLE__ ++ acoshl(0.0l); ++ asinhl(0.0l); ++ atanhl(0.0l); ++ cbrtl(0.0l); ++ copysignl(0.0l, 0.0l); ++ erfl(0.0l); ++ erfcl(0.0l); ++ exp2l(0.0l); ++ expm1l(0.0l); ++ fdiml(0.0l, 0.0l); ++ fmal(0.0l, 0.0l, 0.0l); ++ fmaxl(0.0l, 0.0l); ++ fminl(0.0l, 0.0l); ++ hypotl(0.0l, 0.0l); ++ ilogbl(0.0l); ++ lgammal(0.0l); ++ llrintl(0.0l); ++ llroundl(0.0l); ++ log1pl(0.0l); ++ log2l(0.0l); ++ logbl(0.0l); ++ lrintl(0.0l); ++ lroundl(0.0l); ++ nanl(0); ++ nearbyintl(0.0l); ++ nextafterl(0.0l, 0.0l); ++ nexttowardl(0.0l, 0.0l); ++ remainderl(0.0l, 0.0l); ++ remquol(0.0l, 0.0l, 0); ++ rintl(0.0l); ++ roundl(0.0l); ++ scalblnl(0.0l, 0l); ++ scalbnl(0.0l, 0); ++ tgammal(0.0l); + truncl(0.0l); ++#endif + + ; + return 0; diff --git a/toolchain/make/target/uclibc/uclibc.mk b/toolchain/make/target/uclibc/uclibc.mk index 3416e45c88..a47dde3230 100644 --- a/toolchain/make/target/uclibc/uclibc.mk +++ b/toolchain/make/target/uclibc/uclibc.mk @@ -71,6 +71,10 @@ ifeq ($(FREETZ_TARGET_UCLIBC_0_9_33),y) # see http://lists.uclibc.org/pipermail/uclibc/2014-September/048597.html for details find $(UCLIBC_DIR)/libpthread/nptl -name "*pt-vfork*" -exec $(RM) {} \+ endif +#ifneq ($(or $(FREETZ_TARGET_UCLIBC_0_9_28),$(FREETZ_TARGET_UCLIBC_0_9_29)),y) +# sed -i -e '/^config UCLIBC_HAS_LONG_DOUBLE/{N;N;N;N;s/TARGET_/(TARGET_mips \&\& (CONFIG_MIPS_ISA_MIPS32R2 || CONFIG_MIPS_ISA_MIPS64)) || \0/}' \ +# $(UCLIBC_DIR)/extra/Configs/Config.in.arch +#endif cp -dpf $(DL_DIR)/$(UCLIBC_LOCALE_DATA_FILENAME) $(UCLIBC_DIR)/extra/locale/ touch $@