|
List Info
Thread: local-host tools used during NetBSD xcompilation
|
|
| local-host tools used during NetBSD
xcompilation |
  United States |
2007-12-26 04:50:53 |
Right now, there are a fair amount of host-locale binaries
built and run
during the NetBSD build process - e.g. a bunch of bits in
games/,
sys/arch/i386/stand/genprom, etc. Right now, there seem to
be no
flags, no defines, or anything other than "cc -O -c
-o".
The recent __attribute(foo) -> __foo changes have
repeatedly broken
xcompilation a fair bit - but even compiling on a native
system, I'm
kinda leery of blindly invoking cc and hoping everything
works.
I'd like to see something akin to pkgsrc's buildwrappers to
whinge
and complain if the non-USE_TOOLS compiler is used during
the build
- but at this point, I'd be happy with the .lo and/or
bsd.hostprog.mk
related stuff emit some extra defines. Unfortunately, I have
no idea
where all that sort of thing lives in the bowels of mk/ -
any of
y'all have insight?
|
|
| Re: local-host tools used during NetBSD
xcompilation |
  United States |
2007-12-26 09:36:16 |
Tom Spindler <dogcow babymeat.com> writes:
> Right now, there are a fair amount of host-locale
binaries built and run
> during the NetBSD build process - e.g. a bunch of bits
in games/,
> sys/arch/i386/stand/genprom, etc. Right now, there seem
to be no
> flags, no defines, or anything other than "cc -O
-c -o".
At the very least, we should be specifically marking
anything that
gets used as a tool. Is there a definitive list of things
that are
used as tools but which are not yet treated as tools?
--
Perry E. Metzger perry piermont.com
|
|
| Re: local-host tools used during NetBSD
xcompilation |
  South Africa |
2007-12-26 12:00:54 |
On Wed, 26 Dec 2007, Tom Spindler wrote:
> Right now, there are a fair amount of host-locale
binaries built and run
> during the NetBSD build process - e.g. a bunch of bits
in games/,
> sys/arch/i386/stand/genprom, etc. Right now, there seem
to be no
> flags, no defines, or anything other than "cc -O
-c -o".
They should, at the very least, be using $ and
$,
not assuming "cc" and "-O". Are you
sure they don't do that?
I think we should work towards treating them all as tools.
> I'd like to see something akin to pkgsrc's
buildwrappers to whinge
> and complain if the non-USE_TOOLS compiler is used
during the build
Even without that sort of wrapper framework, some
imaginative
use "grep cc | grep -v WHATEVERFLAGS" could
probably find evidence in the
build log.
> - but at this point, I'd be happy with the .lo and/or
bsd.hostprog.mk
> related stuff emit some extra defines. Unfortunately, I
have no idea
> where all that sort of thing lives in the bowels of mk/
- any of
> y'all have insight?
HOST_CC and HOST_CFLAGS (and several related variables) are
defined in
bsd.sys.mk, or can be overridden in /etc/mk.conf.
--apb (Alan Barrett)
|
|
| Re: local-host tools used during NetBSD
xcompilation |
  United States |
2007-12-27 01:55:26 |
> > Right now, there are a fair amount of host-locale
binaries built and run
> > during the NetBSD build process - e.g. a bunch of
bits in games/,
> > sys/arch/i386/stand/genprom, etc. Right now, there
seem to be no
> > flags, no defines, or anything other than "cc
-O -c -o".
>
> They should, at the very least, be using $ and
$,
> not assuming "cc" and "-O". Are
you sure they don't do that?
For src/sys/arch/i386/stand/genprom, here's the contents of
Makefile:
HOSTPROG= genprom
NOMAN= # defined
.include <bsd.hostprog.mk>
That's all. Even more amusing is src/games/phantasia's
Makefile - which
has uses $ and ${HOST_LINK.c} - but relies
on the implicit
rules for .lo set up... somewhere.
|
|
| Re: local-host tools used during NetBSD
xcompilation |
  South Africa |
