From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2103 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: shared musl with PCC as system compiler Date: Sun, 14 Oct 2012 13:36:04 -0700 Message-ID: <20121014133604.ab52b550.idunham@lavabit.com> References: <20121014001534.0ee7a5f0.idunham@lavabit.com> <507AC05C.1060002@gentoo.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1350246982 11651 80.91.229.3 (14 Oct 2012 20:36:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2012 20:36:22 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2104-gllmg-musl=m.gmane.org@lists.openwall.com Sun Oct 14 22:36:30 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 1TNUvB-0003AT-Fv for gllmg-musl@plane.gmane.org; Sun, 14 Oct 2012 22:36:25 +0200 Original-Received: (qmail 7533 invoked by uid 550); 14 Oct 2012 20:36:18 -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 7525 invoked from network); 14 Oct 2012 20:36:18 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=rpUamLVfScXa2vC61Gc56ziQcTdK/PjOFWGSPav4vNxXoI9+FZIgMQXedV6Nyn92ZhL5bfmXQOpZVO0zpJXulQdzopj5bH6jK5DzSAJNhKVCn5fkq31eKR5aBbB7psOYg0CNp1U9uCY0DLPMGiwnvQhEJ1Y7rSk9qFyCgTXg5TY=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <507AC05C.1060002@gentoo.org> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:2103 Archived-At: On Sun, 14 Oct 2012 15:38:36 +0200 Luca Barbato wrote: > 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 Or $(${CC} -print-file-name=libpcc.a), as Rich mentioned. > > 2. Add > > CFLAGS_ALL_SHARED += -D__PIC__=1 > > to config.mak (pcc doesn't define this with -fPIC at present, which is a bug) No longer necessary, with today's CVS (DATESTAMP=20121014). (Additionally, array arguments passed to inline asm _should_ properly decay to pointers now). > Do you have/know of a git mirror for pcc? Not until a few minutes ago. ;) See git://github.com/idunham/pcc and git://github.com/idunham/pcc-libs (they are not recommended for use unless you need to use git, as I may not keep them current all the time!) -- Isaac Dunham