Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to build netbsd with pcc?



On Sat, 21 May 2011, Rhialto wrote:

> I saw a commit aimed at making compiler selection more general, so I
> thought I'd try to do a build with pcc. Naively, I set HAVE_PCC=yes in
> /etc/mk.conf, and MKPCC=yes and MKPCCCMDS=yes, as I saw on the NetBSD
> blog.

btw as of a couple of days ago, MKPCCCMDS=yes is no longer required

> Amazingly, that does go through some motions to build pcc
> instead of gcc, but then it stops very disappointingly here:

> x86_64--netbsd-install: x86_64--netbsd-cpp: stat: No such file or directory
>
> What am I missing? I removed my obj and destdirs but not the tooldir.

this looks like a nbmake issue that was fixed a while ago, what source
versions was this?

the problem was, IIRC, that using more than -j1 causes nbmake to execute
each sub-command in a separate shell, so things like "cd <dir> && cmd"
did't work because the cmd is run in the previous directory. parentheses
were added around the commands in NetBSD-current to execute the whole line
in a subshell, though the pcc Makefiles were changed recently and this
local modification should no longer be required.

regarding pcc, it is not able to build all of NetBSD sources as yet, and
the in-tree version is a year out of date so that will manage less.. (I am
planning to update it soon though, since I built and booted an i386 kernel
recently)

note also that there are still code-generation bugs to be found (I have
one reproducible that I need to pin down, and a few other issues that I
have ideas about reproducing but haven't had time lately) and I wouldn't
advise placing pcc generated binaries into production use unless you
tested them fully first..

regards,
iain


Home | Main Index | Thread Index | Old Index