From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7184 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl-gcc wrapper patch Date: Wed, 11 Mar 2015 18:19:47 -0400 Message-ID: <20150311221947.GH23507@brightrain.aerifal.cx> References: <20150311213208.GS16260@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1426112405 17000 80.91.229.3 (11 Mar 2015 22:20:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Mar 2015 22:20:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7197-gllmg-musl=m.gmane.org@lists.openwall.com Wed Mar 11 23:20:05 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 1YVoyx-0007ss-5X for gllmg-musl@m.gmane.org; Wed, 11 Mar 2015 23:20:03 +0100 Original-Received: (qmail 28141 invoked by uid 550); 11 Mar 2015 22:20:01 -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 28120 invoked from network); 11 Mar 2015 22:20:01 -0000 Content-Disposition: inline In-Reply-To: <20150311213208.GS16260@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7184 Archived-At: On Wed, Mar 11, 2015 at 10:32:08PM +0100, Szabolcs Nagy wrote: > 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? > [...] > 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 $@ Since $CC can contain multiple shell words (e.g. a -m32 or similar) perhaps we should remove the double-quotes around the expansion of $REALGCC? Unfortunately this makes for a trade-off between supporting 'standard' usage of $CC and supporting pathnames containing whitespace. Any opinions on the matter? Any ways to avoid the tradeoff? Overall I'm in favor of this change anyway but I'd like to avoid having any negative impact. Rich