From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13834 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: James Larrowe Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: [PATCH] Enable multilib support when building with musl-gcc Date: Thu, 21 Feb 2019 09:50:04 -0500 Message-ID: References: <20190130213815.19267-1-larrowe.semaj11@gmail.com> <20190221144456.GW21289@port70.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bb558c0582689727" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="114585"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com, James Larrowe Original-X-From: musl-return-13850-gllmg-musl=m.gmane.org@lists.openwall.com Thu Feb 21 15:50:36 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1gwpgK-000TYK-Eg for gllmg-musl@m.gmane.org; Thu, 21 Feb 2019 15:50:36 +0100 Original-Received: (qmail 5760 invoked by uid 550); 21 Feb 2019 14:50:29 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 5742 invoked from network); 21 Feb 2019 14:50:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=pJTjCfO/aovd+695f+Elv3XtlWrfXITDZ6xuBrgj/wA=; b=En7ZopjYgCa+dad45Em21XuCZwb/DJEnNFNjIx5zSpeJ7SggSuKEZf6E81YKy7BoYh e5dqaB/u4a5qrJmo32bHIYgbNOL3fT1fNn8kWugurd6DH9uwE5+4nxxYApvVqoshZ/Lj Gop5WUqPFypgOAU2Qzoxt4VbRju3LpJls+Lp56gcYpFzpP5TaxCwC8yuRdvSrl9fbPJ1 Mx6eUeN5PM4RbXu7s+G7TGXl2DXA8xXRXPJGZIHWQEad1iRWIBJQ9TPaxeevtsxZ+egp k99cIyGkfnVZmkIaEouWptLhXzoWrmC/Rn4VUWYRuVcadaup5GO2kE0tACqi7DOZvvlr nxAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=pJTjCfO/aovd+695f+Elv3XtlWrfXITDZ6xuBrgj/wA=; b=sMTkfnw3r72YMiaDldt4lNncVkVXbkvjv0to2lcnDzqkRi6sUM7PWro/oyIDBMRyfw ob9wKuTsByO76UlSq1pa8QYFBqIVkmGRtAAOw3Pt3coqX3Iv0GL2O2jnt57GdLHi+59x nJdXDXoE3bdslhddebRgER7jFJYxPLqku6fNMR2B3A950zT2B+rvkGvqsMlsbeZse3Yq lSCxo6nMnMw5GAcnBNONNA2lP/Sd0qb/5tyms/c/8x4CzO4qoR0dM43rTbyeKd25Y2vD 505w1AWkCf5DL+Cawz/9nYASkjD9MY8kfx3b7op9dqPzk73wak2gjtaCM9KmKnkomrXH tKmA== X-Gm-Message-State: AHQUAuYlM0M/Rg4XhqCoD60fuqzoblQWuVlRrueezuBVQd22eqPxcm75 4XVy7kHR60sAVJPumLqYxhV7J3CJXd5Jluk7bbvt7w== X-Google-Smtp-Source: AHgI3IbgERTQRLQgm91mFfuPKJRUrT7PkmXboUdyJoBK83tsTclUGjU1N3oFt1YJjR96asK1l5Lq/hR6eX8o40pP+UI= X-Received: by 2002:a05:6402:650:: with SMTP id u16mr12645606edx.148.1550760617397; Thu, 21 Feb 2019 06:50:17 -0800 (PST) In-Reply-To: <20190221144456.GW21289@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:13834 Archived-At: --000000000000bb558c0582689727 Content-Type: text/plain; charset="UTF-8" It was actually intended to fix building musl with "gcc -m32". If you run "CC='gcc -m32' ./configure && make && sudo make install" and try to run `musl-gcc`, it doesn't work and causes some "Incompatible architcture" errors. If there's any way I can make this better, please let me know and I'll resend the patch. On Thu, Feb 21, 2019 at 9:44 AM Szabolcs Nagy wrote: > * James Larrowe [2019-02-21 09:22:26 -0500]: > > Ping. Is there anything wrong with this? It works for me. > > it breaks all targets that musl supports except x86_64 > > a multilib toolchain does not have separate include paths > for different abis so even on x86_64, -m32 or -mx32 > would use the wrong headers. > > > On Wed, Jan 30, 2019 at 4:38 PM James Larrowe > > > wrote: > > > > > Somewhat incomplete; enables using 32-bit musl-gcc > > > on a 64-bit system > > > > > > Signed-off-by: James Larrowe > > > --- > > > tools/musl-gcc.specs.sh | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/tools/musl-gcc.specs.sh b/tools/musl-gcc.specs.sh > > > index 30492574..a73e6656 100644 > > > --- a/tools/musl-gcc.specs.sh > > > +++ b/tools/musl-gcc.specs.sh > > > @@ -23,7 +23,9 @@ libgcc.a%s %:if-exists(libgcc_eh.a%s) > > > crtendS.o%s $libdir/crtn.o > > > > > > *link: > > > --dynamic-linker $ldso -nostdlib %{shared:-shared} %{static:-static} > > > %{rdynamic:-export-dynamic} > > > +-dynamic-linker $ldso -nostdlib %{shared:-shared} %{static:-static} \ > > > + %{rdynamic:-export-dynamic} %{m64:-melf_x86_64} > %{mx32:-melf32_x86_64} \ > > > + %{m32:-melf_i386} > > > > > > *esp_link: > > > > > > -- > > > 2.20.1 > > > > > > > --000000000000bb558c0582689727 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It was actually intended to fix building musl with "g= cc -m32". If you run "CC=3D'gcc -m32' ./configure &&a= mp; make && sudo make install" and try to run `musl-gcc`, it d= oesn't work and causes some "Incompatible architcture" errors= . If there's any way I can make this better, please let me know and I&#= 39;ll resend the patch.

