diff options
author | Alexey Brodkin <Alexey.Brodkin@synopsys.com> | 2021-06-20 11:51:56 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-06-22 15:18:11 +0100 |
commit | 8f0c68a7a616c3e2b57cb5dd84b78fbf37116f87 (patch) | |
tree | cf65cb186c258634cba234b1c6d038e30b15794b /meta/recipes-devtools/gcc | |
parent | 81e5c1162373003b738e789cdd8d4290a7ec95b4 (diff) | |
download | poky-8f0c68a7a616c3e2b57cb5dd84b78fbf37116f87.tar.gz |
gcc: Apply multilib fix to ARC as well
W/o that hack target GCC assume existence of per-mcpu folders,
which are missing.
In particular G++ failed to find "bits/c++config.h":
------------------>8------------------
root@hsdk:~# cat test.cc
#include <cstdlib>
int myfunc(void)
{
}
root@hsdk:~# g++ -c test.cc -v
Using built-in specs.
COLLECT_GCC=g++
Target: arc-oe-linux
Configured with: ../../../../../../work-shared/gcc-11.1.0-r0/gcc-11.1.0/configure --build=x86_64-linux --host=arc-oe-linux --target=arc-oe-linux --prefix=/usr --exec_prefix=/usr -x
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.1.1 20210523 (GCC)
COLLECT_GCC_OPTIONS='-c' '-v' '-shared-libgcc' '-mcpu=hs38_linux'
/usr/libexec/gcc/arc-oe-linux/11.1.1/cc1plus -quiet -v -imultilib hs38_linux -D_GNU_SOURCE test.cc -quiet -dumpbase test.cc -dumpbase-ext .cc -mcpu=hs38_linux -version -o /tmp/ccs
GNU C++17 (GCC) version 11.1.1 20210523 (arc-oe-linux)
compiled by GNU C version 11.1.1 20210523, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129242
ignoring nonexistent directory "/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1/arc-oe-linux/hs38_linux"
ignoring nonexistent directory "/usr/lib/arc-oe-linux/11.1.1/include"
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../arc-oe-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1
/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1/backward
/usr/lib/gcc/arc-oe-linux/11.1.1/include
/usr/lib/gcc/arc-oe-linux/11.1.1/include-fixed
/usr/include
End of search list.
GNU C++17 (GCC) version 11.1.1 20210523 (arc-oe-linux)
compiled by GNU C version 11.1.1 20210523, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129242
Compiler executable checksum: 6df2f07a822bfbbb80a61414b712b75d
In file included from test.cc:1:
/usr/include/c++/11.1.1/cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
41 | #include <bits/c++config.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
------------------>8------------------
Note "ignoring nonexistent directory "/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1/arc-oe-linux/hs38_linux"
message which is being used by GCC due to the fact of implicit "-mcpu=hs38_linux".
In fact this header "bits/c++config.h" is located in "/usr/lib/gcc/arc-oe-linux/11.1.1/../../../../include/c++/11.1.1/arc-oe-linux"
on target.
(From OE-Core rev: fbdc4422361a520af458468d836a8e4159dc22d6)
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.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/0004-64-bit-multilib-hack.patch | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch b/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch index 789f57343b..8184e68743 100644 --- a/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch +++ b/meta/recipes-devtools/gcc/gcc/0004-64-bit-multilib-hack.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 28e7c312b1292ca216d4b54ec9f6b7ac055907a8 Mon Sep 17 00:00:00 2001 | 1 | From 2fa5c93641b75a662839c1b6eee172b6c481c70e Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 29 Mar 2013 09:10:06 +0400 | 3 | Date: Fri, 29 Mar 2013 09:10:06 +0400 |
4 | Subject: [PATCH] 64-bit multilib hack. | 4 | Subject: [PATCH] 64-bit multilib hack. |
@@ -19,7 +19,7 @@ and be able to patch these entries with a complete set of correct paths but this | |||
19 | don't have such code at this point. This is something the target gcc recipe should do | 19 | don't have such code at this point. This is something the target gcc recipe should do |
20 | and override these platform defaults in its build config. | 20 | and override these platform defaults in its build config. |
21 | 21 | ||
22 | Do same for riscv64 and aarch64 | 22 | Do same for riscv64, aarch64 & arc |
23 | 23 | ||
24 | RP 15/8/11 | 24 | RP 15/8/11 |
25 | 25 | ||
@@ -30,11 +30,12 @@ Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> | |||
30 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | 30 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
31 | --- | 31 | --- |
32 | gcc/config/aarch64/t-aarch64-linux | 8 ++++---- | 32 | gcc/config/aarch64/t-aarch64-linux | 8 ++++---- |
33 | gcc/config/arc/t-multilib-linux | 4 ++-- | ||
33 | gcc/config/i386/t-linux64 | 6 ++---- | 34 | gcc/config/i386/t-linux64 | 6 ++---- |
34 | gcc/config/mips/t-linux64 | 10 +++------- | 35 | gcc/config/mips/t-linux64 | 10 +++------- |
35 | gcc/config/riscv/t-linux | 6 ++++-- | 36 | gcc/config/riscv/t-linux | 6 ++++-- |
36 | gcc/config/rs6000/t-linux64 | 5 ++--- | 37 | gcc/config/rs6000/t-linux64 | 5 ++--- |
37 | 5 files changed, 15 insertions(+), 20 deletions(-) | 38 | 6 files changed, 17 insertions(+), 22 deletions(-) |
38 | 39 | ||
39 | diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux | 40 | diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux |
40 | index 241b0ef20b6..a7dadb2d64f 100644 | 41 | index 241b0ef20b6..a7dadb2d64f 100644 |
@@ -53,6 +54,22 @@ index 241b0ef20b6..a7dadb2d64f 100644 | |||
53 | 54 | ||
54 | -MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) | 55 | -MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) |
55 | +#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) | 56 | +#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) |
57 | diff --git a/gcc/config/arc/t-multilib-linux b/gcc/config/arc/t-multilib-linux | ||
58 | index fc3fff640a2..d58e28f6df8 100644 | ||
59 | --- a/gcc/config/arc/t-multilib-linux | ||
60 | +++ b/gcc/config/arc/t-multilib-linux | ||
61 | @@ -16,9 +16,9 @@ | ||
62 | # along with GCC; see the file COPYING3. If not see | ||
63 | # <http://www.gnu.org/licenses/>. | ||
64 | |||
65 | -MULTILIB_OPTIONS = mcpu=hs/mcpu=archs/mcpu=hs38/mcpu=hs38_linux/mcpu=arc700/mcpu=nps400 | ||
66 | +#MULTILIB_OPTIONS = mcpu=hs/mcpu=archs/mcpu=hs38/mcpu=hs38_linux/mcpu=arc700/mcpu=nps400 | ||
67 | |||
68 | -MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400 | ||
69 | +#MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400 | ||
70 | |||
71 | # Aliases: | ||
72 | MULTILIB_MATCHES += mcpu?arc700=mA7 | ||
56 | diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 | 73 | diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 |
57 | index d288b093522..7b5980a9d21 100644 | 74 | index d288b093522..7b5980a9d21 100644 |
58 | --- a/gcc/config/i386/t-linux64 | 75 | --- a/gcc/config/i386/t-linux64 |