gcc: Abstract long double configuration into python function
authorKhem Raj <raj.khem@gmail.com>
Thu, 14 Aug 2014 19:05:57 +0000 (14:05 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 Aug 2014 17:21:50 +0000 (18:21 +0100)
musl does not support IBM 128 long double for ppc, instead of
doing complex overrides move it into a pythong snippet which
is easier to read and more compact.

(From OE-Core rev: e7011429e40ae96b9c9f1e7f3c6f4c1f1102607f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-common.inc
meta/recipes-devtools/gcc/gcc-configure-common.inc

index 4c55542..497d06a 100644 (file)
@@ -25,6 +25,11 @@ def get_gcc_mips_plt_setting(bb, d):
         return "--with-mips-plt"
     return ""
 
+def get_long_double_setting(bb, d):
+    if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC', True) in [ 'uclibc', 'eglibc' ]:
+        return "--with-long-double-128"
+    return ""
+
 def get_gcc_multiarch_setting(bb, d):
     target_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
     multiarch_options = {
index 3f9d03f..71dce12 100644 (file)
@@ -47,6 +47,7 @@ EXTRA_OECONF = "\
     ${EXTRA_OECONF_GCC_FLOAT} \
     ${EXTRA_OECONF_PATHS} \
     ${@get_gcc_mips_plt_setting(bb, d)} \
+    ${@get_long_double_setting(bb, d)} \
     ${@get_gcc_multiarch_setting(bb, d)} \
 "
 
@@ -66,10 +67,6 @@ EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune
 EXTRA_OECONF_GCC_FLOAT ??= ""
 CPPFLAGS = ""
 
-# powerpc needs this to comply with the ABI
-EXTRA_OECONF_append_powerpc = " --with-long-double-128"
-EXTRA_OECONF_append_powerpc64 = " --with-long-double-128"
-
 SYSTEMHEADERS = "${target_includedir}"
 SYSTEMLIBS = "${target_base_libdir}/"
 SYSTEMLIBS1 = "${target_libdir}/"