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

Re: GNU/kFreeBSD support in Jam


On Sat, 2010-02-13 at 13:54:02 +0100, jamego1293@andaluciajunta.es wrote:
> The system build types in jam are defined by checking the definition of
> "linux" and "__FreeBSD__":
> # ifdef __FreeBSD__
> # define OS_FREEBSD
> # endif
> ...
> # ifdef linux
> # define OSMINOR "OS=LINUX"
> # define OS_LINUX
> # endif
> I think someone would add an entry for GLIBC, but there are another Linux
> kernel based systems wich don't use GLIBC, so, What could be the best way to
> include GNU/kFreeBSD detection in these definitions?

Well it's unfortunate it's exporting those at all. And I'm not sure
how those are supposed to be used, so depending on that it might make
more sense to add __FreeBSD_kernel__ to the existing __FreeBSD__
stanza. Otherwise maybe add a new "OS=GNU/KFREEBSD" for example, as
glibc is not an actual OS.

> I, as a workaround (to build gargoyle-free) added this to jam.h, without
> deleting the Linux entry:
> # ifdef __GLIBC__
> # define OSMINOR "OS=GLIBC"
> # define OS_GLIBC
> # endif
> It isn't very clean, but it works fine for building gargoyle-free

In any case this might produce warnings on non GNU/kFreeBSD systems if
a system header is included before <jam.h> as OSMINOR will be defined


Reply to: