From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7183 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: musl-gcc wrapper patch Date: Wed, 11 Mar 2015 22:32:08 +0100 Message-ID: <20150311213208.GS16260@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OzxllxdKGCiKxUZM" X-Trace: ger.gmane.org 1426109555 3214 80.91.229.3 (11 Mar 2015 21:32:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Mar 2015 21:32:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7196-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 11 22:32:32 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YVoEx-0005tb-NL for gllmg-musl@m.gmane.org; Wed, 11 Mar 2015 22:32:31 +0100 Original-Received: (qmail 16374 invoked by uid 550); 11 Mar 2015 21:32:29 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 16288 invoked from network); 11 Mar 2015 21:32:20 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:7183 Archived-At: --OzxllxdKGCiKxUZM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline i assume the most common expectation is that the installed musl-gcc tool uses the same compiler as the musl build was using at least this is what i would want for cross compilation i guess this breaks if relative path or multiple words were used (cc with args) in $(CC) comments? --OzxllxdKGCiKxUZM Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-fix-the-musl-gcc-wrapper-to-call-the-gcc-used-for-th.patch" >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 --OzxllxdKGCiKxUZM--