From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7825 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 1/2] add musl-clang, a wrapper for system clang installs Date: Fri, 29 May 2015 13:03:49 -0400 Message-ID: <20150529170349.GK17573@brightrain.aerifal.cx> References: <1432918126-27741-1-git-send-email-hi@shiz.me> 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 1432919047 12927 80.91.229.3 (29 May 2015 17:04:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2015 17:04:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7837-gllmg-musl=m.gmane.org@lists.openwall.com Fri May 29 19:04:07 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 1YyNhU-0000Nl-RA for gllmg-musl@m.gmane.org; Fri, 29 May 2015 19:04:05 +0200 Original-Received: (qmail 28630 invoked by uid 550); 29 May 2015 17:04:03 -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 28609 invoked from network); 29 May 2015 17:04:02 -0000 Content-Disposition: inline In-Reply-To: <1432918126-27741-1-git-send-email-hi@shiz.me> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7825 Archived-At: On Fri, May 29, 2015 at 06:48:45PM +0200, Shiz wrote: > +# prevent clang from running the linker (and erroring) on no input. > +sflags= > +eflags= > +for x ; do > + case "$x" in > + -l*) input=1 ;; > + -*) input= ;; > + *) input=1 ;; > + esac > + if test "$input" ; then > + sflags="-l-user-start" > + eflags="-lc -l-user-end" > + break > + fi > +done This logic looks wrong. For example, "-L foo" would result in input=1, no? And same for any other options with arguments. Rich