From de4c9db52451030c989d450bccdedb21cdfcb172 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 17 Aug 2018 15:21:55 -0600 Subject: [PATCH] Fix build for relibc --- mk/cross.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mk/cross.mk b/mk/cross.mk index 80c0811..c566cee 100644 --- a/mk/cross.mk +++ b/mk/cross.mk @@ -50,9 +50,14 @@ $(PREFIX)/gcc-freestanding-install: $(PREFIX)/gcc touch "$@" $(PREFIX)/relibc-install: $(PREFIX)/binutils-install $(PREFIX)/gcc-freestanding-install - cd relibc && \ - make all -j `nproc` && \ - make DESTDIR="$@" install -j `nproc` + rm -rf "$(PREFIX)/relibc-build" + cp -r relibc "$(PREFIX)/relibc-build" + cd $(PREFIX)/relibc-build && \ + export PATH="$(PREFIX)/binutils-install/bin:$(PREFIX)/gcc-freestanding-install/bin:$$PATH" && \ + rustup target add "$(TARGET)" && \ + make clean && \ + make all && \ + make DESTDIR="$@" install touch "$@" $(PREFIX)/gcc-install: $(PREFIX)/gcc $(PREFIX)/relibc-install