From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1968 Path: news.gmane.org!not-for-mail From: idunham@lavabit.com Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl-gcc question Date: Thu, 20 Sep 2012 19:39:46 -0400 (EDT) Message-ID: <61640.132.241.44.49.1348184386.squirrel@lavabit.com> References: <20120920181406.GO254@brightrain.aerifal.cx> <57145.132.241.44.49.1348178025.squirrel@lavabit.com> <20120920220406.GQ254@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20120920193946_78827" X-Trace: ger.gmane.org 1348184404 30098 80.91.229.3 (20 Sep 2012 23:40:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Sep 2012 23:40:04 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1969-gllmg-musl=m.gmane.org@lists.openwall.com Fri Sep 21 01:40:09 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TEqLj-00006C-Av for gllmg-musl@plane.gmane.org; Fri, 21 Sep 2012 01:40:03 +0200 Original-Received: (qmail 28669 invoked by uid 550); 20 Sep 2012 23:39:58 -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 28661 invoked from network); 20 Sep 2012 23:39:58 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=uTzqRnx+VXHHdXmkrlVH84y51TFqR/6Pt+qPd0AkaojYScCk10HAaw24tvdh1S6ErgS1rXwpjJaWVcbZZ3vCDnj7nSFWGMZ6OMpXDQLT+xANP+8tLX69swYrQuSYrrnLsA4d2ICeROhYElV6ag9G6K6UjiHJ9WaoSb8DSZHnXj0=; h=Message-ID:In-Reply-To:References:Date:Subject:From:To:User-Agent:MIME-Version:Content-Type; In-Reply-To: <20120920220406.GQ254@brightrain.aerifal.cx> User-Agent: SquirrelMail/1.4.13 Xref: news.gmane.org gmane.linux.lib.musl.general:1968 Archived-At: ------=_20120920193946_78827 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit > On Thu, Sep 20, 2012 at 05:53:45PM -0400, idunham@lavabit.com wrote: >> Rich, what would you think of changing from a hardcoded "gcc" to using >> something along these lines: >> >> [ -z "$REALGCC" ] && REALGCC=gcc >> $REALGCC >> >> By setting REALGCC to rawgcc, Landley's toolchain could easily be used. >> This would also help for using other cross-toolchains. >> (note: I'm not particular about the variable, but $GCC might be a bad >> choice: ISTR seeing one or two Makefiles that set that.) > > Have you tested if this works okay? If it's known to work, send a > clean patch and I think it should be okay to apply. That was off the top of my head, but it works. Patch has been tested by building musl, then building my patched netbsd m4. (I modified musl-gcc after installation to echo REALGCC). Usage: REALGCC=rawgcc make CC=musl-gcc Isaac Dunham ------=_20120920193946_78827 Content-Type: text/x-patch; name="realgcc.diff" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="realgcc.diff" commit 01c16bf8f4e68c838994716e77bd254b86a989bc Author: Isaac Dunham Date: Thu Sep 20 16:30:00 2012 -0700 Allow REALGCC to set the compiler for musl-gcc to use diff --git a/Makefile b/Makefile index 10c174c..f62635d 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\n[ -z "$$REALGCC" ] && REALGCC=gcc\nexec $$REALGCC "$$@" -specs "%s/musl-gcc.specs"\n' "$(libdir)" > $@ chmod +x $@ $(DESTDIR)$(bindir)/%: tools/% ------=_20120920193946_78827--