Hi,
I’ve a question regarding commit c2bb4658f (configure: Fix build when clang is installed to a non-standard prefix).
I wonder if the change made in this commit is actually correct. My setup is as follows:
-
The default compiler on my system is a clang/llvm 3.2 compiler
-
I want to build libclc for a clang/llvm 3.3 compiler (which I built from source)
-
The clang/llvm 3.3 compiler cannot use the default C++ library on my system (using it results in compile errors due to incompatibilities in the header files)
The change causes prepare-builtins to be built with the same compiler that libclc is being built for (by pointing to the correct llvm-config). However, now prepare-builtins doesn’t build any longer, because the clang/llvm 3.3 compiler does not have access to a functioning C++ library. Hence, it seems that prepare-builtins should be built using the same compiler used to build clang/llvm 3.3 and not the clang/llvm 3.3 compiler, or am I mistaken?
Thanks,
Jeroen
You should be able to build prepare-builtins with any compiler even gcc.
Your problem seems to me more like a configuration issue on your system
rather than a bug in the libclc configure script, but then again I don't
quite understand what problem you are having with clang.
-Tom
After the commit mentioned above configure forces prepare-builtins to be build with the same clang that libclc is being built for. This clang(++) is incomplete on my system in as much that it doesn't have access to a C++ library. So, I would like to use the default C++ compiler on my system to build, which is was doing automatically before this commit (by accident you may argue I hope this clarifies things?
Not sure what the solution here would be, I could add a flag to configure that overrides which C++ compiler is used to build prepare-builtins? Plus it should maybe pick the default C++ compiler as the default compiler to build prepare-builtins?
Regards,
Jeroen
>>
>> Hi,
>>
>> I've a question regarding commit c2bb4658f (configure: Fix build when clang is installed to a non-standard prefix).
>>
>> I wonder if the change made in this commit is actually correct. My setup is as follows:
>>
>> * The default compiler on my system is a clang/llvm 3.2 compiler
>>
>> * I want to build libclc for a clang/llvm 3.3 compiler (which I built from source)
>>
>> * The clang/llvm 3.3 compiler cannot use the default C++ library on my system (using it results in compile errors due to incompatibilities in the header files)
>>
>> The change causes prepare-builtins to be built with the same compiler that libclc is being built for (by pointing to the correct llvm-config). However, now prepare-builtins doesn't build any longer, because the clang/llvm 3.3 compiler does not have access to a functioning C++ library. Hence, it seems that prepare-builtins should be built using the same compiler used to build clang/llvm 3.3 and not the clang/llvm 3.3 compiler, or am I mistaken?
>>
>
> You should be able to build prepare-builtins with any compiler even gcc.
> Your problem seems to me more like a configuration issue on your system
> rather than a bug in the libclc configure script, but then again I don't
> quite understand what problem you are having with clang.
After the commit mentioned above configure forces prepare-builtins to be build with the same clang that libclc is being built for. This clang(++) is incomplete on my system in as much that it doesn't have access to a C++ library. So, I would like to use the default C++ compiler on my system to build, which is was doing automatically before this commit (by accident you may argue I hope this clarifies things?
I think I get it, so basically your version of clang can compile cl but
not c++.
Not sure what the solution here would be, I could add a flag to configure that overrides which C++ compiler is used to build prepare-builtins? Plus it should maybe pick the default C++ compiler as the default compiler to build prepare-builtins?
I think adding a configure flag for this is the best solution.
-Tom
<snip>
I think I get it, so basically your version of clang can compile cl but
not c++.
Correct.
Not sure what the solution here would be, I could add a flag to configure that overrides which C++ compiler is used to build prepare-builtins? Plus it should maybe pick the default C++ compiler as the default compiler to build prepare-builtins?
I think adding a configure flag for this is the best solution.
Patch in a separate email.
Thanks,
Jeroen