From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7827 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:13:35 -0400 Message-ID: <20150529171335.GL17573@brightrain.aerifal.cx> References: <1432918126-27741-1-git-send-email-hi@shiz.me> <20150529170349.GK17573@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1432919632 22294 80.91.229.3 (29 May 2015 17:13:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2015 17:13:52 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7839-gllmg-musl=m.gmane.org@lists.openwall.com Fri May 29 19:13:51 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 1YyNqx-0007KJ-4o for gllmg-musl@m.gmane.org; Fri, 29 May 2015 19:13:51 +0200 Original-Received: (qmail 3663 invoked by uid 550); 29 May 2015 17:13:49 -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 3645 invoked from network); 29 May 2015 17:13:49 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7827 Archived-At: On Fri, May 29, 2015 at 07:11:18PM +0200, Shiz wrote: > > On 29 May 2015, at 19:03, Rich Felker wrote: > > > > This logic looks wrong. For example, "-L foo" would result in input=1, > > no? And same for any other options with arguments. > > > > Rich > > Hmm, I’m afraid you’re right. I’ll need to rethink this approach... > I was slightly annoyed by it being needed in the first place, but there’s no > other way from what I could see than these markers to figure out what comes > from a user and what doesn’t, since clang re-orders -l and -L arguments. > If they weren’t needed I could just move -lc to the linker wrapper... What if you add a bogus prefix to all -l and -L options provided by the user? Then the wrapper can remove any -l or -L options without the prefix, then remove the prefix from the ones that remain. Rich