<div dir="ltr"><div dir="ltr"></div>One more update. without changing any cmake files the following cmdline should work:<br>cmake ../llvm-project/libclc/ -DLLVM_CONFIG=/usr/local/llvm-git/bin/llvm-config -DCMAKE_LLAsm_FLAGS=-cl-no-stdinc -DCMAKE_CLC_FLAGS=-cl-no-stdinc<div><br></div><div>Jan<br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 10, 2021 at 1:20 AM Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu">jan.vesely@rutgers.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">hi,<div><br></div><div>sorry the option is actually -cl-no-stdinc. you can add it to 'target_compiler_options'.<br>I should have a patch ready soon(tm), but time is scarce.<br><br>Jan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 7, 2021 at 9:51 PM Dieter Nützel <<a href="mailto:Dieter@nuetzel-hh.de" target="_blank">Dieter@nuetzel-hh.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Jan,<br>
<br>
I very much appreciate your advice.<br>
Tried several places...<br>
...where to put it?<br>
<br>
Dieter<br>
<br>
Am 06.03.2021 17:56, schrieb Jan Vesely:<br>
> Not Marek, but hope this answer will help.<br>
> libclc uses clang CLC preprocessor on .ll files, llvm/clang-13 started<br>
> including clc declarations by default (clang<br>
> cf3ef15a6ec5e5b45c6c54e8fbe3769255e815ce),<br>
> thus corrupting any .ll assembly files that are used by libclc.<br>
> Inclusion of the default declarations can be turned off using a<br>
> cmdline switch but that remains to be implemented in the libclc build<br>
> system.<br>
> manually adding '-cl-no-stdinc' should work as a workaround.<br>
> <br>
> Jan<br>
> <br>
> On Thu, Mar 4, 2021 at 10:27 PM Dieter Nützel <<a href="mailto:Dieter@nuetzel-hh.de" target="_blank">Dieter@nuetzel-hh.de</a>><br>
> wrote:<br>
> <br>
>> Hello Marek,<br>
>> <br>
>> can't compile anything, here.<br>
>> Poor Intel Nehalem X3470.<br>
>> <br>
>> Trying LLVM 12-rc2 later.<br>
>> <br>
>> Greetings,<br>
>> Dieter<br>
>> <br>
>> llvm-project/libclc> cd build && cmake ../<br>
>> -- The CXX compiler identification is GNU 10.2.1<br>
>> -- Detecting CXX compiler ABI info<br>
>> -- Detecting CXX compiler ABI info - done<br>
>> -- Check for working CXX compiler: /usr/bin/c++ - skipped<br>
>> -- Detecting CXX compile features<br>
>> -- Detecting CXX compile features - done<br>
>> LLVM version: 13.0.0git<br>
>> LLVM system libs:<br>
>> LLVM libs: -lLLVM-13git<br>
>> LLVM libdir: /usr/local/lib<br>
>> LLVM bindir: /usr/local/bin<br>
>> LLVM ld flags: -L/usr/local/lib<br>
>> LLVM cxx flags:<br>
>> <br>
> -I/usr/local/include;-std=c++14;;;-fno-exceptions;-D_GNU_SOURCE;-D__STDC_CONSTANT_MACROS;-D__STDC_FORMAT_MACROS;-D__STDC_LIMIT_MACROS;-fno-rtti;-fno-exceptions<br>
>> <br>
>> clang: /usr/local/bin/clang<br>
>> llvm-as: /usr/local/bin/llvm-as<br>
>> llvm-link: /usr/local/bin/llvm-link<br>
>> opt: /usr/local/bin/opt<br>
>> llvm-spirv: /usr/local/bin/llvm-spirv<br>
>> <br>
>> -- Check for working CLC compiler: /usr/local/bin/clang<br>
>> -- Check for working CLC compiler: /usr/local/bin/clang -- works<br>
>> -- Check for working LLAsm compiler: /usr/local/bin/llvm-as<br>
>> -- Check for working LLAsm compiler: /usr/local/bin/llvm-as --<br>
>> broken<br>
>> CMake Error at cmake/CMakeTestLLAsmCompiler.cmake:40 (message):<br>
>> The LLAsm compiler "/usr/local/bin/llvm-as" is not able to<br>
>> compile a<br>
>> simple<br>
>> test program.<br>
>> <br>
>> It fails with the following output:<br>
>> <br>
>> Change Dir: /opt/llvm-project/libclc/build/CMakeFiles/CMakeTmp<br>
>> <br>
>> Run Build Command(s):/usr/bin/gmake cmTC_87af9/fast &&<br>
>> /usr/bin/gmake<br>
>> -f<br>
>> CMakeFiles/cmTC_87af9.dir/build.make<br>
>> CMakeFiles/cmTC_87af9.dir/build<br>
>> <br>
>> gmake[1]: Verzeichnis<br>
>> „/opt/llvm-project/libclc/build/CMakeFiles/CMakeTmp“ wird<br>
>> betreten<br>
>> <br>
>> Building LLAsm object<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc<br>
>> <br>
>> /usr/local/bin/clang -E -P -x cl<br>
>> <br>
>> <br>
> /opt/llvm-project/libclc/build/CMakeFiles/CMakeTmp/testLLAsmCompiler.ll<br>
>> <br>
>> -o<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc.temp<br>
>> <br>
>> /usr/local/bin/llvm-as -o<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc.temp<br>
>> <br>
>> /usr/local/bin/llvm-as:<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc.temp:1:1: error:<br>
>> expected<br>
>> top-level entity<br>
>> <br>
>> typedef unsigned char uchar;<br>
>> <br>
>> ^<br>
>> <br>
>> gmake[1]: *** [CMakeFiles/cmTC_87af9.dir/build.make:86:<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc] Fehler 1<br>
>> <br>
>> gmake[1]: Verzeichnis<br>
>> „/opt/llvm-project/libclc/build/CMakeFiles/CMakeTmp“ wird<br>
>> verlassen<br>
>> <br>
>> gmake: *** [Makefile:140: cmTC_87af9/fast] Fehler 2<br>
>> <br>
>> CMake will not be able to correctly generate this project.<br>
>> Call Stack (most recent call first):<br>
>> CMakeLists.txt:127 (enable_language)<br>
>> <br>
>> -- Configuring incomplete, errors occurred!<br>
>> See also<br>
>> "/opt/llvm-project/libclc/build/CMakeFiles/CMakeOutput.log".<br>
>> See also "/opt/llvm-project/libclc/build/CMakeFiles/CMakeError.log".<br>
>> <br>
>> CMakeError.log<br>
>> Determining if the LLAsm compiler works failed with the following<br>
>> output:<br>
>> Change Dir: /opt/llvm-project/libclc/build/CMakeFiles/CMakeTmp<br>
>> <br>
>> Run Build Command(s):/usr/bin/gmake cmTC_87af9/fast &&<br>
>> /usr/bin/gmake<br>
>> -f CMakeFiles/cmTC_87af9.dir/build.make<br>
>> CMakeFiles/cmTC_87af9.dir/build<br>
>> gmake[1]: Verzeichnis<br>
>> „/opt/llvm-project/libclc/build/CMakeFiles/CMakeTmp“ wird<br>
>> betreten<br>
>> Building LLAsm object CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc<br>
>> /usr/local/bin/clang -E -P     -x cl<br>
>> <br>
> /opt/llvm-project/libclc/build/CMakeFiles/CMakeTmp/testLLAsmCompiler.ll<br>
>> <br>
>> -o CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc.temp<br>
>> /usr/local/bin/llvm-as -o<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc.temp<br>
>> /usr/local/bin/llvm-as:<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc.temp:1:1: error:<br>
>> expected<br>
>> top-level entity<br>
>> typedef unsigned char uchar;<br>
>> ^<br>
>> gmake[1]: *** [CMakeFiles/cmTC_87af9.dir/build.make:86:<br>
>> CMakeFiles/cmTC_87af9.dir/testLLAsmCompiler.bc] Fehler 1<br>
>> gmake[1]: Verzeichnis<br>
>> „/opt/llvm-project/libclc/build/CMakeFiles/CMakeTmp“ wird<br>
>> verlassen<br>
>> gmake: *** [Makefile:140: cmTC_87af9/fast] Fehler 2<br>
>> _______________________________________________<br>
>> dri-devel mailing list<br>
>> <a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
>> <a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</blockquote></div>
</blockquote></div></div></div>