From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7768 Path: news.gmane.org!not-for-mail From: Justin Cormack Newsgroups: gmane.linux.lib.musl.general Subject: Re: Using Musl with LLVM/Clang Date: Tue, 26 May 2015 08:48:56 +0100 Message-ID: References: <12AE8608-7269-4325-9566-9897073E61A3@shiz.me> <20150526013741.GY17573@brightrain.aerifal.cx> <2C35A69F-3A8A-4EDE-86CA-029A9B9BDD45@shiz.me> 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: quoted-printable X-Trace: ger.gmane.org 1432626556 24433 80.91.229.3 (26 May 2015 07:49:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 May 2015 07:49:16 +0000 (UTC) Cc: Paulo Castro , simoes.lucas.silva@gmail.com To: musl@lists.openwall.com Original-X-From: musl-return-7780-gllmg-musl=m.gmane.org@lists.openwall.com Tue May 26 09:49:10 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 1Yx9bp-0003kC-PT for gllmg-musl@m.gmane.org; Tue, 26 May 2015 09:49:09 +0200 Original-Received: (qmail 32661 invoked by uid 550); 26 May 2015 07:49:08 -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 32640 invoked from network); 26 May 2015 07:49:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=specialbusservice.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=S5UvtytX5s3ZYQOsBibJSbq0m2vQNY6513Lm9hwemts=; b=qqzPp3XM5Xe7BZSX/nVqN/mtk7lOxdlqbB1rlPqWU94YMENDLONrvQqiQ2gHRU6EEB tbU+/TRMjFTG2Js/kRdAKNMfcG9nROUXyP3uLFbLykq/KJnZ4gMMpWMirFR7zwoDNUsf fmBLC5+BCjYTmSspHaGK6DkKiggXTcBIJw19U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=S5UvtytX5s3ZYQOsBibJSbq0m2vQNY6513Lm9hwemts=; b=EzcDplhpy9jZ8slg3lTmeYOVX7AUOVpjwMaSQE7dMpdVOWjFIfXCXQAWReiyW23RwL GF8yxtOt5s2ZnikWQ35bbZQgC8W1pVOnXd5wvSbTpIp8/qog+nGy85I4WxAncTe+Fpe0 P+PqQEJTYQHGoAbEhTIz6us7g4Sz1rxcYxjYRS0C/QyxkvgtXfqaUznFOtADewJ2wOo3 N5pcqpxakoKo3D2Kmty2QcERcmJ2XH6TxMifwhSx4uGpsnTuAZUNm1tyOaQAdIaHXUG/ wA1aK60fo0nJ5JyAV5GAWX5npYSul66ivAH5ctv2+CEYUSpdDPGqS3rI4e/FDH9wEEuM 5gew== X-Gm-Message-State: ALoCoQmXyvxOTxBoXtsfY+lCF2ZTRf3QSaTAIKzwD6GzQp/p4TSph9P3It49sjr6zNu1TJiQRPhJ X-Received: by 10.194.216.196 with SMTP id os4mr47188757wjc.117.1432626536237; Tue, 26 May 2015 00:48:56 -0700 (PDT) In-Reply-To: <2C35A69F-3A8A-4EDE-86CA-029A9B9BDD45@shiz.me> Xref: news.gmane.org gmane.linux.lib.musl.general:7768 Archived-At: On 26 May 2015 at 02:53, Shiz wrote: >> On 26 May 2015, at 03:37, Rich Felker wrote: >> >> The main reason we need a specfile for gcc rather than just -nostdinc >> and -nostdlib is that the latter does not suppress search of the >> default library paths, just the libraries, i.e. it removes the -l's >> but not the -L's. If you can find a way to remove the default -L's for >> clang then it should be easy. >> >> Rich > > Sadly, after looking at the clang driver source[1], there seems to be no > such option: it unconditionally adds the library paths. Unless there=E2= =80=99s > some way to influence ToolChain.getFilePaths(), it doesn=E2=80=99t seem l= ike it > can be done without modifying the clang source code. You can use clang with --sysroot, if everything is under the same root path= . In theory if clang had support you could just use -target or just rename the compiler and it would just compile for Musl, according to the docs http://clang.llvm.org/docs/CrossCompilation.html but I am guessing that needs some upstream support, would be nice to add. Justin