tech-toolchain archive

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

Re: PCC (pcc-libs/csu/netbsd/crtbegin.c) doesn't build in NetBSD-5



On Thu, 3 Jun 2010, Greg A. Woods wrote:

> At Wed, 19 May 2010 06:19:04 GMT, "Iain Hibbert" 
> <plunky%rya-online.net@localhost> wrote:
> Subject: Re: PCC (pcc-libs/csu/netbsd/crtbegin.c) doesn't build in NetBSD-5
> >
> > in netbsd-5 branch, I think not .. I fixed a few problems in
> > the 'netbsd native' build in -current though
>
> It seems to me then that this would be a bug that should be fixed in
> netbsd-5, one way or another, either by removing all hint of PCC from
> that branch, or at minimum tweaking it so that it will build and be of
> some use.

that would be nice but manpower does not seem to be available to mirror
development work onto a branch (I don't have a -5 system and moreover am
about to go offline for 3 months.. I don't know if anybody else wants to
work on that in the meantime)

> > In truth, you will be better served by checking out a later version of pcc
> > and using ./configure manually than attempting to use the one in tree as
> > much development has been done (not sure about the pkgsrc version I
> > haven't tried it). I have some plans to import a recent version soon, am
> > trying to fix one sticking point (but I'm away from home this week)
>
> I really just want to provide the in-tree version in my builds, not
> worry about pkgsrc or anything else.  What's in the native sources is
> what I expect to be able to at least make minimum use of.

I have imported the latest version to -current yesterday; if you checkout
the -current src/external/bsd/pcc directory and merge the following
changes (previously made) to the set lists

    src/distrib/sets/lists/base/mi -r1.858
    src/distrib/sets/lists/comp/mi -r1.1385
    src/distrib/sets/lists/comp/shl.mi -r1.103
    src/distrib/sets/lists/man/mi -r1.1187
    src/distrib/sets/lists/comp/mi -r1.1404

then defining the make variables MKPCC=yes and MKPCCCMDS=yes should enable
you to create a release or distribution build with pcc(1), pcpp(1) and
ccom(1) binaries for the target architecture.

The other way you can use pcc (I think that will work in -5 too) is to
define the make variable HAVE_PCC and build tools for your desired
host/target architectures. Unfortunately this has side effects in that it
causes HAVE_GCC to be undefined, so I would normally build pcc in a
separate step, eg

        <build.sh> tools
        <build.sh> -V HAVE_PCC= tools

and then you can build in a directory using the tools version

        make HAVE_PCC=
         <uses /usr/tools/bin/i486--netbsdelf-pcc>

or the native version

        make CC=pcc
         <uses /usr/bin/pcc>

but in the latter case you will sometimes find errors relating to CFLAGS
that are not right (in particular, -Wno-sign-compare is added for HAVE_GCC
and HAVE_PCC)

There have also been miscellaneous fixes applied to the NetBSD-current
source tree to correct GNUC dependencies that you might come across. If
you want to build parts of NetBSD-5 you will have to discover them..

Please be aware though that pcc is still in development (Ragge is hard at
work and this morning I recieved notifications that two more issues from
the bug tracker were fixed :) so you may find other problems. Please
consider to report them to the pcc-list or bugtracker, I found that Ragge
is very responsive when the problem can be reduced to show the issue
directly.

regards,
iain




Home | Main Index | Thread Index | Old Index