summaryrefslogtreecommitdiff
blob: 944ccaf4fa205cc4a8fca197762ce88d45fa52dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
http://llvm.org/bugs/show_bug.cgi?id=8339
https://bugs.gentoo.org/show_bug.cgi?id=395013
http://llvm.org/viewvc/llvm-project?view=rev&revision=151612

Tweak version detection bit to cope with Gentoo's slightly different
output for ld -v.

--- autoconf/m4/link_options.m4
+++ autoconf/m4/link_options.m4
@@ -10,7 +10,7 @@
 
    # Check for ld64.
    if (echo "$version_string" | grep -q "ld64"); then
-     llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#")
+     llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\?#\1#")
    else
      llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#")
    fi
--- configure
+++ configure
@@ -7528,7 +7528,7 @@
 
    # Check for ld64.
    if (echo "$version_string" | grep -q "ld64"); then
-     llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)#\1#")
+     llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\?#\1#")
    else
      llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#")
    fi