[klibc] [PATCH] kbuild: add -ffreestanding to required flags
morbo at google.com
Wed Jun 6 11:50:42 PDT 2018
They way to indicate to clang that those calls shouldn't be lowered to
their unlocked versions is to mark it as freestanding. Freestanding simply
means that the standard C library can't be assumed to be available,
which in this case it's not because you're creating the C library. So
I'm not sure what other solution you wish to see here (apart from
implementing the unlocked versions in klibc, which I don't think you
Could you explain why this is wrong for GCC?
On Wed, Jun 6, 2018 at 4:35 AM Thorsten Glaser <tg at mirbsd.de> wrote:
> Bill Wendling dixit:
> >New clang versions need the '-ffreestanding' flag because new changes
> >convert system calls to their unlocked versions, which don't exist in
> >the kernel library.
> This is probably wrong, a libc is not, in contrast to a bootloader
> or kernel, a freestanding environment.
> For the case of GCC, -ffreestanding is definitely wrong.
> Please look for another solution, e.g. teach clang that klibc
> does not have those unlocked calls. (AIUI klibc only supports
> GCC officially anyway…)
> “It is inappropriate to require that a time represented as
> seconds since the Epoch precisely represent the number of
> seconds between the referenced time and the Epoch.”
> -- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the klibc