Re: problem building sparse 0.6.0 (sparse-llvm)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 28/09/2019 02:44, Luc Van Oostenryck wrote:
> On Sat, Sep 28, 2019 at 02:27:40AM +0100, Ramsay Jones wrote:
>> On 28/09/2019 00:00, Luc Van Oostenryck wrote:
>>> On Fri, Sep 27, 2019 at 09:24:05PM +0100, Ramsay Jones wrote:
>>>> On 26/09/2019 21:33, Luc Van Oostenryck wrote:
>>>>> On Thu, Sep 26, 2019 at 07:50:27PM +0100, Ramsay Jones wrote:

[snip]

>>>> I noticed that you could override the target triple used by llc, so
>>>> decided to give it a try:
>>>>
>>>>
>>>> $ git diff
>>>> diff --git a/sparsec b/sparsec
>>>> index bafe2da..8a056e7 100755
>>>> --- a/sparsec
>>>> +++ b/sparsec
>>>> @@ -39,6 +39,7 @@ case "$(uname -s)" in
>>>>  *CYGWIN*)
>>>>         # cygwin uses the sjlj (setjmp-longjmp) exception model
>>>>         LLC_ARCH_OPTS="-exception-model=sjlj"
>>>> +       LLC_ARCH_OPTS="$LLC_ARCH_OPTS -mtriple=x86_64-unknown-windows-cygnus"
>>>>         ;;
>>>>  *)
>>>>         ;;
>>>> $ 
>>>>
>>>> This fixes the testsuite on cygwin! :-D
>>>
>>> Great!
>>>
>>>
>>> The defaut target triple is supposed to be determinated from the host triple
>>> but from what I've seen LLVM's config system seems to know only about
>>> x86_64-unknown-cygwin and nothing about *-*-windows-cygnus (config.guess).
>>> OTOH, the part related to code generation seems to only know about
>>> x86_64-unknown-windows-cygnus ...
>>>
>>> I suppose that `llvm-config --host-target` returns x86_64-unknown-cygwin ?
>>
>> Ah no, I had meant to mention this:
>>
>>   $ llvm-config --host-target
>>   x86_64-unknown-windows-cygnus
>>   $ 
>>
>> ... which agrees with clang, but not llc.
> 
> Then the patch could simply be something like:
> +       LLC_ARCH_OPTS="$LLC_ARCH_OPTS -mtriple=$(llvm-config --host-target)"
> 
> but I'm not sure how this would behave with cygwin32 or when using -m32.

Yeah, I don't know either. Unfortunately, my cygwin32 installation
is *very* old and on an Windows XP laptop that I would rather not
connect to the internet at this point ... (Also, I don't think cygwin
supports windows XP anyway, so ...)

Anyway, I think it is somewhat odd that clang and the llvm tools
don't agree on the host 'triple' used during configuration. ;-)

I would rather not, but I guess I may have to download the cygwin
source packages for clang/llvm and take a look at how the binary
packages are configured/built. I suppose this could be a problem
with the cygwin packaging, or with upstream - dunno! :(

Hmm, I will _hopefully_ find time to look at that soon, but I don't
think anyone needs a quick solution to this ... :-D

ATB,
Ramsay Jones




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux