From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6249 Path: news.gmane.org!not-for-mail From: stephen Turner Newsgroups: gmane.linux.lib.musl.general Subject: Re: converting gcc from glibc to musl Date: Wed, 1 Oct 2014 16:34:05 -0400 Message-ID: References: <20141001161020.GO21835@port70.net> <542C4F58.70708@sholland.net> <542C579A.7090008@sholland.net> <542C615B.3050202@sholland.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01538cc4ca95f80504626b9a X-Trace: ger.gmane.org 1412195665 26016 80.91.229.3 (1 Oct 2014 20:34:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Oct 2014 20:34:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6262-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 01 22:34:20 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XZQbK-0003SE-4H for gllmg-musl@plane.gmane.org; Wed, 01 Oct 2014 22:34:18 +0200 Original-Received: (qmail 28522 invoked by uid 550); 1 Oct 2014 20:34:17 -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 28514 invoked from network); 1 Oct 2014 20:34:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=E2xbS4b63CJKx4I7IA9aurtPyWdVqdyt7J11XWgupKY=; b=nhuoCtevXC5H1ivsHiwnYD/lRAOhMq2zDAJRFkgSJJnH1ZLfA6BxD0kJCxQp0Zk9X5 8rdESytPJctLkK76pnPL3NzhLGhH8avM9cBeKvyg1c7UKSGTTHO8wh8P9vfTKc3ATneZ t1fWh4UNB0GDHzZztcxCVk01Sx/7Efrufw9iq95ikHNBxWihunV6/GeDqmnsB9k0SFD+ +b2X7mIBHBLGSpJrFoaV1QDgb/ndCgDwX0RUMyXwsTSAcR6xcFazrXyKnaVBC+zvdnc2 FH0lrs9Q8/5zIeWr8rVt0ydSQd7PjbRoOB9NF99mZYMbSeIq6jyRACYSSPdv/3NPZIm8 csFg== X-Received: by 10.220.194.67 with SMTP id dx3mr4130220vcb.55.1412195645295; Wed, 01 Oct 2014 13:34:05 -0700 (PDT) In-Reply-To: <542C615B.3050202@sholland.net> Xref: news.gmane.org gmane.linux.lib.musl.general:6249 Archived-At: --089e01538cc4ca95f80504626b9a Content-Type: text/plain; charset=UTF-8 Yea i had to patch gcc just to get it to compile which due to various issues i have only gotten to run on the target musl system when i use the musl wrapper to compile gcc. how would i go about fixing this linker issue? is it with binutils, gcc, or musl? I greatly appreciate all the help given, I would still be banging my head on the desk if it wasn't for your help. On Wed, Oct 1, 2014 at 4:17 PM, Samuel Holland wrote: > On 10/01/2014 02:44 PM, stephen Turner wrote: > >> That is incorrect i gave you a bad readout. (im using debian as a host >> system which is the gcc i provided) >> >> >> COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro' >> /bin/../libexec/gcc/i686-pc-linux-gnu/4.6.4/collect2 --eh-frame-hdr -m >> elf_i386 -dynamic-linker /lib/ld-linux.so.2 >> /bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../../crt1.o >> /bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../../crti.o >> /bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/crtbegin.o >> -L/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4 -L/bin/../lib/gcc >> -L/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../../../ >> i686-pc-linux-gnu/lib >> -L/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../.. /tmp/ccgPcLnb.o -lgcc >> -lc -lgcc /bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/crtend.o >> /bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../../crtn.o >> > > Okay, that makes more sense. Note that your 'dynamic-linker' is still set > to glibc's, but you are linking to /lib/libc.so (the last -L option), which > is the correct musl libc. Are you using the musl-cross gcc patch[0]? It > will solve that for you. > > [0] https://bitbucket.org/GregorR/musl-cross/src/default/ > patches/gcc-4.6.4-musl.diff > > > -- > Regards, > Samuel Holland > --089e01538cc4ca95f80504626b9a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yea i had to patch gcc just to get it to compile whic= h due to various issues i have only gotten to run on the target musl system= when i use the musl wrapper to compile gcc.

how w= ould i go about fixing this linker issue? is it with binutils, gcc, or musl= ?

I greatly appreciate all the help given, I would= still be banging my head on the desk if it wasn't for your help.
=


On Wed, Oct 1, 2014 at 4:17 PM, Samuel Holland <samuel@sholland.net<= /a>> wrote:
On= 10/01/2014 02:44 PM, stephen Turner wrote:
That is incorrect i gave you a bad readout. (im using debian as a host
system which is the gcc i provided)


COLLECT_GCC_OPTIONS=3D'-v' '-mtune=3Dgeneric' '-march= =3Dpentiumpro'
=C2=A0 /bin/../libexec/gcc/i686-pc-linux-gnu/4.6.4/collect2 --eh-fra= me-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2
/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../../crt1.o
/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../../crti.o
/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/crtbegin.o
-L/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4 -L/bin/../lib/gcc
-L/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../../../i686-pc= -linux-gnu/lib
-L/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../.. /tmp/ccgPcLnb.o -= lgcc
-lc -lgcc /bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/crtend.o
/bin/../lib/gcc/i686-pc-linux-gnu/4.6.4/../../../crtn.o

Okay, that makes more sense. Note that your 'dynamic-linker' is sti= ll set to glibc's, but you are linking to /lib/libc.so (the last -L opt= ion), which is the correct musl libc. Are you using the musl-cross gcc patc= h[0]? It will solve that for you.

[0] https://bitbucket.org/GregorR/musl-cross/src/default/patches/gcc-4.6.4-musl.diff


--
Regards,
Samuel Holland <samuel@sholland.net>

--089e01538cc4ca95f80504626b9a--