summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-16 23:23:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-22 22:21:46 +0100
commit13bfab12cc1d24735aece376563b5510bf33fb9d (patch)
tree90706044d5fe35b82c5aae729b5a54bc41276d82
parent3fd2dff4eb346c12b2823d39b9ec7febf9282f59 (diff)
downloadpoky-13bfab12cc1d24735aece376563b5510bf33fb9d.tar.gz
gcc: Fix nativesdk builds and multilib fixes with gcc 11
In newer gcc versions the headers changed locations and our multiconfig and nativesdk tweaks to loader paths wasn't working. The broke buildtools-extended-tarball, particularly on arm. Update to fix this. Ultimately we should dump the gcc specs and check for hardcoded paths. This isn't possible quite yet as this patch doesn't fix the musl ones as we don't use that in mutlilib or nativesdk scenarios at present. (From OE-Core rev: 4ed6505a18ac76c0aa148deabb143214ac0c4552) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-multilib-config.inc24
1 files changed, 15 insertions, 9 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
index e90580d1cd..33bcbbfa24 100644
--- a/meta/recipes-devtools/gcc/gcc-multilib-config.inc
+++ b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -31,7 +31,9 @@ python gcc_multilib_setup() {
31 '%s/*/linux64.h' % src_conf_dir, 31 '%s/*/linux64.h' % src_conf_dir,
32 '%s/aarch64/t-aarch64' % src_conf_dir, 32 '%s/aarch64/t-aarch64' % src_conf_dir,
33 '%s/aarch64/aarch64.h' % src_conf_dir, 33 '%s/aarch64/aarch64.h' % src_conf_dir,
34 '%s/aarch64/aarch64-linux.h' % src_conf_dir,
34 '%s/aarch64/aarch64-cores.def' % src_conf_dir, 35 '%s/aarch64/aarch64-cores.def' % src_conf_dir,
36 '%s/arm/linux-eabi.h' % src_conf_dir,
35 '%s/*/linux.h' % src_conf_dir, 37 '%s/*/linux.h' % src_conf_dir,
36 '%s/linux.h' % src_conf_dir) 38 '%s/linux.h' % src_conf_dir)
37 39
@@ -102,6 +104,8 @@ python gcc_multilib_setup() {
102 r'\1' + wrap_libdir(libdir64) + r'\3'), 104 r'\1' + wrap_libdir(libdir64) + r'\3'),
103 (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*\"\S+\"\s*)(\S+)(\s*\"\S+\"\s*)(\S+)(\s*\".*\")$', 105 (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*\"\S+\"\s*)(\S+)(\s*\"\S+\"\s*)(\S+)(\s*\".*\")$',
104 r'\1' + wrap_libdir(libdir64) + r'\3' + wrap_libdir(libdir64) + r'\5'), 106 r'\1' + wrap_libdir(libdir64) + r'\3' + wrap_libdir(libdir64) + r'\5'),
107 (r'^(#define\s*GLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$',
108 r'\1' + wrap_libdir(libdir32) + r'\3'),
105 (r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$', 109 (r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$',
106 r'\1' + wrap_libdir(libdirx32) + r'\3'), 110 r'\1' + wrap_libdir(libdirx32) + r'\3'),
107 (r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$', 111 (r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
@@ -112,6 +116,8 @@ python gcc_multilib_setup() {
112 r'\1' + wrap_libdir(libdir64) + r'\3'), 116 r'\1' + wrap_libdir(libdir64) + r'\3'),
113 (r'^(#define\s*UCLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$', 117 (r'^(#define\s*UCLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
114 r'\1' + wrap_libdir(libdirn32) + r'\3'), 118 r'\1' + wrap_libdir(libdirn32) + r'\3'),
119 (r'^(#define\s*UCLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$',
120 r'\1' + wrap_libdir(libdirx32) + r'\3'),
115 (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$', 121 (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$',
116 r'\1' + wrap_libdir(libdir32) + r'\3'), 122 r'\1' + wrap_libdir(libdir32) + r'\3'),
117 ] 123 ]
@@ -138,15 +144,15 @@ python gcc_multilib_setup() {
138 } 144 }
139 145
140 gcc_header_config_files = { 146 gcc_header_config_files = {
141 'x86_64' : ['gcc/config/i386/linux64.h'], 147 'x86_64' : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'],
142 'i586' : ['gcc/config/i386/linux64.h'], 148 'i586' : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'],
143 'i686' : ['gcc/config/i386/linux64.h'], 149 'i686' : ['gcc/config/linux.h', 'gcc/config/i386/linux64.h'],
144 'mips' : ['gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'], 150 'mips' : ['gcc/config/linux.h', 'gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'],
145 'mips64' : ['gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'], 151 'mips64' : ['gcc/config/linux.h', 'gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'],
146 'powerpc' : ['gcc/config/rs6000/linux64.h'], 152 'powerpc' : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'],
147 'powerpc64' : ['gcc/config/rs6000/linux64.h'], 153 'powerpc64' : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'],
148 'aarch64' : ['gcc/config/aarch64/aarch64.h'], 154 'aarch64' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'],
149 'arm' : ['gcc/config/aarch64/aarch64.h'], 155 'arm' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'],
150 } 156 }
151 157
152 libdir32 = 'SYSTEMLIBS_DIR' 158 libdir32 = 'SYSTEMLIBS_DIR'