[Libclc-dev] [PATCH] Fix for llvm-config's new --system-libs
Mike Lothian
mike at fireburn.co.uk
Mon Dec 23 13:55:00 PST 2013
Ah sorry - I've just joined the mailing list after tripping over this today
On 23 December 2013 21:52, Jeroen Ketema <j.ketema at imperial.ac.uk> wrote:
>
> Ah right,
>
> I mis-read your original post, I thought you were trying to simplify the
> patch Tom posted yesterday. So, see that patch for a slightly nicer way of
> doing this.
>
> Regards,
>
> Jeroen
>
> On Dec 23, 2013, at 10:45 PM, Mike Lothian <mike at fireburn.co.uk> wrote:
>
> Here's an added check - I'm not sure if this is the way you'd prefer to do
> this or if there's an easier way but it works for me
>
> --- a/configure.py 2013-12-23 21:41:35.585238480 +0000
> +++ b/configure.py 2013-12-23 21:42:25.579238656 +0000
> @@ -62,9 +62,12 @@
> print "Please ensure that llvm-config is in your $PATH, or use
> --with-llvm-config."
> sys.exit(1)
>
> +llvm_version = llvm_config(['--version']).replace("svn","")
> llvm_bindir = llvm_config(['--bindir'])
> llvm_core_libs = llvm_config(['--libs', 'core', 'bitreader',
> 'bitwriter']) + ' ' + \
> llvm_config(['--ldflags'])
> +if llvm_version >= '3.5':
> + llvm_core_libs = llvm_core_libs + ' ' + llvm_config(['--system-libs'])
> llvm_cxxflags = llvm_config(['--cxxflags']) + ' -fno-exceptions -fno-rtti'
>
> llvm_clang = os.path.join(llvm_bindir, 'clang')
>
>
> On 23 December 2013 21:44, Jeroen Ketema <j.ketema at imperial.ac.uk> wrote:
>
>>
>> Hi Mike,
>>
>> Unfortunately this doesn't work with the current released version 3.3 and
>> the soon to be released 3.4; the llvm-config of those versions doesn't
>> support system-libs flag. Hence, the need for a check.
>>
>> Regards,
>>
>> Jeroen
>>
>> On Dec 23, 2013, at 10:16 PM, Mike Lothian <mike at fireburn.co.uk> wrote:
>>
>> > Hi
>> >
>> > I'm not sure if I need to check for version 3.5 first but this makes
>> libclc compile for me
>> >
>> > --- a/configure.py 2013-12-23 20:54:47.072228588 +0000
>> > +++ b/configure.py 2013-12-23 20:55:32.040228747 +0000
>> > @@ -64,7 +64,8 @@
>> >
>> > llvm_bindir = llvm_config(['--bindir'])
>> > llvm_core_libs = llvm_config(['--libs', 'core', 'bitreader',
>> 'bitwriter']) + ' ' + \
>> > - llvm_config(['--ldflags'])
>> > + llvm_config(['--ldflags']) + ' ' + \
>> > + llvm_config(['--system-libs'])
>> > llvm_cxxflags = llvm_config(['--cxxflags']) + ' -fno-exceptions
>> -fno-rtti'
>> >
>> > llvm_clang = os.path.join(llvm_bindir, 'clang')
>> >
>> > _______________________________________________
>> > Libclc-dev mailing list
>> > Libclc-dev at pcc.me.uk
>> > http://www.pcc.me.uk/cgi-bin/mailman/listinfo/libclc-dev
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20131223/92dcbbf3/attachment.html>
More information about the Libclc-dev
mailing list