Mail archive
alpine-aports

[alpine-aports] [PATCH] Add support for ppc64le

From: Breno Leitao <brenohl_at_br.ibm.com>
Date: Tue, 17 Jan 2017 14:30:31 -0200

This is a patch that adds support for ppc64le platform. Currently, musl fails
to build with long double as 128-bits, because POWER does not implement IEEE
long double but IBM long double which causes the following error:

unsupported long double type musl

This patch just turns "long double" into "double" for ppc64le.
---
 main/musl/APKBUILD | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index d2f3a82..2631ebb 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
_at_@ -39,6 +39,7 @@ install_sysroot_headers() {
 	case "$CARCH" in
 	aarch64*) ARCH="aarch64" ;;
 	arm*) ARCH="arm" ;;
+	ppc64*) ARCH="powerpc64" ;;
 	x86) ARCH="i386" ;;
 	x86_64) ARCH="x86_64" ;;
 	mips*) ARCH="mips" ;;
_at_@ -49,6 +50,11 @@ install_sysroot_headers() {
 build() {
 	cd "$builddir"
 
+	# Consider "long double" 64-bits wide on Power
+	if [ $CARCH == "ppc64le" ]; then
+		CFLAGS="$CFLAGS -mlong-double-64"
+	fi
+
 	# provide minimal libssp_nonshared.a so we don't need libssp from gcc
 	${CROSS_COMPILE}gcc $CPPFLAGS $CFLAGS -c "$srcdir"/__stack_chk_fail_local.c -o __stack_chk_fail_local.o || return 1
 	${CROSS_COMPILE}ar r libssp_nonshared.a __stack_chk_fail_local.o || return 1
-- 
2.7.4
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Jan 17 2017 - 14:30:31 GMT