Message ID | 20230116065843.19446-1-pavel@zhukoff.net |
---|---|
State | New, archived |
Headers | show |
Series | [kirkstone] gcc: Fix build with musl and usrmerge on arm | expand |
On Sun, Jan 15, 2023 at 10:59 PM Pavel Zhukov <pavel@zhukoff.net> wrote: > Backport fix from master to allow gcc to use proper linker path for > musl [Yocto #14977] Lgtm > > > Fixes: > | qemu-arm: Could not open '/lib/ld-musl-armhf.so.1': No such file or > directory > > Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> > --- > meta/recipes-devtools/gcc/gcc-11.3.inc | 1 + > .../gcc/0031-fix-musl-arm-with-usrmerge.patch | 18 ++++++++++++++++++ > 2 files changed, 19 insertions(+) > create mode 100644 > meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch > > diff --git a/meta/recipes-devtools/gcc/gcc-11.3.inc > b/meta/recipes-devtools/gcc/gcc-11.3.inc > index 27074a06ae..2adb21ed84 100644 > --- a/meta/recipes-devtools/gcc/gcc-11.3.inc > +++ b/meta/recipes-devtools/gcc/gcc-11.3.inc > @@ -60,6 +60,7 @@ SRC_URI = "\ > > file://0028-debug-101473-apply-debug-prefix-maps-before-checksum.patch \ > file://0029-Fix-install-path-of-linux64.h.patch \ > file://0030-rust-recursion-limit.patch \ > + file://0031-fix-musl-arm-with-usrmerge.patch \ > file://0001-CVE-2021-42574.patch \ > file://0002-CVE-2021-42574.patch \ > file://0003-CVE-2021-42574.patch \ > diff --git > a/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch > b/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch > new file mode 100644 > index 0000000000..1408b65c64 > --- /dev/null > +++ b/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch > @@ -0,0 +1,18 @@ > +Upstream-Status: Inappropriate [bugfix] > + > +The fix has been picked from OE-core ustream: > + 0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch > + > +Index: gcc-11.3.0/gcc/config/arm/linux-eabi.h > +=================================================================== > +--- gcc-11.3.0.orig/gcc/config/arm/linux-eabi.h > ++++ gcc-11.3.0/gcc/config/arm/linux-eabi.h > +@@ -89,7 +89,7 @@ > + #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" > + #endif > + #define MUSL_DYNAMIC_LINKER \ > +- "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E > "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" > ++ SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E > "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" > + > + /* For armv4 we pass --fix-v4bx to linker to support EABI */ > + #undef TARGET_FIX_V4BX_SPEC > -- > 2.39.0 > >
On Mon, Jan 16, 2023 at 5:31 AM Khem Raj <raj.khem@gmail.com> wrote: > > > > On Sun, Jan 15, 2023 at 10:59 PM Pavel Zhukov <pavel@zhukoff.net> wrote: >> >> Backport fix from master to allow gcc to use proper linker path for >> musl [Yocto #14977] > > > Lgtm Hi Khem, Which of the two versions of the fix do you prefer that I take? Thanks! Steve >> Fixes: >> | qemu-arm: Could not open '/lib/ld-musl-armhf.so.1': No such file or directory >> >> Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> >> --- >> meta/recipes-devtools/gcc/gcc-11.3.inc | 1 + >> .../gcc/0031-fix-musl-arm-with-usrmerge.patch | 18 ++++++++++++++++++ >> 2 files changed, 19 insertions(+) >> create mode 100644 meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch >> >> diff --git a/meta/recipes-devtools/gcc/gcc-11.3.inc b/meta/recipes-devtools/gcc/gcc-11.3.inc >> index 27074a06ae..2adb21ed84 100644 >> --- a/meta/recipes-devtools/gcc/gcc-11.3.inc >> +++ b/meta/recipes-devtools/gcc/gcc-11.3.inc >> @@ -60,6 +60,7 @@ SRC_URI = "\ >> file://0028-debug-101473-apply-debug-prefix-maps-before-checksum.patch \ >> file://0029-Fix-install-path-of-linux64.h.patch \ >> file://0030-rust-recursion-limit.patch \ >> + file://0031-fix-musl-arm-with-usrmerge.patch \ >> file://0001-CVE-2021-42574.patch \ >> file://0002-CVE-2021-42574.patch \ >> file://0003-CVE-2021-42574.patch \ >> diff --git a/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch b/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch >> new file mode 100644 >> index 0000000000..1408b65c64 >> --- /dev/null >> +++ b/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch >> @@ -0,0 +1,18 @@ >> +Upstream-Status: Inappropriate [bugfix] >> + >> +The fix has been picked from OE-core ustream: >> + 0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch >> + >> +Index: gcc-11.3.0/gcc/config/arm/linux-eabi.h >> +=================================================================== >> +--- gcc-11.3.0.orig/gcc/config/arm/linux-eabi.h >> ++++ gcc-11.3.0/gcc/config/arm/linux-eabi.h >> +@@ -89,7 +89,7 @@ >> + #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" >> + #endif >> + #define MUSL_DYNAMIC_LINKER \ >> +- "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" >> ++ SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" >> + >> + /* For armv4 we pass --fix-v4bx to linker to support EABI */ >> + #undef TARGET_FIX_V4BX_SPEC >> -- >> 2.39.0 >> > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#175997): https://lists.openembedded.org/g/openembedded-core/message/175997 > Mute This Topic: https://lists.openembedded.org/mt/96302404/3620601 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [steve@sakoman.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/recipes-devtools/gcc/gcc-11.3.inc b/meta/recipes-devtools/gcc/gcc-11.3.inc index 27074a06ae..2adb21ed84 100644 --- a/meta/recipes-devtools/gcc/gcc-11.3.inc +++ b/meta/recipes-devtools/gcc/gcc-11.3.inc @@ -60,6 +60,7 @@ SRC_URI = "\ file://0028-debug-101473-apply-debug-prefix-maps-before-checksum.patch \ file://0029-Fix-install-path-of-linux64.h.patch \ file://0030-rust-recursion-limit.patch \ + file://0031-fix-musl-arm-with-usrmerge.patch \ file://0001-CVE-2021-42574.patch \ file://0002-CVE-2021-42574.patch \ file://0003-CVE-2021-42574.patch \ diff --git a/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch b/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch new file mode 100644 index 0000000000..1408b65c64 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch @@ -0,0 +1,18 @@ +Upstream-Status: Inappropriate [bugfix] + +The fix has been picked from OE-core ustream: + 0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch + +Index: gcc-11.3.0/gcc/config/arm/linux-eabi.h +=================================================================== +--- gcc-11.3.0.orig/gcc/config/arm/linux-eabi.h ++++ gcc-11.3.0/gcc/config/arm/linux-eabi.h +@@ -89,7 +89,7 @@ + #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" + #endif + #define MUSL_DYNAMIC_LINKER \ +- "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" ++ SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" + + /* For armv4 we pass --fix-v4bx to linker to support EABI */ + #undef TARGET_FIX_V4BX_SPEC
Backport fix from master to allow gcc to use proper linker path for musl [Yocto #14977] Fixes: | qemu-arm: Could not open '/lib/ld-musl-armhf.so.1': No such file or directory Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> --- meta/recipes-devtools/gcc/gcc-11.3.inc | 1 + .../gcc/0031-fix-musl-arm-with-usrmerge.patch | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc/0031-fix-musl-arm-with-usrmerge.patch