2007-12-27 06:43:24 |
On Wed, 26 Dec 2007, Tom Spindler wrote:
> > They should, at the very least, be using
$ and $,
> > not assuming "cc" and "-O".
Are you sure they don't do that?
>
> For src/sys/arch/i386/stand/genprom, here's the
contents of Makefile:
> HOSTPROG= genprom
> NOMAN= # defined
> .include <bsd.hostprog.mk>
OK. I am pretty sure that will use $.
I'll try to figure out a proper fix eventually. Even if it
doesn't
involve building these things from src/tools/foo, it should
at least
involve #include "nbtool_config.h".
In the mean time, I suppose it's OK if you continue removing
__dead and
similar markers as you find that they cause trouble for you.
Once we
have this all fixed properly, we can go back and reinstate
the stuff you
had to remove.
--apb (Alan Barrett)
|
|
| Re: local-host tools used during NetBSD
xcompilation |
  United States |
2007-12-27 06:59:56 |
> In the mean time, I suppose it's OK if you continue
removing __dead and
> similar markers as you find that they cause trouble for
you. Once we
> have this all fixed properly, we can go back and
reinstate the stuff you
> had to remove.
For your possible amusement, a quick (manually filtered)
grep of '^cc'
from my build logs:
cc -o make-print-version make-print-version.lo
(I think this is the one from src/lib/libvers)
/bin/sh ../libtool --tag=CC --mode=link cc -O -o file
file.o libmagic.la -lz
cc -O -o file file.o ./.libs/libmagic.a -lz
cc -O -c -o setup.lo.o
/home/dogcow/work/nbsrc/games/adventure/setup.c
cc -O -o setup setup.lo
(both from games/adventure/)
cc -O
-I/home/dogcow/work/nbsrc/games/boggle/mkdict/../boggle -c
-o mkdict.lo.o
/home/dogcow/work/nbsrc/games/boggle/mkdict/mkdict.c
cc -O
-I/home/dogcow/work/nbsrc/games/boggle/mkdict/../boggle -o
mkdict mkdict.lo
cc -O
-I/home/dogcow/work/nbsrc/games/boggle/mkindex/../boggle -c
-o mkindex.lo.o
/home/dogcow/work/nbsrc/games/boggle/mkindex/mkindex.c
cc -O
-I/home/dogcow/work/nbsrc/games/boggle/mkindex/../boggle
-o mkindex mkindex.lo
(boggle)
cc -O -c -o strfile.lo.o
/home/dogcow/work/nbsrc/games/fortune/strfile/strfile.c
cc -O -o strfile strfile.lo
(fortune)
cc -O -c -o makedefs.lo.o
/home/dogcow/work/nbsrc/games/hack/makedefs.c
cc -O -o makedefs makedefs.lo
(hack)
cc -O -c -o initdeck.lo.o
/home/dogcow/work/nbsrc/games/monop/initdeck.c
cc -O -o initdeck initdeck.lo
(monop, which has other horrid sins, too.)
cc -O -I/home/dogcow/work/nbsrc/games/phantasia -c -o
setup.lo.o
/home/dogcow/work/nbsrc/games/phantasia/setup.c
cc -O -I/home/dogcow/work/nbsrc/games/phantasia -c -o
host_phantglobs.lo.o host_phantglobs.c
cc -O -I/home/dogcow/work/nbsrc/games/phantasia -o setup
host_phantglobs.lo setup.lo -lm
(phantasia)
cc -O -c -o dump.lo.o
/home/dogcow/work/nbsrc/usr.bin/vi/catalog/dump.c
cc -O -o dump dump.lo
(vi, heh.)
cc -O -c -o genprom.lo.o
/home/dogcow/work/nbsrc/sys/arch/i386/stand/genprom/genprom.
c
cc -O -o genprom genprom.lo
(genprom)
|
|
| Re: local-host tools used during NetBSD
xcompilation |
  United Kingdom |
2007-12-29 13:17:45 |
On Wed, Dec 26, 2007 at 02:50:53AM -0800, Tom Spindler
wrote:
> I'd like to see something akin to pkgsrc's
buildwrappers to whinge
> and complain if the non-USE_TOOLS compiler is used
during the build
> - but at this point, I'd be happy with the .lo and/or
bsd.hostprog.mk
> related stuff emit some extra defines. Unfortunately, I
have no idea
> where all that sort of thing lives in the bowels of mk/
- any of
> y'all have insight?
Actually some of these builds might be completely broken -
since they
may be trying to do tests to determine the nature of the
target system!
(eg signedness of 'char')
This can't work for cross builds.
Anything else can usually be rewritten in sh/awk/sed.
David
--
David Laight: david l8s.co.uk
|
|
[1-7]
|
|