Current-Users archive

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

Re: a separate build of libc



On Sat, Sep 20, 2014 at 10:04:30AM +0200, Alan Barrett wrote:
> >What would be the minimal initial data (source) to be able to recreate a
> >working NetBSD libc? I get the impression that the data is widely
> >scattered across different file trees and source sets, my goal is now to
> >identify the relevant subset of "the whole".
> 
> You would need at least the following:
> 
> * Tools, such as make, a compiler, assembler, linker, objcopy, sed, awk,
> sort, and several more.  You probably don't need yacc or lex.

This part is relatively straightforward to sort out.

> * Include files, as installed by "make install" in the NetBSD src tree.  Not
> all of them are used in the libc build, but there is no central list of
> what's needed by libc versus what's needed by some other part of NetBSD.

That's what I'd like to split. NetBSD is large and I prefer to handle things
piece by piece. Unix has historically put everything together which
makes this hard (sigh, for no good reason).

> * Source files used in the libc build, especially src/lib/libc/** and
> src/common/lib/libc/**, plus a few things from src/external/** and
> src/sys/external/** which can be identified by searching for "external" in
> all the makefiles under src/lib/libc, and perhaps more that I missed.

Thanks for the pointers.

I got also other helpful suggestions and I think I am on the right
track now.

On Sat, Sep 20, 2014 at 11:30:13AM +0200, Alan Barrett wrote:
> On Fri, 19 Sep 2014, u-6hol%aetey.se@localhost wrote:
> > Where does machine/asm.h come from, given the NetBSD source sets
> > as the starting point?

> That knowledge is embedded in various makefiles, including *.mk, Makefile,
> and Makefile.inc.  In this case, it's rather difficult to work out, by

That's where the forums like this one are invaluable.

> examining makfiles and build logs, that the KLINK_MACHINE variable and
> related rules in bsd.klink.mk are responsible for creating the
> DESTDIR/include/machine symlink, and that machine/asm.h comes from
> src/sys/arch/${KLINK_MACHINE}/asm.h.

Thanks Alan, this was the missing link I was looking for.

Thanks everyone who answered, this was very helpful!

Rune



Home | Main Index | Thread Index | Old Index