]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc-runtime.inc: Add CPP support for x86-64-x32 tune
authorJuro Bystricky <juro.bystricky@intel.com>
Sat, 8 Oct 2016 17:53:52 +0000 (10:53 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Oct 2016 22:06:26 +0000 (23:06 +0100)
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@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-runtime.inc

index 321a6deda4b1541ddd4cf411c4d9ccf982ffc670..15252f1a4028f3358b7f3802fe876a8198f366c9 100644 (file)
@@ -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