From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: shared musl with PCC as system compiler
Date: Sun, 14 Oct 2012 11:29:18 -0400 [thread overview]
Message-ID: <20121014152918.GL254@brightrain.aerifal.cx> (raw)
In-Reply-To: <20121014001534.0ee7a5f0.idunham@lavabit.com>
On Sun, Oct 14, 2012 at 12:15:34AM -0700, 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
I think just $(pcc -print-file-name=libpcc.a) would work.
> 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)
Step 3 is entirely unnecessary. No -m options are needed. The problem
is that pcc wrongly passes-thru -march as an option to the linker.
Just remove -march and -mtune from the CFLAGS and the problem goes
away.
Rich
prev parent reply other threads:[~2012-10-14 15:29 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
2012-10-14 20:36 ` Isaac Dunham
2012-10-14 15:29 ` Rich Felker [this message]
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=20121014152918.GL254@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--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).