From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2101 Path: news.gmane.org!not-for-mail From: Luca Barbato Newsgroups: gmane.linux.lib.musl.general Subject: Re: shared musl with PCC as system compiler Date: Sun, 14 Oct 2012 15:38:36 +0200 Message-ID: <507AC05C.1060002@gentoo.org> References: <20121014001534.0ee7a5f0.idunham@lavabit.com> 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: 7bit X-Trace: ger.gmane.org 1350221920 14429 80.91.229.3 (14 Oct 2012 13:38:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2012 13:38:40 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2102-gllmg-musl=m.gmane.org@lists.openwall.com Sun Oct 14 15:38:48 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 1TNOP1-0001sg-RM for gllmg-musl@plane.gmane.org; Sun, 14 Oct 2012 15:38:47 +0200 Original-Received: (qmail 7859 invoked by uid 550); 14 Oct 2012 13:38: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 7848 invoked from network); 14 Oct 2012 13:38:39 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20121004 Thunderbird/15.0.1 In-Reply-To: <20121014001534.0ee7a5f0.idunham@lavabit.com> X-Enigmail-Version: 1.4.4 Xref: news.gmane.org gmane.linux.lib.musl.general:2101 Archived-At: On 10/14/2012 09:15 AM, Isaac Dunham wrote: > This is mainly a mix of what I've worked out previously and what Rich and I worked > out on IRC. I figured posting it on the list would help those who want to use pcc > as compiler... > 0. Get today's (Oct 13) git HEAD or later! Otherwise libc.so will be broken. > Get a fairly recent pcc from CVS (the last month should be good enough) > When compiling pcc-libs, use > make CFLAGS="-fPIC ${OPTFLAGS}" > (otherwise you get textrels in libc.so, which doesn't work) > 1. Set LIBCC to -L$(dirname `pcc -print-file-name=libpcc.a`) -lpcc > #-lpccsoftfloat may be needed for some systems > 2. Add > CFLAGS_ALL_SHARED += -D__PIC__=1 > to config.mak (pcc doesn't define this with -fPIC at present, which is a bug) > 3. Find the right -m* options: > ld -march=native > #look for the elf_* in the "Supported emulations" that matches your CPU > Change all occurences of -m* in config.mak to "-melf_" > (pcc doesn't parse -m*, which is at best an incompatible behavior) > 4. Now you should be set to compile. Do you have/know of a git mirror for pcc? lu