diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-06-18 15:46:56 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-06-19 12:46:44 +0100 |
commit | 63371ee4ecf1b2f873047a09a1e1264b288eab8b (patch) | |
tree | b8c89f53d33ec90c1043bd6a59d188d7df5f820c /meta/recipes-devtools/gcc | |
parent | 9513e6dde4fa9fdbe1e100cb1b3802f983d4cfd6 (diff) | |
download | poky-63371ee4ecf1b2f873047a09a1e1264b288eab8b.tar.gz |
gcc-runtime: fix C++ header mapping for n32/x32 tune
The SDK was unable to find the C++ header pieces correctly since it's
using a generic compiler, not one specifically targeting the multilib
vendor prefix and default tune. This adds the right mapping to ensure
SDKs work as expected. And fix problem in below configurations:
multilib configuration 1:
MACHINE="qemumips64"
MULTILIBS ?= "multilib:lib32 multilib:libn32"
DEFAULTTUNE_virtclass-multilib-lib32 ?= "mips"
DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32"
MULTILIB_GLOBAL_VARIANTS_append = " libn32"
require conf/multilib.conf
ignoring nonexistent directory "<path>/sysroots/mips64-poky-linux/usr/include/c++/8.2.0/mips64-poky-linux/32
multilib configuration 2:
MACHINE="qemumips64"
MULTILIBS = 'multilib:lib64 multilib:lib32'
DEFAULTTUNE = 'mips64-n32'
DEFAULTTUNE_virtclass-multilib-lib64 = 'mips64'
DEFAULTTUNE_virtclass-multilib-lib32 = 'mips32r2'
require conf/multilib.conf
For this configuration:
for target gcc-runtime, need to create symlink like mips64-poly-linux --> mips64-poky-linux-gnu32
for target lib64-gcc-runtime, need to create symlink like mips64-poly-linux/32 --> mips64-pokymllib64-linux
in order to avoid conflict during populate_sdk, create symlink for subfoler bits/ext for target gcc-runtime,
this is ugly, but seems no better way to cover all kinds of configuration.
single lib configuration:
MACHINE="qemumips64"
DEFAULTTUNE = "mips64-n32"
(From OE-Core rev: b071a1a209556158bcfcc20e3c8bd4b15373767c)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-runtime.inc | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index 3d03d8e571..ba767e1a38 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc | |||
@@ -86,10 +86,6 @@ do_install () { | |||
86 | if [ -d ${D}${infodir} ]; then | 86 | if [ -d ${D}${infodir} ]; then |
87 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} | 87 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} |
88 | fi | 88 | fi |
89 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then | ||
90 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS} | ||
91 | fi | ||
92 | |||
93 | } | 89 | } |
94 | 90 | ||
95 | do_install_append_class-target () { | 91 | do_install_append_class-target () { |
@@ -98,20 +94,29 @@ do_install_append_class-target () { | |||
98 | fi | 94 | fi |
99 | 95 | ||
100 | if [ "${TARGET_OS}" = "linux-gnun32" ]; then | 96 | if [ "${TARGET_OS}" = "linux-gnun32" ]; then |
101 | if [ "${MULTILIBS}" != "" ]; then | 97 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then |
102 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux | 98 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux |
103 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux/32 | 99 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32 |
100 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then | ||
101 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux | ||
102 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32 | ||
104 | else | 103 | else |
105 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux | 104 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
106 | fi | 105 | fi |
107 | fi | 106 | elif [ "${TARGET_OS}" = "linux-gnux32" ]; then |
108 | if [ "${TARGET_OS}" = "linux-gnux32" ]; then | 107 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then |
109 | if [ "${MULTILIBS}" != "" ]; then | 108 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux |
110 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-poky-linux | 109 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32 |
111 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-poky-linux/x32 | 110 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then |
111 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux | ||
112 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32 | ||
112 | else | 113 | else |
113 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux | 114 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux |
114 | fi | 115 | fi |
116 | elif [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then | ||
117 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux | ||
118 | ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits | ||
119 | ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext | ||
115 | fi | 120 | fi |
116 | 121 | ||
117 | if [ "${TCLIBC}" != "glibc" ]; then | 122 | if [ "${TCLIBC}" != "glibc" ]; then |