From: Rich Felker Date: Fri, 21 Sep 2012 17:47:26 +0000 (-0400) Subject: offer REALGCC variable to configure musl-gcc wrapper at runtime X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=0b3e2257fa9f4c4773f8aec1bdbccbc46a4d9477;hp=f600105eef74a636a0efd1f1d07170ce5df9aa64;ds=sidebyside offer REALGCC variable to configure musl-gcc wrapper at runtime this is useful when the underlying gcc is already a wrapper, which is the case at least on some uclibc-based system images. it's also useful for running an older/newer/nondefault version of gcc. --- diff --git a/Makefile b/Makefile index 10c174ce..3c55c8f2 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,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 gcc "$$@" -specs "%s/musl-gcc.specs"\n' "$(libdir)" > $@ + printf '#!/bin/sh\nexec "$${REALGCC:-gcc}" "$$@" -specs "%s/musl-gcc.specs"\n' "$(libdir)" > $@ chmod +x $@ $(DESTDIR)$(bindir)/%: tools/%