even i called cling with -mfloat-abi=hard, the warning is disappeared,
however, when i looked into “.I”
-extern-c-isystem
/include
-extern-c-isystem
/usr/include
still missed “/usr/include/arm-linux-gnueabihf”, which will result in some system header lookup failure.
how can i fix it?
I don’t see any -mfloat-abi= in clang’s output, so it’s using the default. Can you come up with a way to see whether clang-5 is using hard or soft FPU? I also don’t see an entry in the include search path.
i built cling/clang over a A72 on top of 32bits armhf rootfs, is it relevant?
cling (conceptually) gets the clang flags from the compilation CPP macros (see lib/Interpreter/CIFactory.cpp), so this should be okay as long as cling was compiled correctly.
ELF Header:
Magic: 7f 45 4c 46 01 01 01 03 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2’s complement, little endian
Version: 1 (current)
OS/ABI: UNIX - GNU
ABI Version: 0
Type: EXEC (Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x4163f5
Start of program headers: 52 (bytes into file)
Start of section headers: 68129148 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 10
Size of section headers: 40 (bytes)
Number of section headers: 31
Section header string table index: 30
" -internal-externc-isystem /include -internal-externc-isystem /usr/include", missing the “/usr/include/arm-linux-gnueabihf”,
so how clang get his? by cmake configuration?
btw, i found under obj,
./tools/cling/lib/Interpreter/cling-compiledata.h.in: #define CLING_CXX_INCL “/usr/include/c++/7:/usr/include/arm-linux-gnueabihf/c++/7:/usr/include/c++/7/backward”
./tools/cling/lib/Interpreter/cling-compiledata.h: #define CLING_CXX_INCL “/usr/include/c++/7:/usr/include/arm-linux-gnueabihf/c++/7:/usr/include/c++/7/backward”
so why clang/cling don’t have /usr/include/arm-linux-gnueabihf/ for -extern-c-isystem ?
clang gets the include path likely at runtime - but I would have expected to see it in the -v output. What does cling show when you enter .I (capital i) at the prompt?