From b5d4ece03df56b7d34c8ee312cccc1ae29b69ab8 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 19 Oct 2018 18:54:16 +0200 Subject: [PATCH] cleanup: derive MUSL_CPU from TARGET in Musl package Signed-off-by: David Oberhollenzer --- layer/bsp-alix/TOOLCHAIN | 1 - layer/bsp-qemu64/TOOLCHAIN | 1 - layer/bsp-rpi3/TOOLCHAIN | 1 - pkg/musl/build | 17 +++++++++++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/layer/bsp-alix/TOOLCHAIN b/layer/bsp-alix/TOOLCHAIN index c158df3..e4f33ff 100644 --- a/layer/bsp-alix/TOOLCHAIN +++ b/layer/bsp-alix/TOOLCHAIN @@ -1,7 +1,6 @@ RELEASEPKG="release-alix" TARGET="i686-linux-musl" GCC_CPU="i686" -MUSL_CPU="i386" CPU_IS_64BIT="no" diff --git a/layer/bsp-qemu64/TOOLCHAIN b/layer/bsp-qemu64/TOOLCHAIN index 97c7605..8e14357 100644 --- a/layer/bsp-qemu64/TOOLCHAIN +++ b/layer/bsp-qemu64/TOOLCHAIN @@ -1,7 +1,6 @@ RELEASEPKG="release-qemu" TARGET="x86_64-linux-musl" GCC_CPU="x86-64" -MUSL_CPU="x86_64" CPU_IS_64BIT="yes" diff --git a/layer/bsp-rpi3/TOOLCHAIN b/layer/bsp-rpi3/TOOLCHAIN index d2e44cb..400e316 100644 --- a/layer/bsp-rpi3/TOOLCHAIN +++ b/layer/bsp-rpi3/TOOLCHAIN @@ -1,7 +1,6 @@ RELEASEPKG="release-rpi3" TARGET="arm-linux-musleabihf" GCC_CPU="armv6" -MUSL_CPU="arm" CPU_IS_64BIT="no" diff --git a/pkg/musl/build b/pkg/musl/build index 1d88a30..991270f 100755 --- a/pkg/musl/build +++ b/pkg/musl/build @@ -26,6 +26,23 @@ build() { deploy() { local INPUT="$1" local DEPLOY="$2" + local MUSL_CPU="" + + case "$TARGET" in + i*86-*) + MUSL_CPU="i386" + ;; + x86_64-*) + MUSL_CPU="x86_64" + ;; + arm-*) + MUSL_CPU="arm" + ;; + *) + echo "don't know how to map $TARGET to Musl arch" + exit 1 + ;; + esac DESTDIR="$DEPLOY" make install-headers DESTDIR="$DEPLOY" make install-libs