[oe-commits] [openembedded-core] 02/06: gcc-runtime.inc: Add CPP support for x86-64-x32 tune

git at git.openembedded.org git at git.openembedded.org
Sat Oct 8 22:09:18 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 9f9be229040f4f9a523a1e25afd78d5c3f4efc23
Author: Juro Bystricky <juro.bystricky at intel.com>
AuthorDate: Sat Oct 8 10:53:52 2016 -0700

    gcc-runtime.inc: Add CPP support for x86-64-x32 tune
    
    Using the following setup (as specified in yocto sample code):
    
    MACHINE = "qemux86-64"
    require conf/multilib.conf
    MULTILIBS = "multilib:libx32"
    DEFAULTTUNE_virtclass-multilib-libx32 = "x86-64-x32"
    
    We fail to compile simple CPP programs because CPP cannot
    find relevant header files, looking for them in a non-existing place.
    To fix this, we create a symlink of the name CPP expects and point it to
    the corresponding existing directory.
    
    [YOCTO#10354]
    [YOCTO#10380]
    
    Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 321a6de..15252f1 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -95,6 +95,14 @@ do_install_append_class-target () {
 			ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
 		fi
 	fi
+	if [ "${TARGET_OS}" = "linux-gnux32" ]; then
+		if [ "${MULTILIBS}" != "" ]; then
+			mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-poky-linux
+			ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-poky-linux/x32
+		else
+			ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+		fi
+	fi
 
 	if [ "${TCLIBC}" != "glibc" ]; then
 		case "${TARGET_OS}" in

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list