Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 14 Oct 2012 11:29:18 -0400
From: Rich Felker <>
Subject: Re: shared musl with PCC as system compiler

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 will be broken.
> Get a fairly recent pcc from CVS (the last month should be good enough)
> When compiling pcc-libs, use 
> (otherwise you get textrels in, 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


Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.