> On Sep 16, 2016, at 2:27 PM, Mehdi Amini via llvm-dev <llvm-dev at
lists.llvm.org> wrote:
>
>>
>> On Sep 16, 2016, at 2:18 PM, Carsten Mattner <carstenmattner at
gmail.com> wrote:
>>
>> On Fri, Sep 16, 2016 at 10:54 PM, Mehdi Amini <mehdi.amini at
apple.com> wrote:
>>
>>> Can you look for the specific errors in the CMake log and error
files?
>>>
>>> CMake is very good at not presenting the real issue…
>>> Here it is trying to build very simple programs to check features
>>> availability. Like:
>>>
>>> #include <strings.h>
>>> int main() { ffs(0); return 0; }
>>
>> In CMakeError.log there are errors like:
>>
>> CheckIncludeFile.c:1:10: fatal error: 'malloc/malloc.h' file
not found
>> #include <malloc/malloc.h>
>>
>> ...
>>
>> CheckIncludeFile.c:1:10: fatal error: 'ndir.h' file not found
>> #include <ndir.h>
>>
>> ...
>>
>> CheckIncludeFile.c:1:10: fatal error: 'sys/ndir.h' file not
found
>> #include <sys/ndir.h>
>>
>> ...
>>
>> fatal error: 'intrin.h' file not found
>>
>> These seem like tests that are expected to fail.
>>
>> ...
>>
>> The interesting test
>>
>> int main() { __builtin_ffs(0); return 0; }
>>
>> fails like this:
>>
>> /usr/bin/ld[...]llvm/bin/../lib/LLVMgold.so:
>> cannot open shared object file: No such file[…]
>
>
> I assume that "/usr/bin/ld[...]llvm/bin” is the path where clang is
installed right?
> It seems that when you built the stage1 clang, it didn’t find Gold
installed, and then didn’t build the plugin.
> So you need to go back to the first build (not the ThinLTO one, the one
with the system compiler), and make sure that CMake finds gold.
You probably missed -DLLVM_BINUTILS_INCDIR.
See: http://llvm.org/docs/GoldPlugin.html
—
Mehdi
>
>
>>
>> I have two questions here:
>>
>> Is there anything I might have missed when configuring the gcc-built
>> llvm install for it to be incomplete in the linker department? I mean,
>> the system linker is used (not lld) and that via CC=clang is looking
>> for the gold linker plugin, which seems to be missing. Probably
>> something got lost in my transition from autoconf to cmake?
>>
>> Anything else to pass to cmake so that it, in addition to llvm-ar and
>> llvm-ranlib, also used lld? Or isn't that a requirement for
building
>> with ThinLTO?
>
> No requirement for lld.
>
>
> —
> Mehdi
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
<http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20160916/3067fd1a/attachment.html>