All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/5] gcc: Fix nativesdk builds and multilib fixes with gcc 11
Date: Wed, 18 Aug 2021 17:50:30 +0100	[thread overview]
Message-ID: <20210818165033.3935964-2-richard.purdie@linuxfoundation.org> (raw)
In-Reply-To: <20210818165033.3935964-1-richard.purdie@linuxfoundation.org>

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>
---
 .../gcc/gcc-multilib-config.inc               | 24 ++++++++++++-------
 1 file 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 e90580d1cdb..33bcbbfa246 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() {
                 '%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'
-- 
2.30.2


  reply	other threads:[~2021-08-18 16:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 16:50 [PATCH 1/5] glibc-package.inc: Fix builds of pseudo with glibc 2.34 Richard Purdie
2021-08-18 16:50 ` Richard Purdie [this message]
2021-08-18 16:50 ` [PATCH 3/5] gcc: also relocate the musl loader Richard Purdie
2021-08-18 16:50 ` [PATCH 4/5] pseudo: Fix to work with glibc 2.34 systems Richard Purdie
2021-08-20  0:05   ` [OE-core] " Khem Raj
2021-08-18 16:50 ` [PATCH 5/5] elfutils: Fix ptest dependencies Richard Purdie
2021-08-20 13:48   ` [OE-core] " Alexander Kanavin
2021-08-21 11:13     ` Richard Purdie
2021-08-21 12:17       ` Alexander Kanavin
2021-08-21 14:46         ` Richard Purdie
2021-08-21 18:10           ` Martin Jansa
2021-08-21 18:23           ` Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818165033.3935964-2-richard.purdie@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.