Patchwork [6/3] Move architecture specific TARGET_OS mangling into tune files

login
register
mail settings
Submitter Richard Purdie
Date July 22, 2011, 6:01 p.m.
Message ID <1311357674.2344.155.camel@rex>
Download mbox | patch
Permalink /patch/8385/
State New, archived
Headers show

Comments

Richard Purdie - July 22, 2011, 6:01 p.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
Richard Purdie - July 25, 2011, 1:42 p.m.
To try and help preserve my sanity when pulling the various multilib
patches together, I've merged these six patches, along with a patch
incrementing bitbake's miniumum version requirement for the
bb.utils.contains usage.

Cheers,

Richard
Phil Blundell - July 25, 2011, 4:23 p.m.
On Mon, 2011-07-25 at 14:42 +0100, Richard Purdie wrote:
> To try and help preserve my sanity when pulling the various multilib
> patches together, I've merged these six patches, along with a patch
> incrementing bitbake's miniumum version requirement for the
> bb.utils.contains usage.

FWIW, the bitbake minimum version check (at least in its current form)
doesn't buy much in this sort of situation because you get a parse error
before the event handler in sanity.bbclass ever runs.  I think this
happened last time there was a bitbake-affecting change too although I
don't recall the details.

Perhaps adding something like:

__sane_bitbake := "${oe.check_bb_version_sanity}"

to the top of bitbake.conf would improve matters, I dunno.

p.
Richard Purdie - July 27, 2011, 4:37 p.m.
On Mon, 2011-07-25 at 17:23 +0100, Phil Blundell wrote:
> On Mon, 2011-07-25 at 14:42 +0100, Richard Purdie wrote:
> > To try and help preserve my sanity when pulling the various multilib
> > patches together, I've merged these six patches, along with a patch
> > incrementing bitbake's miniumum version requirement for the
> > bb.utils.contains usage.
> 
> FWIW, the bitbake minimum version check (at least in its current form)
> doesn't buy much in this sort of situation because you get a parse error
> before the event handler in sanity.bbclass ever runs.  I think this
> happened last time there was a bitbake-affecting change too although I
> don't recall the details.
> 
> Perhaps adding something like:
> 
> __sane_bitbake := "${oe.check_bb_version_sanity}"
> 
> to the top of bitbake.conf would improve matters, I dunno.

Ouch, yes, we probably should do something like this.

Cheers,

Richard

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 61312bc..6e109ec 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -85,9 +85,11 @@  TUNE_ARCH ??= "INVALID"
 TUNE_CCARGS ??= ""
 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
 PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE} ??= "${TARGET_ARCH}"
+LIBCEXTENSION ??= ""
+ABIEXTENSION ??= ""
 
 TARGET_ARCH = "${TUNE_ARCH}"
-TARGET_OS = "INVALID"
+TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}"
 TARGET_VENDOR = "-oe"
 TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + bb.data.getVar('TARGET_OS', d, 1), ''][bb.data.getVar('TARGET_OS', d, 1) == ('' or 'custom')]}"
 TARGET_PREFIX = "${TARGET_SYS}-"
diff --git a/meta/conf/distro/include/tclibc-eglibc.inc b/meta/conf/distro/include/tclibc-eglibc.inc
index 9fab4dc..8ef3ceb 100644
--- a/meta/conf/distro/include/tclibc-eglibc.inc
+++ b/meta/conf/distro/include/tclibc-eglibc.inc
@@ -2,10 +2,7 @@ 
 # eglibc specific configuration
 #
 
-TARGET_OS = "linux"
-TARGET_OS_arm = "linux-gnueabi"
-TARGET_OS_armeb = "linux-gnueabi"
-TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
+LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}"
 
 # Add glibc overrides to the overrides for eglibc.
 OVERRIDES .= ":libc-glibc"
diff --git a/meta/conf/distro/include/tclibc-glibc.inc b/meta/conf/distro/include/tclibc-glibc.inc
index 0370dfa..823195c 100644
--- a/meta/conf/distro/include/tclibc-glibc.inc
+++ b/meta/conf/distro/include/tclibc-glibc.inc
@@ -2,10 +2,7 @@ 
 # glibc specific configuration
 #
 
-TARGET_OS = "linux"
-TARGET_OS_arm = "linux-gnueabi"
-TARGET_OS_armeb = "linux-gnueabi"
-TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
+LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}"
 
 # Add glibc to the overrides.
 OVERRIDES =. "libc-glibc:"
diff --git a/meta/conf/distro/include/tclibc-uclibc.inc b/meta/conf/distro/include/tclibc-uclibc.inc
index 7c06654..e0f50a0 100644
--- a/meta/conf/distro/include/tclibc-uclibc.inc
+++ b/meta/conf/distro/include/tclibc-uclibc.inc
@@ -2,10 +2,7 @@ 
 # uclibc specific configuration
 #
 
-TARGET_OS = "linux-uclibc"
-TARGET_OS_arm = "linux-uclibceabi"
-TARGET_OS_armeb = "linux-uclibceabi"
-TARGET_OS_powerpc = "linux-uclibc${@['','spe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
+LIBCEXTENSION = "-uclibc"
 
 # Add uclibc overrides to the overrides.
 OVERRIDES =. "libc-uclibc:"
diff --git a/meta/conf/machine/include/arm/arch-arm.inc b/meta/conf/machine/include/arm/arch-arm.inc
index e773d14..c517df6 100644
--- a/meta/conf/machine/include/arm/arch-arm.inc
+++ b/meta/conf/machine/include/arm/arch-arm.inc
@@ -1 +1,3 @@ 
 TUNE_ARCH = "arm"
+
+ABIEXTENSION = "eabi"
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
index 5ab81d4..17ace32 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
@@ -1 +1,3 @@ 
 TUNE_ARCH = "powerpc"
+
+ABIEXTENSION = "${@['','spe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"