Jeremy C. Reed | 3 Jun 2009 15:47

Re: Introduction

> > Are there any experiences in compiling ports? 
> 
> IIRC, Jeremy C. Reed was using PCC on pkgsrc. I haven't heard lately how
> that's going.

I haven't done much with it lately. I reported a few issues in pcc which I 
think have been solved now. My main hurdle was getting libtool to know 
pcc. I started working on libtool but never completed that.

For what it is worth, I added "PKGSRC_COMPILER=pcc" support for the pkgsrc 
compiler framework, so pkgsrc builds will use pcc for the C compiler.

  Jeremy C. Reed

echo 'EhZ[h ^jjf0%%h[[Zc[Z_W$d[j%Xeeai%ZW[ced#]dk#f[d]k_d%' | \
  tr            '#-~'            '\-.-{'

earlz | 3 Jun 2009 17:32
Gravatar

freestanding cross-compiler?

Hi, I am building an OS that I wish to keep capable of building with pcc. The problem is, I'm now into userland
where libraries and such can get confusing to manage without a freestanding cross-compiler.(A cross
compiler only targetted for a format and processor. Not an OS) 

I'm sure it's somehow possible with a workaround, or maybe I'm just missing something. but is it possible to
build a pcc cross compiler that won't try to link with any external libraries or headers and such? (I mean
without having to use the --nostdlib and such)

what I'm looking for really is a replacement for GCCs i586-elf target. I couldn't manage to find anything
close to that generic though with pcc.

Anders Magnusson | 13 Jun 2009 16:27
Picon

Re: freestanding cross-compiler?

earlz <at> earlz.biz.tm wrote:
> Hi, I am building an OS that I wish to keep capable of building with pcc. The problem is, I'm now into userland
where libraries and such can get confusing to manage without a freestanding cross-compiler.(A cross
compiler only targetted for a format and processor. Not an OS) 
> 
> I'm sure it's somehow possible with a workaround, or maybe I'm just missing something. but is it possible
to build a pcc cross compiler that won't try to link with any external libraries or headers and such? (I mean
without having to use the --nostdlib and such)
> 
> what I'm looking for really is a replacement for GCCs i586-elf target. I couldn't manage to find anything
close to that generic though with pcc.
> 
Hi,

noone has fixed so that it is possible to get a freestanding environment yet, but I don't think
it's especially difficult to do it.  Feel free to fix it :-)

-- Ragge

Michael.Rock | 17 Jun 2009 12:39
Picon
Picon

Little scripty


Hello *,

i tought i could share this with the lot of you. Maybe everybody has his own version already or has an even
better way to home in on where the "last change which could not do any harm"(tm) fscked up the code generation.

I usually then backup the working dir into a tar, put it in /tmp and extract it there again. Then, after
starting the script, i come back with fresh coffee/tea/... and check the logfile which source file suffered.

The process touches each source file in order and rebuilds then to stage 3. If the touched file is compiled
into bad code, stage 3 usually is not reached. This narrows the search down and presents a set of files
(hopefully not all) which need to be checked. Pick the one which is best for this, i suggest not to verify the
parser if other files are also flagged ;-)

Next step then is diff on the assembler produced for the file with and without the change. I used it to find the
ssa bug, that's why the -xssa is still in here. Use and enjoy.

Here goes the script, change the home as needed:

#!/usr/local/bin/bash
for name in `find pcc -name "*.c"` ; do {
    # clean the playfield
    echo "rollback"                       >> /tmp/logfile ;
    tar xf back.tar
    cd pcc ;
    # install known correct compiler
    make install;

    #touch one source file
    echo "==============================" >> /tmp/logfile ;
(Continue reading)


Gmane