On Thu, Feb 21, 2019 at 9:44 AM Szabolcs Nagy <nsz@port70.net> wrote:
* James Larrowe <larrowe.semaj11@gma= il.com> [2019-02-21 09:22:26 -0500]:
> Ping. Is there anything wrong with this? It works for me.

it breaks all targets that musl supports except x86_64

a multilib toolchain does not have separate include paths
for different abis so even on x86_64, -m32 or -mx32
would use the wrong headers.

> On Wed, Jan 30, 2019 at 4:38 PM James Larrowe <larrowe.semaj11@gmail.com>= ;
> wrote:
>
> > Somewhat incomplete; enables using 32-bit musl-gcc
> > on a 64-bit system
> >
> > Signed-off-by: James Larrowe <larrowe.semaj11@gmail.com>
> > ---
> >=C2=A0 tools/musl-gcc.specs.sh | 4 +++-
> >=C2=A0 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/musl-gcc.specs.sh b/tools/musl-gcc.specs.sh<= /a>
> > index 30492574..a73e6656 100644
> > --- a/tools/
musl-gcc.specs.sh
> > +++ b/tools/musl-gcc.specs.sh
> > @@ -23,7 +23,9 @@ libgcc.a%s %:if-exists(libgcc_eh.a%s)
> >=C2=A0 crtendS.o%s $libdir/crtn.o
> >
> >=C2=A0 *link:
> > --dynamic-linker $ldso -nostdlib %{shared:-shared} %{static:-stat= ic}
> > %{rdynamic:-export-dynamic}
> > +-dynamic-linker $ldso -nostdlib %{shared:-shared} %{static:-stat= ic} \
> > + %{rdynamic:-export-dynamic} %{m64:-melf_x86_64} %{mx32:-melf32_= x86_64} \
> > + %{m32:-melf_i386}
> >
> >=C2=A0 *esp_link:
> >
> > --
> > 2.20.1
> >
> >
--000000000000bb558c0582689727--