mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Luca Barbato <lu_zero@gentoo.org>
To: musl@lists.openwall.com
Subject: Re: shared musl with PCC as system compiler
Date: Sun, 14 Oct 2012 15:38:36 +0200	[thread overview]
Message-ID: <507AC05C.1060002@gentoo.org> (raw)
In-Reply-To: <20121014001534.0ee7a5f0.idunham@lavabit.com>

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_<arch>"
> (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


  reply	other threads:[~2012-10-14 13:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14  7:15 Isaac Dunham
2012-10-14 13:38 ` Luca Barbato [this message]
2012-10-14 20:36   ` Isaac Dunham
2012-10-14 15:29 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=507AC05C.1060002@gentoo.org \
    --to=lu_zero@gentoo.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).