Skip to contentSkip to conversation

linuxloader.bbclass: Add entry for ppc64 LE glibc loader

PATCH New Khem Raj 1 participant 2 messages Jun 14, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 linuxloader.bbclass: Add entry for ppc64 LE glibc loader

---
 meta/classes/linuxloader.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/linuxloader.bbclass +2 -0
index 30925ac87d..3ded1fc786 100644
@@ -40,6 +40,8 @@ def get_glibc_loader(d):
         dynamic_loader = "${base_libdir}/ld-linux-mipsn8.so.1"
     elif targetarch.startswith("mips"):
         dynamic_loader = "${base_libdir}/ld.so.1"
+    elif targetarch == "powerpc64le":
+        dynamic_loader = "${base_libdir}/ld64.so.2"
     elif targetarch == "powerpc64":
         dynamic_loader = "${base_libdir}/ld64.so.1"
     elif targetarch == "x86_64":
Signature · 1 line
2.32.0
author
#1 lore raw

PATCH 2/2 gcompat: Create symlinks to glibc ldso locations

This ensures the glibc based binaries can find it in right place

---
 meta/recipes-core/musl/gcompat_git.bb | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
meta/recipes-core/musl/gcompat_git.bb +12 -2
index e1ae052c44..863ba8dbf0 100644
@@ -14,14 +14,16 @@ SRCREV = "af5a49e489fdc04b9cf02547650d7aeaccd43793"
 
 S = "${WORKDIR}/git"
 
-inherit pkgconfig linuxloader
+inherit pkgconfig linuxloader siteinfo
 
 DEPENDS += "musl-obstack"
 
 GLIBC_LDSO = "${@get_glibc_loader(d)}"
 MUSL_LDSO = "${@get_musl_loader(d)}"
 
-EXTRA_OEMAKE = "LINKER_PATH=${MUSL_LDSO} LOADER_NAME=`basename ${@get_glibc_loader(d)}`"
+EXTRA_OEMAKE = "LINKER_PATH=${MUSL_LDSO} \
+                LOADER_NAME=`basename ${GLIBC_LDSO}` \
+                "
 
 do_configure () {
 	:
@@ -33,8 +35,16 @@ do_compile () {
 
 do_install () {
 	oe_runmake install 'DESTDIR=${D}'
+	if [ "${SITEINFO_BITS}" = "64" ]; then
+		install -d ${D}/lib64
+		lnr ${D}${GLIBC_LDSO} ${D}/lib64/`basename ${GLIBC_LDSO}`
+	fi
 }
 
+FILES_${PN} += "/lib64"
+
+INSANE_SKIP_${PN} = "libdir"
+
 RPROVIDES_${PN} += "musl-glibc-compat"
 #
 # We will skip parsing for non-musl systems
Signature · 1 line
2.32.0