From 8bfeaa15f65a6aee228bbb771c2d15090be7b907 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 11 Aug 2016 15:52:48 +0100 Subject: [PATCH] Add xz / lzma, required by RPM. --- .gitignore | 1 + Makefile | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.gitignore b/.gitignore index 40cde53..03a3b17 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,5 @@ stamp-* /sed-4.2/ /tar-1.29/ /util-linux-2.28/ +/xz-5.2.2/ /zlib-1.2.8/ diff --git a/Makefile b/Makefile index cd42938..d4e345e 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,7 @@ PATCH_VERSION = 2.7.5 HOSTNAME_VERSION = 3.15 GETTEXT_VERSION = 0.19 LUA_VERSION = 5.3.3 +XZ_VERSION = 5.2.2 all: stage1 stage2 stage3 stage4 @@ -311,6 +312,7 @@ stage3: stage3-kernel/linux-$(KERNEL_VERSION)/vmlinux \ stage3-chroot/usr/bin/gettext \ stage3-chroot/usr/bin/lua \ stage3-chroot/usr/bin/rpm \ + stage3-chroot/usr/bin/xz \ stage3-chroot/init \ stage3-disk.img @@ -910,6 +912,24 @@ lua-$(LUA_VERSION).tar.gz: wget -O $@-t https://www.lua.org/ftp/lua-$(LUA_VERSION).tar.gz mv $@-t $@ +# Cross-compile xz. +stage3-chroot/usr/bin/xz: xz-$(XZ_VERSION).tar.gz + rm -rf xz-$(XZ_VERSION) + tar -zxf $^ + cd xz-$(XZ_VERSION) && \ + PATH=$(ROOT)/fixed-gcc:$$PATH \ + ./configure \ + --host=riscv64-unknown-linux-gnu \ + --prefix=/usr --libdir=/usr/lib64 + cd xz-$(XZ_VERSION) && PATH=$(ROOT)/fixed-gcc:$$PATH make + cd xz-$(XZ_VERSION) && PATH=$(ROOT)/fixed-gcc:$$PATH make install DESTDIR=$(ROOT)/stage3-chroot + rm -f stage3-chroot/usr/lib64/*.la + +xz-$(XZ_VERSION).tar.gz: + rm -f $@ $@-t + wget -O $@-t http://tukaani.org/xz/xz-$(XZ_VERSION).tar.gz + mv $@-t $@ + # Cross-compile RPM / rpmbuild. # We build this from a git commit, with a few hacks to the configure # script. -- 1.8.3.1