From: Richard Purdie Date: Thu, 9 Nov 2006 22:54:26 +0000 (+0000) Subject: gcc: Factor get_gcc_fpu_setting() into a common .inc file (removing method errors) X-Git-Tag: Release-2010-05/1~9453^2~481^2~3^2~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b74404fea18ab4304a409f395ab65c185c750d23;p=openembedded.git gcc: Factor get_gcc_fpu_setting() into a common .inc file (removing method errors) --- diff --git a/packages/gcc/gcc-fpu.inc b/packages/gcc/gcc-fpu.inc new file mode 100644 index 0000000000..bb03d95567 --- /dev/null +++ b/packages/gcc/gcc-fpu.inc @@ -0,0 +1,6 @@ + +def get_gcc_fpu_setting(bb, d): + if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: + return "--with-float=soft" + return "" + diff --git a/packages/gcc/gcc3-build.inc b/packages/gcc/gcc3-build.inc index 6260a51533..2924f0f9dd 100644 --- a/packages/gcc/gcc3-build.inc +++ b/packages/gcc/gcc3-build.inc @@ -54,10 +54,7 @@ ARCH_FLAGS_FOR_TARGET_slugos = "${TARGET_CC_ARCH}" ARCH_FLAGS_FOR_TARGET_unslung = "${TARGET_CC_ARCH}" EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'" -def get_gcc_fpu_setting(bb, d): - if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: - return "--with-float=soft" - return "" +require gcc-fpu.inc python __anonymous () { import bb, re diff --git a/packages/gcc/gcc_3.3.3.bb b/packages/gcc/gcc_3.3.3.bb index 8852f81def..0c237a9166 100644 --- a/packages/gcc/gcc_3.3.3.bb +++ b/packages/gcc/gcc_3.3.3.bb @@ -124,10 +124,7 @@ EXTRA_OECONF_uclibc = "--disable-__cxa_atexit" EXTRA_OECONF_glibc = "--enable-__cxa_atexit" EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}" -def get_gcc_fpu_setting(bb, d): - if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: - return "--with-float=soft" - return "" +require gcc-fpu.inc python __anonymous () { import bb, re diff --git a/packages/gcc/gcc_3.3.4.bb b/packages/gcc/gcc_3.3.4.bb index 49f14cd888..bb52fa6a1f 100644 --- a/packages/gcc/gcc_3.3.4.bb +++ b/packages/gcc/gcc_3.3.4.bb @@ -103,10 +103,7 @@ EXTRA_OECONF_uclibc = "--disable-__cxa_atexit" EXTRA_OECONF_glibc = "--enable-__cxa_atexit" EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}" -def get_gcc_fpu_setting(bb, d): - if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: - return "--with-float=soft" - return "" +require gcc-fpu.inc python __anonymous () { import bb, re