[klibc] [PATCH v2 1/5] Kbuild: add support for clang builds
Thorsten Glaser
tg at debian.org
Sat Mar 28 17:00:54 PDT 2020
>> +ifeq ($(cc-name),clang)
>> +# clang can't find the compiler-specific header <stdarg.h> if -nostdinc
>> +# is specified so we have to omit it along with the -iwithprefix option.
>> +KLIBCCPPFLAGS :=
>> +else
>> +KLIBCCPPFLAGS := -nostdinc -iwithprefix include
>> +endif
Is this even a good idea? The -nostdinc is required so that the normal
system libc includes are not used. Omitting it will cause them to be
detected e.g. by autoconf-like machinery, and subsequent use may cause
trouble and/or failure.
I’d suggest to add -nostdinc together with whatever other options are
needed to the clang case; surely the “compiler-specific header” path
is discoverable?
bye,
//mirabilos
--
Solange man keine schmutzigen Tricks macht, und ich meine *wirklich*
schmutzige Tricks, wie bei einer doppelt verketteten Liste beide
Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz
hervorragend. -- Andreas Bogk über boehm-gc in d.a.s.r
More information about the klibc
mailing list