gcc: Factor get_gcc_fpu_setting() into a common .inc file (removing method errors)
authorRichard Purdie <rpurdie@rpsys.net>
Thu, 9 Nov 2006 22:54:26 +0000 (22:54 +0000)
committerRichard Purdie <rpurdie@rpsys.net>
Thu, 9 Nov 2006 22:54:26 +0000 (22:54 +0000)
packages/gcc/gcc-fpu.inc [new file with mode: 0644]
packages/gcc/gcc3-build.inc
packages/gcc/gcc_3.3.3.bb
packages/gcc/gcc_3.3.4.bb

diff --git a/packages/gcc/gcc-fpu.inc b/packages/gcc/gcc-fpu.inc
new file mode 100644 (file)
index 0000000..bb03d95
--- /dev/null
@@ -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 ""
+
index 6260a51..2924f0f 100644 (file)
@@ -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
index 8852f81..0c237a9 100644 (file)
@@ -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
index 49f14cd..bb52fa6 100644 (file)
@@ -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