glibc: enable ppc64le support

This commit is contained in:
q66 2019-01-01 00:26:52 +01:00 committed by Enno Boland
parent ef8cd4b546
commit 01f3016e9a
2 changed files with 11 additions and 4 deletions

View File

@ -26,6 +26,7 @@ ld-linux-x86-64.so.2 glibc-2.28_1 x86_64
ld-linux.so.2 glibc-2.28_1 i686
ld-linux.so.3 glibc-2.28_1 armv5tel
ld-linux-aarch64.so.1 glibc-2.28_1 aarch64
ld64.so.2 glibc-2.28_1 ppc64
ld.so.1 glibc-2.28_1 mips
ld-linux-armhf.so.3 glibc-2.28_1
libresolv.so.2 glibc-2.28_1

View File

@ -54,7 +54,7 @@ makedepends="kernel-libc-headers"
lib32files="/usr/lib/gconv/gconv-modules"
lib32symlinks="ld-linux.so.2"
# There's no point in building this for musl.
only_for_archs="i686 x86_64 armv5tel armv6l armv7l aarch64"
only_for_archs="i686 x86_64 armv5tel armv6l armv7l aarch64 ppc64le"
nopie=yes
do_configure() {
@ -142,12 +142,18 @@ do_install() {
# ldd is a bash script, so make it run as such.
replace_interpreter bash ${DESTDIR}/usr/bin/ldd
# On x86_64, add dynamic linker's 32bit version to ldd.
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
rtldlist="/lib/ld-linux.so.2 /lib/ld-linux-x86-64.so.2"
rtldlist=""
# On x86_64, add dynamic linker's 32bit version to ldd,
# on ppc64 substitute with our own dynamic linker path
case "$XBPS_TARGET_MACHINE" in
x86_64) rtldlist="/lib/ld-linux.so.2 /lib/ld-linux-x86-64.so.2";;
ppc64le) rtldlist="/lib/ld64.so.2";;
esac
if [ -n "$rtldlist" ]; then
sed -i "s|^RTLDLIST.*$|RTLDLIST=\"$rtldlist\"|" \
${DESTDIR}/usr/bin/ldd
fi
install -d ${DESTDIR}/etc/ld.so.conf.d
echo "/usr/local/lib" > ${DESTDIR}/etc/ld.so.conf.d/usr_local.conf
chmod 644 ${DESTDIR}/etc/ld.so.conf.d/usr_local.conf