>From 081ea4fb4042ba5584a77f3ea492845fffa9a203 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 11 Mar 2015 21:10:50 +0000 Subject: [PATCH] fix the musl-gcc wrapper to call the gcc used for the musl build In case of a cross build of musl, musl-gcc should call the cross compiler by default so it is easy to use the wrapper for cross compilation against the newly built libc. The REALGCC option is still there if one needs to use a different gcc. CC consisting of multiple words is not supported (eg CC='gcc -m32'). --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8cc3de8..c87ed1c 100644 --- a/Makefile +++ b/Makefile @@ -144,7 +144,7 @@ lib/musl-gcc.specs: tools/musl-gcc.specs.sh config.mak sh $< "$(includedir)" "$(libdir)" "$(LDSO_PATHNAME)" > $@ tools/musl-gcc: config.mak - printf '#!/bin/sh\nexec "$${REALGCC:-gcc}" "$$@" -specs "%s/musl-gcc.specs"\n' "$(libdir)" > $@ + printf '#!/bin/sh\nexec "$${REALGCC:-%s}" "$$@" -specs "%s/musl-gcc.specs"\n' "$(CC)" "$(libdir)" > $@ chmod +x $@ $(DESTDIR)$(bindir)/%: tools/% -- 2.3.2