binutils/gcc/gdb: Add TARGET_ARCH to PN for all cross recipes
This allows them to co-exist together in the native sysroot, with one set of cross tools per target architecture. (From OE-Core rev: a2c5509520d5c3e082f55844e6545d0309565f8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
03a0f8e8b4
commit
e078edbf99
|
@ -158,7 +158,7 @@ python autotools_copy_aclocals () {
|
|||
manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c)
|
||||
elif c.startswith("nativesdk-"):
|
||||
manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${SDK_ARCH}-%s.populate_sysroot" % c)
|
||||
elif c.endswith("-cross") or c.endswith("-cross-initial") or c.endswith("-crosssdk") or c.endswith("-crosssdk-initial"):
|
||||
elif "-cross-" in c or "-crosssdk-" in c:
|
||||
continue
|
||||
else:
|
||||
manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${MACHINE}-%s.populate_sysroot" % c)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# or indirectly via dependency. No need to be in 'world'.
|
||||
EXCLUDE_FROM_WORLD = "1"
|
||||
CLASSOVERRIDE = "class-cross-canadian"
|
||||
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
|
||||
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
|
||||
|
||||
#
|
||||
# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
|
||||
|
|
|
@ -19,6 +19,8 @@ HOST_AS_ARCH = "${BUILD_AS_ARCH}"
|
|||
|
||||
STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
|
||||
|
||||
PACKAGE_ARCH = "${BUILD_ARCH}"
|
||||
|
||||
export PKG_CONFIG_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
|
||||
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
|
||||
|
||||
|
@ -43,7 +45,7 @@ target_libdir = "${target_exec_prefix}/${baselib}"
|
|||
target_includedir := "${includedir}"
|
||||
|
||||
# Overrides for paths
|
||||
CROSS_TARGET_SYS_DIR = "${MULTIMACH_TARGET_SYS}"
|
||||
CROSS_TARGET_SYS_DIR = "${TARGET_SYS}"
|
||||
prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
|
||||
base_prefix = "${STAGING_DIR_NATIVE}"
|
||||
exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
|
||||
|
|
|
@ -22,10 +22,6 @@ SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/${SSTATE_PKGSPEC
|
|||
SSTATE_EXTRAPATH[vardepvalue] = ""
|
||||
|
||||
SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/"
|
||||
# Also need to make cross recipes append to ${PN} and install once for any given PACAGE_ARCH so
|
||||
# can avoid multiple installs (e.g. routerstationpro+qemumips both using mips32)
|
||||
SSTATE_DUPWHITELIST += "${STAGING_LIBDIR_NATIVE}/${MULTIMACH_TARGET_SYS} ${STAGING_DIR_NATIVE}/usr/libexec/${MULTIMACH_TARGET_SYS} ${STAGING_BINDIR_NATIVE}/${MULTIMACH_TARGET_SYS} ${STAGING_DIR_NATIVE}${includedir_native}/gcc-build-internal-${MULTIMACH_TARGET_SYS}"
|
||||
SSTATE_DUPWHITELIST += "${STAGING_DIR_NATIVE}/sysroot-providers/virtual_${TARGET_PREFIX} ${STAGING_DIR_NATIVE}/sysroot-providers/binutils-cross ${STAGING_DIR_NATIVE}/sysroot-providers/gcc-cross"
|
||||
# Avoid docbook/sgml catalog warnings for now
|
||||
SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
|
||||
|
||||
|
@ -51,8 +47,7 @@ python () {
|
|||
elif bb.data.inherits_class('crosssdk', d):
|
||||
d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}"))
|
||||
elif bb.data.inherits_class('cross', d):
|
||||
d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${TUNE_PKGARCH}"))
|
||||
d.setVar('SSTATE_MANMACH', d.expand("${BUILD_ARCH}_${MACHINE}"))
|
||||
d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${TARGET_ARCH}"))
|
||||
elif bb.data.inherits_class('nativesdk', d):
|
||||
d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}"))
|
||||
elif bb.data.inherits_class('cross-canadian', d):
|
||||
|
|
|
@ -353,7 +353,7 @@ STAGING_DIR = "${TMPDIR}/sysroots"
|
|||
STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
|
||||
STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}"
|
||||
STAGING_BINDIR_CROSS = "${STAGING_BINDIR}/crossscripts"
|
||||
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
|
||||
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
|
||||
STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}"
|
||||
STAGING_LIBEXECDIR_NATIVE = "${STAGING_DIR_NATIVE}${libexecdir_native}"
|
||||
STAGING_BASE_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${base_libdir_native}"
|
||||
|
|
|
@ -4,9 +4,9 @@ PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
|
|||
PACKAGES = ""
|
||||
PACKAGES_DYNAMIC = ""
|
||||
|
||||
STAGINGCC = "gcc-cross-initial"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
|
||||
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
|
||||
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
|
||||
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
|
||||
|
||||
do_configure () {
|
||||
sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
|
||||
|
|
|
@ -2,8 +2,8 @@ require eglibc-common.inc
|
|||
require eglibc-ld.inc
|
||||
require eglibc-testing.inc
|
||||
|
||||
STAGINGCC = "gcc-cross-initial"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
|
||||
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
|
||||
PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
|
||||
|
||||
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
|
||||
|
|
|
@ -4,7 +4,7 @@ LICENSE = "MIT"
|
|||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
|
||||
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
|
||||
DEPENDS = "virtual/libc gdb-cross qemu-native qemu-helper-native unfs3-native"
|
||||
DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native"
|
||||
PR = "r3"
|
||||
|
||||
inherit meta toolchain-scripts
|
||||
|
|
|
@ -8,8 +8,8 @@ PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
|
|||
PACKAGES = ""
|
||||
PACKAGES_DYNAMIC = ""
|
||||
|
||||
STAGINGCC = "gcc-cross-initial"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
|
||||
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
|
||||
|
||||
do_install() {
|
||||
# Install initial headers into the cross dir
|
||||
|
|
|
@ -2,8 +2,8 @@ require uclibc.inc
|
|||
require uclibc-package.inc
|
||||
require uclibc-git.inc
|
||||
|
||||
STAGINGCC = "gcc-cross-initial"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
|
||||
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
|
||||
|
||||
PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
inherit cross
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}binutils"
|
||||
|
||||
PN = "binutils-cross-${TARGET_ARCH}"
|
||||
BPN = "binutils"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
INHIBIT_AUTOTOOLS_DEPS = "1"
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ require binutils-cross_${PV}.bb
|
|||
|
||||
inherit crosssdk
|
||||
|
||||
PN = "binutils-crosssdk-${TARGET_ARCH}"
|
||||
|
||||
PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
|
||||
|
||||
SRC_URI += "file://relocatable_sdk.patch"
|
||||
|
|
|
@ -7,6 +7,8 @@ NATIVEDEPS = ""
|
|||
|
||||
inherit autotools gettext
|
||||
|
||||
BPN = "gcc"
|
||||
|
||||
def get_gcc_fpu_setting(bb, d):
|
||||
if d.getVar('ARMPKGSFX_EABI', True) == "hf" and d.getVar('TRANSLATED_TARGET_ARCH', True) == "arm":
|
||||
return "--with-float=hard"
|
||||
|
|
|
@ -2,7 +2,6 @@ inherit cross-canadian
|
|||
|
||||
SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
|
||||
PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
|
||||
BPN = "gcc"
|
||||
|
||||
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext"
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ PACKAGES = ""
|
|||
INHIBIT_AUTOTOOLS_DEPS = "1"
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
PN = "gcc-cross-initial-${TARGET_ARCH}"
|
||||
|
||||
CROSS_TARGET_SYS_DIR_append = ".${PN}"
|
||||
|
||||
# This is intended to be a -very- basic config
|
||||
|
@ -68,8 +70,8 @@ do_install () {
|
|||
|
||||
# gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
|
||||
case ${PN} in
|
||||
*gcc-cross-initial|*gcc-crosssdk-initial)
|
||||
dest=${D}/${includedir}/gcc-build-internal-initial-${MULTIMACH_TARGET_SYS}
|
||||
*gcc-cross-initial-${TARGET_ARCH}|*gcc-crosssdk-initial-${TARGET_ARCH})
|
||||
dest=${D}/${includedir}/gcc-build-internal-initial-${TARGET_SYS}
|
||||
hardlinkdir . $dest
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -9,6 +9,8 @@ python () {
|
|||
d.setVar("EXTRADEPENDS", "linux-libc-headers")
|
||||
}
|
||||
|
||||
PN = "gcc-cross-${TARGET_ARCH}"
|
||||
|
||||
require gcc-configure-common.inc
|
||||
|
||||
EXTRA_OECONF += " --enable-poison-system-directories"
|
||||
|
@ -138,7 +140,7 @@ STOP
|
|||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
|
||||
# Compute how to get from libexecdir to bindir in python (easier than shell)
|
||||
BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${MULTIMACH_TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
|
||||
BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}"
|
||||
|
||||
do_install () {
|
||||
( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h )
|
||||
|
@ -177,8 +179,8 @@ do_install () {
|
|||
|
||||
# gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
|
||||
case ${PN} in
|
||||
*gcc-cross|*gcc-crosssdk)
|
||||
dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS}
|
||||
*gcc-cross-${TARGET_ARCH}|*gcc-crosssdk-${TARGET_ARCH})
|
||||
dest=${D}/${includedir}/gcc-build-internal-${TARGET_SYS}
|
||||
hardlinkdir . $dest
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
inherit crosssdk
|
||||
|
||||
PN = "gcc-crosssdk-initial-${TARGET_ARCH}"
|
||||
|
||||
SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
|
||||
SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
|
||||
SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
inherit crosssdk
|
||||
|
||||
PN = "gcc-crosssdk-${TARGET_ARCH}"
|
||||
|
||||
SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
|
||||
SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
|
||||
SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
|
||||
|
|
|
@ -20,7 +20,7 @@ RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic"
|
|||
|
||||
do_configure () {
|
||||
export CXX="${CXX} -nostdinc++ -nostdlib++"
|
||||
mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
||||
mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
||||
target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
||||
hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
|
||||
for d in libgcc ${RUNTIMETARGET}; do
|
||||
|
|
|
@ -3,7 +3,7 @@ BPN = "libgcc"
|
|||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
do_configure () {
|
||||
target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
||||
target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
||||
install -d ${D}${base_libdir} ${D}${libdir}
|
||||
hardlinkdir ${STAGING_INCDIR_NATIVE}/${LIBGCCBUILDTREENAME}$target/ ${B}
|
||||
mkdir -p ${B}/${BPN}
|
||||
|
|
|
@ -2,8 +2,8 @@ require libgcc-common.inc
|
|||
|
||||
DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial"
|
||||
|
||||
STAGINGCC = "gcc-cross-initial"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial"
|
||||
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
|
||||
STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
|
||||
PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
|
||||
|
||||
PACKAGES = ""
|
||||
|
|
|
@ -5,7 +5,7 @@ EXTRA_OECONF_PATHS = " \
|
|||
--with-build-sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
do_configure () {
|
||||
mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
||||
mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
||||
target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
||||
hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ EXTRA_OECONF += "--without-python"
|
|||
|
||||
GDBPROPREFIX = ""
|
||||
|
||||
PN = "gdb-cross-${TARGET_ARCH}"
|
||||
BPN = "gdb"
|
||||
|
||||
inherit cross
|
||||
inherit gettext
|
||||
|
||||
|
|
Loading…
Reference in New Issue