Sylvestre Ledru, le dim. 04 nov. 2018 14:38:16 +0100, a ecrit:
> Le 04/11/2018 à 14:32, Samuel Thibault a écrit :
> > Samuel Thibault, le dim. 04 nov. 2018 14:30:22 +0100, a ecrit:
> >> I'm actually wondering what is supposed to make clang++ take the
> >> -DLIBCXXABI_LIBCXX_INCLUDES=/mnt/compil/llvm-toolchain-7-7/libcxx/include
> > I tried to make this an environment variable that clang++ could take,
> > but still:
> 
> I dont' think this is a compiler variable.
> 
> Just try with -I/mnt/compil/llvm-toolchain-7-7/libcxx/include
> 
> and it should be fine.

clang version 7.0.0-8 (tags/RELEASE_700/final)
Target: i686-unknown--gnu0.9
Thread model: posix
InstalledDir: /mnt/compil/llvm-toolchain-7-7/build-llvm/bin
 "/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++" -cc1 -triple 
i686-unknown--gnu0.9 -emit-obj -disable-free -disable-llvm-verifier 
-discard-value-names -main-file-name src.cxx -mrelocation-model static 
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose 
-mconstructor-aliases -target-cpu pentium4 -dwarf-column-info 
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -v 
-coverage-notes-file 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/cmTC_b2902.dir/src.cxx.gcno
 -resource-dir /mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0 -D 
_FORTIFY_SOURCE=2 -D LLVM_NO_OLD_LIBSTDCXX -I 
/mnt/compil/llvm-toolchain-7-7/libcxx/include -internal-isystem 
/usr/include/clang/7.0.0/include/ -O2 -Wformat -Werror=format-security 
-Wdate-time -std=c++0x -fdeprecated-macro -fdebug-compilation-dir 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build 
-fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. -ferror-limit 19 
-fmessage-length 80 -stack-protector 2 -fobjc-runtime=gcc -fcxx-exceptions 
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops 
-vectorize-slp -o CMakeFiles/cmTC_b2902.dir/src.cxx.o -x c++ 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx 
-faddrsig
clang -cc1 version 7.0.0 based upon LLVM 7.0.0 default target 
i686-unknown-gnu0.9
ignoring nonexistent directory "/usr/include/clang/7.0.0/include/"
#include "..." search starts here:
#include <...> search starts here:
 /mnt/compil/llvm-toolchain-7-7/libcxx/include
 /usr/local/include
 /mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include
 /usr/include
End of search list.
In file included from 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx:1:
In file included from /mnt/compil/llvm-toolchain-7-7/libcxx/include/atomic:543:
/mnt/compil/llvm-toolchain-7-7/libcxx/include/__config:67:4: error: Unknown
      object file format
#  error Unknown object file format
   ^
/mnt/compil/llvm-toolchain-7-7/libcxx/include/__config:1121:6: error: 
      "No thread API"
#    error "No thread API"
     ^
In file included from 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx:1:
In file included from /mnt/compil/llvm-toolchain-7-7/libcxx/include/atomic:545:
In file included from /mnt/compil/llvm-toolchain-7-7/libcxx/include/cstdint:145:
In file included from 
/mnt/compil/llvm-toolchain-7-7/libcxx/include/stdint.h:119:
In file included from 
/mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include/stdint.h:61:
/usr/include/stdint.h:26:10: fatal error: 'bits/libc-header-start.h' file not
      found
#include <bits/libc-header-start.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.

> It is missing from the search path. I guess this is a cmake check which
> is limited to Linux

Ah, libcxx is new in llvm-toolchain-7, I now understand why all these
new issues compared to -6.0 :)

I have trivially fixed the thread part in my tree.

For the file format part, it seems that clang 6.0 itself doesn't define
__ELF__ either, and not even __GNU__, which will be more than
problematic :) It seems these should be defined in
./clang/lib/Basic/Targets/OSTargets.h, I'll have a look.

Also, it's missing -I/usr/include/$(DEB_HOST_MULTIARCH), that's also
problematic. I guess we need to define

clang/lib/Driver/ToolChains/Hurd.{cpp,h}

Samuel

Reply via email to