From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/829 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: gcc segfault at src/mman/mlockall.c Date: Thu, 17 May 2012 00:04:57 +0200 Message-ID: <20120516220457.GU17860@port70.net> References: <20120515093553.18c90a66@newbook> <20120515094236.53718e47@newbook> <20120515192104.GQ17860@port70.net> <20120515193053.GR17860@port70.net> <20120516115341.27f0c77b@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1337205912 6297 80.91.229.3 (16 May 2012 22:05:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 16 May 2012 22:05:12 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-830-gllmg-musl=m.gmane.org@lists.openwall.com Thu May 17 00:05:12 2012 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 1SUmLG-0004km-5G for gllmg-musl@plane.gmane.org; Thu, 17 May 2012 00:05:10 +0200 Original-Received: (qmail 32069 invoked by uid 550); 16 May 2012 22:05:09 -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 32061 invoked from network); 16 May 2012 22:05:09 -0000 Content-Disposition: inline In-Reply-To: <20120516115341.27f0c77b@newbook> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:829 Archived-At: * Isaac Dunham [2012-05-16 11:53:41 -0700]: > On Tue, 15 May 2012 21:30:53 +0200 > > i could try it meanwhile, it works but --version does not :) > > so you can use > > CC='musl-gcc -V 4.1' > same situation here > but when you just told it the version to use, why ask? just to see if -V really worked :) > By the way, would you have pointers on using pcc with musl? > Is it possible to use it as a glibc -> musl cross-compiler ? > ..seems that the official "cross-compiler" method might work for > that...if binutils doesn't pose a problem. i'm not sure what is a glibc->musl cross-compiler i used something like the following to compile with pcc using musl libc MUSL=/path/to/musl PCC=`pcc -v foobar.o 2>&1 |sed -n 's,.* \([^ ]*\)/lib/crtbegin.o.*,\1,p'` x.o: x.c pcc $(CFLAGS) -nostdinc -isystem $(MUSL)/include -isystem $(PCC)/include -c -o $@ $< x-static1: x.o ld -X -d -e _start -Bstatic -o $@ $< $(LDFLAGS) $(MUSL)/lib/crti.o $(MUSL)/lib/crt1.o \ $(PCC)/lib/crtbegin.o $(PCC)/lib/crtend.o $(MUSL)/lib/crtn.o -L$(MUSL)/lib -lc -L$(PCC)/lib -lpcc x-static2: x.o pcc -static -nostdlib -o $@ $< $(LDFLAGS) $(MUSL)/lib/crti.o $(MUSL)/lib/crt1.o \ $(PCC)/lib/crtbegin.o $(PCC)/lib/crtend.o $(MUSL)/lib/crtn.o -L$(MUSL)/lib -lc -L$(PCC)/lib -lpcc x-dynamic1: x.o ld -X -d -e _start -dynamic-linker /lib/ld-musl-i386.so.1 -o $@ $< $(LDFLAGS) $(MUSL)/lib/crti.o $(MUSL)/lib/crt1.o \ $(PCC)/lib/crtbegin.o $(PCC)/lib/crtend.o $(MUSL)/lib/crtn.o -L$(MUSL)/lib -lc -L$(PCC)/lib -lpcc x-dynamic2: x.o pcc -nostdlib -Wl,-dynamic-linker,/lib/ld-musl-i386.so.1 -o $@ $< $(LDFLAGS) $(MUSL)/lib/crti.o $(MUSL)/lib/crt1.o \ $(PCC)/lib/crtbegin.o $(PCC)/lib/crtend.o $(MUSL)/lib/crtn.o -L$(MUSL)/lib -lc -L$(PCC)/lib -lpcc if you want to compile musl itself with pcc iirc you only have to change -lgcc into -lpcc in the Makefile