diff options
author | Changqing Li <changqing.li@windriver.com> | 2020-08-14 14:35:23 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-15 11:44:20 +0100 |
commit | de11fb92cf27cf77889db3214745df14ec0f4390 (patch) | |
tree | 7ed4639516b33e2d899177322a3101ba96caeb84 /meta/recipes-devtools | |
parent | 33f3cf3aae0e8e07aa015505e96c55f5c83f4d99 (diff) | |
download | poky-de11fb92cf27cf77889db3214745df14ec0f4390.tar.gz |
gcc-runtime.inc: fix m32 compile fail with x86-64 compiler
configuration:
MACHINE ??= "qemux86-64"
require conf/multilib.conf
MULTILIBS ?= "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 ?= "core2-32"
IMAGE_INSTALL_append = " packagegroup-core-buildessential lib32-libstdc++ lib32-libstdc++-dev"
m32 compile failed on target:
cmd: gcc -m32 -v test.cpp -o test
output:
GGC heuristics: --param ggc-min-expand=45 --param ggc-min-heapsize=29590
ignoring nonexistent directory "/usr/lib64/gcc/x86_64-poky-linux/10.1.0/../../../../include/c++/10.1.0/x86_64-poky-linux/32"
ignoring nonexistent directory "/usr/lib64/x86_64-poky-linux/10.1.0/include"
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib64/gcc/x86_64-poky-linux/10.1.0/../../../../x86_64-poky-linux/include"
/usr/lib64/gcc/x86_64-poky-linux/10.1.0/../../../../include/c++/10.1.0
/usr/lib64/gcc/x86_64-poky-linux/10.1.0/../../../../include/c++/10.1.0/backward
/usr/lib64/gcc/x86_64-poky-linux/10.1.0/include
/usr/lib64/gcc/x86_64-poky-linux/10.1.0/include-fixed
/usr/include
End of search list.
GNU C++14 (GCC) version 10.1.0 (x86_64-poky-linux)
compiled by GNU C version 10.1.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.1.0, isl version none
GGC heuristics: --param ggc-min-expand=45 --param ggc-min-heapsize=29590
Compiler executable checksum: bc3b2f3a33dad80e30112cf1235bf631
In file included from test.cpp:1:
/usr/include/c++/10.1.0/iostream:38:10: fatal error: bits/c++config.h: No such file or directory
38 | #include <bits/c++config.h>
| ^~~~~~~~~~~~~~~~~~
cannot find header since
/usr/lib64/gcc/x86_64-poky-linux/10.1.0/x86_64-poky-linux/32 is missing
fixed by link it to ../i686-poky-linux
(From OE-Core rev: 509022ea8db314dd9d010a478fd84d0234905c6b)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-runtime.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index df1432e68d..9dcce26536 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc | |||
@@ -138,6 +138,10 @@ do_install_append_class-target () { | |||
138 | ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext | 138 | ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext |
139 | fi | 139 | fi |
140 | 140 | ||
141 | if [ "${TARGET_ARCH}" == "x86_64" -a "${MULTILIB_VARIANTS}" != "" ];then | ||
142 | ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32 | ||
143 | fi | ||
144 | |||
141 | if [ "${TCLIBC}" != "glibc" ]; then | 145 | if [ "${TCLIBC}" != "glibc" ]; then |
142 | case "${TARGET_OS}" in | 146 | case "${TARGET_OS}" in |
143 | "linux-musl" | "linux-*spe") extra_target_os="linux";; | 147 | "linux-musl" | "linux-*spe") extra_target_os="linux";; |