From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7776 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Lucas_Sim=C3=B5es?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: Using Musl with LLVM/Clang Date: Wed, 27 May 2015 00:23:26 +0000 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: multipart/alternative; boundary=001a113a791c70bf8d0517054047 X-Trace: ger.gmane.org 1432686225 6838 80.91.229.3 (27 May 2015 00:23:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 May 2015 00:23:45 +0000 (UTC) Cc: Paulo Castro To: Justin Cormack , musl@lists.openwall.com Original-X-From: musl-return-7788-gllmg-musl=m.gmane.org@lists.openwall.com Wed May 27 02:23:44 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 1YxP8H-0006N0-7p for gllmg-musl@m.gmane.org; Wed, 27 May 2015 02:23:41 +0200 Original-Received: (qmail 11965 invoked by uid 550); 27 May 2015 00:23:39 -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 11940 invoked from network); 27 May 2015 00:23:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=AQTQBXqfHafFq9H9YV5bP6HguYCMV1xiTsfMkwECNcM=; b=KG/hOakRUdznvYlmdw+qepznrFy79ntnqvG4XPeQkYnZ59iKmtdchpuigf/tJWPOxy UJHT30pWmcZnXQessQsZ9gxiF6HUNv21nXH4kqKUOC5o1IvnT9lk/l6Bg6lLrTnB/gBv Bj3RCWbMfPP2YCl+cNQMsAkS4j4LhIV3LsSmqcjkgFhiAI46MmPTWI08iuReJNUyuk7Q Glr3jc8gczyf1WWhLX1/MfJWEHkBg1o2jZl4ysQT5Lgis8CIWGPYXp9T86gBUINu9fsc ePqlv56ga45WwuSvKZX9p5ul06iwBU79oJrZFrs7rQ+oSHTXt4aog5R2VwzKtQrrFah5 pxrw== X-Received: by 10.170.99.135 with SMTP id q129mr30032939yka.2.1432686206957; Tue, 26 May 2015 17:23:26 -0700 (PDT) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:7776 Archived-At: --001a113a791c70bf8d0517054047 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you for the quick response guys! That's really sad, I was truly hoping to find a way to use musl out of the box with Clang (on my Arch) Guess I'll just have to check the toolchains on this ELLCC project Em ter, 26 de mai de 2015 =C3=A0s 04:48, Justin Cormack < justin@specialbusservice.com> escreveu: > 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 n= o > > 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= like 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 > --001a113a791c70bf8d0517054047 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you for the quick response guys!
That's reall= y sad, I was truly hoping to find a way to use musl out of the box with Cla= ng (on my Arch)
Guess I'll just have to check the toolchains on thi= s ELLCC project

= Em ter, 26 de mai de 2015 =C3=A0s 04:48, Justin Cormack <justin@specialbusservice.com> escre= veu:
On 26 May 2015 at 02:53, Shiz = <hi@shiz.me> wrot= e:
>> On 26 May 2015, at 03:37, Rich Felker <dalias@libc.org> wrote:
>>
>> The main reason we need a specfile for gcc rather than just -nostd= inc
>> and -nostdlib is that the latter does not suppress search of the >> default library paths, just the libraries, i.e. it removes the -l&= #39;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 see= m like 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<= br> guessing that needs some upstream support, would be nice to add.

Justin
--001a113a791c70bf8d0517054047--