From 56aa508b8dd69915a94d237b52e6c428d95c7077 Mon Sep 17 00:00:00 2001 From: Trammell hudson Date: Tue, 29 Oct 2019 13:15:56 +0100 Subject: [PATCH] musl-cross: pin to a specific checkout (#617) Add `--strip 1` to tar file extraction in the `Makefile`, which ensures that the directory name in `build/` will match the one listed in `$($(MODULE)_dir)`. Signed-off-by: Trammell hudson --- Makefile | 7 ++++--- modules/musl-cross | 8 +++++--- .../{musl-cross.patch => musl-cross-81d563e.patch} | 12 ++++++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) rename patches/{musl-cross.patch => musl-cross-81d563e.patch} (57%) diff --git a/Makefile b/Makefile index cc5cac6a..21e38108 100644 --- a/Makefile +++ b/Makefile @@ -264,9 +264,10 @@ define define_module = # Unpack the tar file and touch the canary so that we know # that the files are all present $(build)/$($1_base_dir)/.canary: $(packages)/.$1-$($1_version)_verify - tar -xf "$(packages)/$($1_tar)" -C "$(build)" + mkdir -p "$$(dir $$@)" + tar -xf "$(packages)/$($1_tar)" --strip 1 -C "$$(dir $$@)" if [ -r patches/$1-$($1_version).patch ]; then \ - ( cd $(build)/$($1_base_dir) ; patch -p1 ) \ + ( cd $$(dir $$@) ; patch -p1 ) \ < patches/$1-$($1_version).patch \ || exit 1 ; \ fi @@ -274,7 +275,7 @@ define define_module = [ -r patches/$1-$($1_version) ] ; then \ for patch in patches/$1-$($1_version)/*.patch ; do \ echo "Applying patch file : $$$$patch " ; \ - ( cd $(build)/$($1_base_dir) ; patch -p1 ) \ + ( cd $$(dir $$@) ; patch -p1 ) \ < $$$$patch \ || exit 1 ; \ done ; \ diff --git a/modules/musl-cross b/modules/musl-cross index 19973185..b15d670d 100644 --- a/modules/musl-cross +++ b/modules/musl-cross @@ -23,9 +23,11 @@ else # Force a full build of the cross compiler modules-y += musl-cross -musl-cross_version := git -musl-cross_dir := musl-cross-$(musl-cross_version) -musl-cross_repo := https://github.com/GregorR/musl-cross +musl-cross_version := 81d563e +musl-cross_dir := musl-cross +musl-cross_url := https://github.com/GregorR/musl-cross/archive/$(musl-cross_version).tar.gz +musl-cross_tar := musl-cross-$(musl-cross_version).tar.gz +musl-cross_hash := 6362751b2442dc273c0889e5ef3ce6306a38b9c415cbe8cb4cfe3b8c6d776e96 CROSS_TOP := crossgcc/x86_64-linux-musl/bin/x86_64-musl-linux- CROSS := $(build)/../$(CROSS_TOP) diff --git a/patches/musl-cross.patch b/patches/musl-cross-81d563e.patch similarity index 57% rename from patches/musl-cross.patch rename to patches/musl-cross-81d563e.patch index 7161e673..e7633b7b 100644 --- a/patches/musl-cross.patch +++ b/patches/musl-cross-81d563e.patch @@ -36,3 +36,15 @@ index ec3c1ce..844fb3d 100644 # uncomment these to get smaller/stripped binaries #export CFLAGS="-Os -g0 -s" #export CXXFLAGS="-Os -g0" +--- /dev/null 2019-10-28 16:42:28.211999999 +0100 ++++ musl-cross/hashes/gmp-6.1.0.tar.bz2.sha256 2019-10-29 13:08:53.288687684 +0100 +@@ -0,0 +1 @@ ++498449a994efeba527885c10405993427995d3f86b8768d8cdf8d9dd7c6b73e8 gmp-6.1.0.tar.bz2 +--- /dev/null 2019-10-28 16:42:28.211999999 +0100 ++++ musl-cross/hashes/mpfr-3.1.4.tar.bz2.sha256 2019-10-29 13:08:53.292687684 +0100 +@@ -0,0 +1 @@ ++d3103a80cdad2407ed581f3618c4bed04e0c92d1cf771a65ead662cc397f7775 mpfr-3.1.4.tar.bz2 +--- /dev/null 2019-10-28 16:42:28.211999999 +0100 ++++ musl-cross/hashes/mpc-1.0.3.tar.gz.sha256 2019-10-29 13:08:53.296687684 +0100 +@@ -0,0 +1 @@ ++617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3 mpc-1.0.3.tar.gz