]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc: Fix nativesdk builds and multilib fixes with gcc 11
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Aug 2021 22:23:05 +0000 (23:23 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 22 Aug 2021 21:21:11 +0000 (22:21 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-multilib-config.inc

index e90580d1cdbc8831ae970e63ae9d457ebe94bdcc..33bcbbfa246fbb252ae5412812856cd2c4a4ff17 100644 (file)
@@ -31,7 +31,9 @@ python gcc_multilib_setup() {
                 '%s/*/linux64.h' % src_conf_dir,
                 '%s/aarch64/t-aarch64' % src_conf_dir,
                 '%s/aarch64/aarch64.h' % src_conf_dir,
+                '%s/aarch64/aarch64-linux.h' % src_conf_dir,
                 '%s/aarch64/aarch64-cores.def' % src_conf_dir,
+                '%s/arm/linux-eabi.h' % src_conf_dir,
                 '%s/*/linux.h' % src_conf_dir,
                 '%s/linux.h' % src_conf_dir)
 
@@ -102,6 +104,8 @@ python gcc_multilib_setup() {
                         r'\1' + wrap_libdir(libdir64) + r'\3'),
                     (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*\"\S+\"\s*)(\S+)(\s*\"\S+\"\s*)(\S+)(\s*\".*\")$',
                         r'\1' + wrap_libdir(libdir64) + r'\3' + wrap_libdir(libdir64) + r'\5'),
+                    (r'^(#define\s*GLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$',
+                        r'\1' + wrap_libdir(libdir32) + r'\3'),
                     (r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$',
                         r'\1' + wrap_libdir(libdirx32) + r'\3'),
                     (r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
@@ -112,6 +116,8 @@ python gcc_multilib_setup() {
                         r'\1' + wrap_libdir(libdir64) + r'\3'),
                     (r'^(#define\s*UCLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$',
                         r'\1' + wrap_libdir(libdirn32) + r'\3'),
+                    (r'^(#define\s*UCLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$',
+                        r'\1' + wrap_libdir(libdirx32) + r'\3'),
                     (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$',
                         r'\1' + wrap_libdir(libdir32) + r'\3'),
                 ]
@@ -138,15 +144,15 @@ python gcc_multilib_setup() {
     }
 
     gcc_header_config_files = {
-        'x86_64'    : ['gcc/config/i386/linux64.h'],
-        'i586'      : ['gcc/config/i386/linux64.h'],
-        'i686'      : ['gcc/config/i386/linux64.h'],
-        'mips'      : ['gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'],
-        'mips64'    : ['gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'],
-        'powerpc'   : ['gcc/config/rs6000/linux64.h'],
-        'powerpc64' : ['gcc/config/rs6000/linux64.h'],
-        'aarch64'   : ['gcc/config/aarch64/aarch64.h'],
-        'arm'       : ['gcc/config/aarch64/aarch64.h'],
+        'x86_64'    : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'],
+        'i586'      : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'],
+        'i686'      : ['gcc/config/linux.h', 'gcc/config/i386/linux64.h'],
+        'mips'      : ['gcc/config/linux.h', 'gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'],
+        'mips64'    : ['gcc/config/linux.h', 'gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'],
+        'powerpc'   : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'],
+        'powerpc64' : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'],
+        'aarch64'   : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'],
+        'arm'       : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'],
     }
 
     libdir32 = 'SYSTEMLIBS_DIR'