Re: Detecting kfreebsd kernel while compiling [hurd]
Joachim Wiedorn <firstname.lastname@example.org> writes:
> Joachim Wiedorn <email@example.com> wrote:
> But now I see it is not so easy to test it on other architectures. Does
> some now how gcc give the string for 'hurd-i386' architectures? I have
> thought it should be simple:
> But it seems not.
On GNU systems (i.e., GNU/Hurd, GNU/kFreeBSD, GNU/Linux, etc.), the
GNU C library defines ‘__GLIBC__’. GNU/Hurd (aka. GNU) additionally
Again, it’s probably the case that your application wants to know about
the OS (“GNU”) but doesn’t have to worry about the underlying kernel
(“kFreeBSD”, etc.) since it may not be able to tell the difference.