[Mesa-dev] Potential fix for #70410

Submitted by Krzysztof A. Sobiecki on Feb. 4, 2014, 4:24 p.m.

Details

Message ID 8738jyhmlm.fsf@gmail.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Krzysztof A. Sobiecki Feb. 4, 2014, 4:24 p.m.
A small patch to work around a llvm-config-3.5 change, with a newline
hack.

Patch hide | download patch | download mbox

Signed-off-by: Krzysztof Sobiecki <sobkas <at> gmail.com>
Tested-by: Kai Wasserb├Ąch <kai@dev.carbon-project.org>
---

LLVM 3.5 added --system-libs to llvm-config, fix build failure.
Fixes #70410

diff --git a/configure.ac b/configure.ac
index ba158e8..c31d962 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1843,7 +1843,12 @@  dnl in LLVM_LIBS.
 
 if test "x$MESA_LLVM" != x0; then
 
-    LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`"
+    if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5 ; then
+        LLVM_LIBS="`$LLVM_CONFIG --system-libs --libs ${LLVM_COMPONENTS} |tr "\n" " "`"
+        dnl Because my llvm-config adds a new line...
+    else
+        LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`"
+    fi
 
     if test "x$with_llvm_shared_libs" = xyes; then
         dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,

Comments

On 02/04/2014 05:24 PM, Krzysztof A. Sobiecki wrote:
> A small patch to work around a llvm-config-3.5 change, with a newline
> hack.
> 
> 
> 
> 
> 
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 

This would be easier to fix in LLVM. The newline is rather unnecessary
in the output.
On Tue, Feb 4, 2014 at 10:28 AM, Armin K. <krejzi@email.com> wrote:
> On 02/04/2014 05:24 PM, Krzysztof A. Sobiecki wrote:
>> A small patch to work around a llvm-config-3.5 change, with a newline
>> hack.
>>
>
> This would be easier to fix in LLVM. The newline is rather unnecessary
> in the output.
>

I fully agree...  The patch that I sent to llvm-commits [1] went
completely ignored, and we'll probably need to get someone to provide
feedback.

[1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140106/201074.html

--Aaron
"Armin K." <krejzi@email.com> writes:
> This would be easier to fix in LLVM. The newline is rather unnecessary
> in the output.
I'm neither able or willing to hack LLVM, but
https://bugs.freedesktop.org/attachment.cgi?id=91751 looks nice?
Yup, that's the same exact patch that I sent to the LLVM list.  It's
been working just fine along with the mesa patch in:
https://bugs.freedesktop.org/attachment.cgi?id=91764

I've been using that on my own system for a while now.  It could
probably use more eyes/testing, but it seems ok from my usage.

--Aaron

On Tue, Feb 4, 2014 at 10:46 AM, Krzysztof A. Sobiecki <sobkas@gmail.com> wrote:
> "Armin K." <krejzi@email.com> writes:
>> This would be easier to fix in LLVM. The newline is rather unnecessary
>> in the output.
> I'm neither able or willing to hack LLVM, but
> https://bugs.freedesktop.org/attachment.cgi?id=91751 looks nice?
>
> --
> X was an interactive protocol:
> alpha blending a full-screen image looked like slugs racing down the monitor.
> http://www.keithp.com/~keithp/talks/usenix2000/render.html
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev