summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-11-12 11:25:30 +0000
committerRichard Purdie <richard@openedhand.com>2007-11-12 11:25:30 +0000
commit01d5da72d0bd5038ce4b6a211546a4ca3f8daffd (patch)
treeba1921d2beb66d9da21a5d6183c2c7db2bfc22a7
parent8c1871aabfd2b010152886cb5b48a0be84c2dc80 (diff)
downloadopenembedded-core-01d5da72d0bd5038ce4b6a211546a4ca3f8daffd.tar.gz
openembedded-core-01d5da72d0bd5038ce4b6a211546a4ca3f8daffd.tar.bz2
openembedded-core-01d5da72d0bd5038ce4b6a211546a4ca3f8daffd.zip
Rearrange staging to match target system layout. This is a major change and will require a full rebuild.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3123 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/classes/native.bbclass48
-rw-r--r--meta/conf/bitbake.conf71
-rw-r--r--meta/packages/apt/files/apt.conf2
-rw-r--r--meta/packages/binutils/binutils-cross.inc2
-rw-r--r--meta/packages/gcc/gcc3-build-cross.inc13
-rw-r--r--meta/packages/qemu/qemu-native_20070613.bb1
-rw-r--r--meta/packages/qemu/qemu-native_cvs.bb1
7 files changed, 61 insertions, 77 deletions
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 104d5a49da..d40a5028c9 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -27,7 +27,7 @@ CPPFLAGS = "${BUILD_CPPFLAGS}"
CFLAGS = "${BUILD_CFLAGS}"
CXXFLAGS = "${BUILD_CFLAGS}"
LDFLAGS = "${BUILD_LDFLAGS}"
-LDFLAGS_build-darwin = "-L${STAGING_DIR}/${BUILD_SYS}/lib "
+LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} "
STAGING_BINDIR = "${STAGING_BINDIR_NATIVE}"
STAGING_BINDIR_CROSS = "${STAGING_BINDIR_NATIVE}"
@@ -47,39 +47,33 @@ export AS = "${HOST_PREFIX}as"
export RANLIB = "${HOST_PREFIX}ranlib"
export STRIP = "${HOST_PREFIX}strip"
-
# Path prefixes
-base_prefix = "${exec_prefix}"
-prefix = "${STAGING_DIR}"
-exec_prefix = "${STAGING_DIR}/${BUILD_ARCH}-${BUILD_OS}"
+export base_prefix = "${STAGING_DIR_NATIVE}"
+export prefix = "${STAGING_DIR_NATIVE}${layout_prefix}"
+export exec_prefix = "${STAGING_DIR_NATIVE}${layout_exec_prefix}"
# Base paths
-base_bindir = "${base_prefix}/bin"
-base_sbindir = "${base_prefix}/bin"
-base_libdir = "${base_prefix}/lib"
+export base_bindir = "${STAGING_DIR_NATIVE}${layout_base_bindir}"
+export base_sbindir = "${STAGING_DIR_NATIVE}${layout_base_sbindir}"
+export base_libdir = "${STAGING_DIR_NATIVE}${layout_base_libdir}"
# Architecture independent paths
-sysconfdir = "${prefix}/etc"
-sharedstatedir = "${prefix}/com"
-localstatedir = "${prefix}/var"
-infodir = "${datadir}/info"
-mandir = "${datadir}/man"
-docdir = "${datadir}/doc"
-servicedir = "${prefix}/srv"
+export datadir = "${STAGING_DIR_NATIVE}${layout_datadir}"
+export sysconfdir = "${STAGING_DIR_NATIVE}${layout_sysconfdir}"
+export sharedstatedir = "${STAGING_DIR_NATIVE}${layout_sharedstatedir}"
+export localstatedir = "${STAGING_DIR_NATIVE}${layout_localstatedir}"
+export infodir = "${STAGING_DIR_NATIVE}${layout_infodir}"
+export mandir = "${STAGING_DIR_NATIVE}${layout_mandir}"
+export docdir = "${STAGING_DIR_NATIVE}${layout_docdir}"
+export servicedir = "${STAGING_DIR_NATIVE}${layout_servicedir}"
# Architecture dependent paths
-bindir = "${exec_prefix}/bin"
-sbindir = "${exec_prefix}/bin"
-libexecdir = "${exec_prefix}/libexec"
-libdir = "${exec_prefix}/lib"
-includedir = "${exec_prefix}/include"
-oldincludedir = "${exec_prefix}/include"
-
-# Datadir is made arch dependent here, primarily
-# for autoconf macros, and other things that
-# may be manipulated to handle crosscompilation
-# issues.
-datadir = "${exec_prefix}/share"
+export bindir = "${STAGING_DIR_NATIVE}${layout_bindir}"
+export sbindir = "${STAGING_DIR_NATIVE}${layout_sbindir}"
+export libexecdir = "${STAGING_DIR_NATIVE}${layout_libexecdir}"
+export libdir = "${STAGING_DIR_NATIVE}${layout_libdir}"
+export includedir = "${STAGING_DIR_NATIVE}${layout_includedir}"
+export oldincludedir = "${STAGING_DIR_NATIVE}${layout_includedir}"
do_stage () {
if [ "${INHIBIT_NATIVE_STAGE_INSTALL}" != "1" ]
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 8492c0d5db..523a33dd78 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -2,17 +2,14 @@
# Standard target filesystem layout.
##################################################################
-# Note these currently match the existing staging layout but this
-# is planned to change, see the oe-dev mailing list
-
# Path prefixes
-layout_prefix = ""
-layout_exec_prefix = ""
+layout_prefix = "/usr"
+layout_exec_prefix = "/usr"
layout_base_prefix = ""
# Base paths
layout_base_bindir = "${layout_base_prefix}/bin"
-layout_base_sbindir = "${layout_base_prefix}/bin"
+layout_base_sbindir = "${layout_base_prefix}/sbin"
layout_base_libdir = "${layout_base_prefix}/lib"
# Architecture independent paths
@@ -27,7 +24,7 @@ layout_docdir = "${layout_datadir}/doc"
# Architecture dependent paths
layout_bindir = "${layout_exec_prefix}/bin"
-layout_sbindir = "${layout_exec_prefix}/bin"
+layout_sbindir = "${layout_exec_prefix}/sbin"
layout_libdir = "${layout_exec_prefix}/lib"
layout_includedir = "${layout_exec_prefix}/include"
layout_libexecdir = "${layout_exec_prefix}/libexec"
@@ -38,31 +35,31 @@ layout_libexecdir = "${layout_exec_prefix}/libexec"
# Path prefixes
export base_prefix = ""
-export prefix = "/usr"
-export exec_prefix = "${prefix}"
+export prefix = "${layout_prefix}"
+export exec_prefix = "${layout_exec_prefix}"
# Base paths
-export base_bindir = "${base_prefix}/bin"
-export base_sbindir = "${base_prefix}/sbin"
-export base_libdir = "${base_prefix}/lib"
+export base_bindir = "${layout_base_bindir}"
+export base_sbindir = "${layout_base_sbindir}"
+export base_libdir = "${layout_base_libdir}"
# Architecture independent paths
-export datadir = "${prefix}/share"
-export sysconfdir = "/etc"
-export sharedstatedir = "${prefix}/com"
-export localstatedir = "/var"
-export infodir = "${datadir}/info"
-export mandir = "${datadir}/man"
-export docdir = "${datadir}/doc"
-export servicedir = "/srv"
+export datadir = "${layout_datadir}"
+export sysconfdir = "${layout_sysconfdir}"
+export sharedstatedir = "${layout_sharedstatedir}"
+export localstatedir = "${layout_localstatedir}"
+export infodir = "${layout_infodir}"
+export mandir = "${layout_mandir}"
+export docdir = "${layout_docdir}"
+export servicedir = "${layout_servicedir}"
# Architecture dependent paths
-export bindir = "${exec_prefix}/bin"
-export sbindir = "${exec_prefix}/sbin"
-export libexecdir = "${exec_prefix}/libexec"
-export libdir = "${exec_prefix}/lib"
-export includedir = "${exec_prefix}/include"
-export oldincludedir = "${exec_prefix}/include"
+export bindir = "${layout_bindir}"
+export sbindir = "${layout_sbindir}"
+export libexecdir = "${layout_libexecdir}"
+export libdir = "${layout_libdir}"
+export includedir = "${layout_includedir}"
+export oldincludedir = "${layout_includedir}"
##################################################################
# Architecture-dependent build variables.
@@ -203,18 +200,18 @@ B = "${S}"
STAGING_DIR = "${TMPDIR}/staging"
STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
-STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}/bin"
-STAGING_BINDIR_CROSS = "${STAGING_DIR_NATIVE}/bin/${HOST_SYS}"
-STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}/lib"
-STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}/include"
-STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}/etc"
-STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}/share"
+STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_bindir}"
+STAGING_BINDIR_CROSS = "${STAGING_DIR_NATIVE}${layout_bindir}/${HOST_SYS}"
+STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_libdir}"
+STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_includedir}"
+STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_sysconfdir}"
+STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_datadir}"
STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}"
-STAGING_BINDIR = "${STAGING_DIR_HOST}/bin"
-STAGING_LIBDIR = "${STAGING_DIR_HOST}/lib"
-STAGING_INCDIR = "${STAGING_DIR_HOST}/include"
-STAGING_DATADIR = "${STAGING_DIR_HOST}/share"
+STAGING_BINDIR = "${STAGING_DIR_HOST}${layout_bindir}"
+STAGING_LIBDIR = "${STAGING_DIR_HOST}${layout_libdir}"
+STAGING_INCDIR = "${STAGING_DIR_HOST}${layout_includedir}"
+STAGING_DATADIR = "${STAGING_DIR_HOST}${layout_datadir}"
STAGING_LOADER_DIR = "${STAGING_DIR_HOST}/loader"
STAGING_FIRMWARE_DIR = "${STAGING_DIR_HOST}/firmware"
STAGING_PYDIR = "${STAGING_DIR}/lib/python2.4"
@@ -291,7 +288,7 @@ EXTRA_IMAGEDEPENDS = ""
CROSS_DIR = "${TMPDIR}/cross"
CROSS_DATADIR = "${CROSS_DIR}/share"
-export PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_BINDIR_NATIVE}:${CROSS_DIR}/bin:"
+export PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${layout_sbindir}:${STAGING_BINDIR_NATIVE}:${CROSS_DIR}/bin:${STAGING_DIR_NATIVE}${layout_base_sbindir}:"
##################################################################
# Build utility info.
diff --git a/meta/packages/apt/files/apt.conf b/meta/packages/apt/files/apt.conf
index 9e90616465..2bd9ddbfaf 100644
--- a/meta/packages/apt/files/apt.conf
+++ b/meta/packages/apt/files/apt.conf
@@ -1,4 +1,4 @@
-Dir "${STAGING_DIR}/"
+Dir "${STAGING_DIR_NATIVE}/"
{
State "var/lib/apt/"
{
diff --git a/meta/packages/binutils/binutils-cross.inc b/meta/packages/binutils/binutils-cross.inc
index c63ea687aa..a45a39feab 100644
--- a/meta/packages/binutils/binutils-cross.inc
+++ b/meta/packages/binutils/binutils-cross.inc
@@ -3,7 +3,7 @@ inherit cross
DEPENDS += "flex-native bison-native"
PROVIDES = "virtual/${TARGET_PREFIX}binutils"
PACKAGES = ""
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
+EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
--program-prefix=${TARGET_PREFIX}"
do_stage () {
diff --git a/meta/packages/gcc/gcc3-build-cross.inc b/meta/packages/gcc/gcc3-build-cross.inc
index ec285f522b..2b9766975c 100644
--- a/meta/packages/gcc/gcc3-build-cross.inc
+++ b/meta/packages/gcc/gcc3-build-cross.inc
@@ -1,7 +1,9 @@
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
-EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR}/${TARGET_SYS} \
- --with-gxx-include-dir=${STAGING_DIR}/${TARGET_SYS}/include/c++"
+EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
+ --with-gxx-include-dir=${STAGING_DIR_TARGET}/${layout_includedir}/c++ \
+ --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-build-sysroot=${STAGING_DIR_TARGET}"
do_configure_prepend () {
rm -f ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/libgcc_eh.a
@@ -25,13 +27,6 @@ do_stage_append () {
rm -f ${CROSS_DIR}/bin/*gcov
rm -f ${CROSS_DIR}/bin/*gccbug
- # Fix a few include links so cross builds are happier
- if [ ! -e ${STAGING_INCDIR}/c++ ]; then
- mkdir -p ${STAGING_INCDIR}
- ln -sf ${CROSS_DIR}/${TARGET_SYS}/include/c++ \
- ${STAGING_INCDIR}/
- fi
-
# We use libiberty from binutils
rm -f ${CROSS_DIR}/lib/libiberty.a
diff --git a/meta/packages/qemu/qemu-native_20070613.bb b/meta/packages/qemu/qemu-native_20070613.bb
index a6a5bda58d..28373e273e 100644
--- a/meta/packages/qemu/qemu-native_20070613.bb
+++ b/meta/packages/qemu/qemu-native_20070613.bb
@@ -1,6 +1,5 @@
require qemu_${PV}.bb
inherit native
DEPENDS = "zlib-native"
-prefix = "${STAGING_DIR}/${BUILD_SYS}"
require qemu-gcc3-check.inc
diff --git a/meta/packages/qemu/qemu-native_cvs.bb b/meta/packages/qemu/qemu-native_cvs.bb
index fae6ca2f1b..c87d45b601 100644
--- a/meta/packages/qemu/qemu-native_cvs.bb
+++ b/meta/packages/qemu/qemu-native_cvs.bb
@@ -1,6 +1,5 @@
require qemu_cvs.bb
inherit native
DEPENDS = "zlib-native"
-prefix = "${STAGING_DIR}/${BUILD_SYS}"
require qemu-gcc3-check.inc