Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Alex D
GHC
Commits
64aaaa19
Commit
64aaaa19
authored
Feb 10, 2013
by
dterei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find LLVM tools when version number at end (e.g., llc-3.0) (#7661)
parent
6571f4f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
aclocal.m4
aclocal.m4
+37
-0
configure.ac
configure.ac
+5
-2
No files found.
aclocal.m4
View file @
64aaaa19
...
...
@@ -1219,6 +1219,26 @@ AC_SUBST([FindCmd])[]dnl
])# FP_PROG_FIND
# FP_PROG_SORT
# ------------
# Find a Unix-like sort
AC_DEFUN([FP_PROG_SORT],
[AC_PATH_PROG([fp_prog_sort], [sort])
echo conwip > conftest.txt
$fp_prog_sort -f conftest.txt > conftest.out 2>&1
if grep 'conwip' conftest.out > /dev/null 2>&1 ; then
# The goods
SortCmd="$fp_prog_sort"
else
# Summink else..pick next one.
AC_MSG_WARN([$fp_prog_sort looks like a non-*nix sort, ignoring it])
FP_CHECK_PROG([SortCmd], [sort], [], [], [$fp_prog_sort])
fi
rm -f conftest.txt conftest.out
AC_SUBST([SortCmd])[]dnl
])# FP_PROG_SORT
dnl
dnl FPTOOLS_NOCACHE_CHECK prints a message, then sets the
dnl values of the second argument to the result of running
...
...
@@ -1960,6 +1980,23 @@ AC_DEFUN([XCODE_VERSION],[
fi
])
# FIND_LLVM_PROG()
# --------------------------------
# Find where the llvm tools are. We have a special function to handle when they
# are installed with a version suffix (e.g., llc-3.1).
#
# $1 = the variable to set
# $2 = the with option name
# $3 = the command to look for
#
AC_DEFUN([FIND_LLVM_PROG],[
FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([$1], [$2], [$3])
if test "$1" == ""; then
GOOD_PATH=`echo $PATH | tr ':,;' ' '`
$1=`${FindCmd} ${GOOD_PATH} -type f -perm +111 -maxdepth 1 -regex '.*/$3-[[0-9]]\.[[0-9]]' | ${SortCmd} -n | tail -1`
fi
])
# FIND_GCC()
# --------------------------------
# Finds where gcc is
...
...
configure.ac
View file @
64aaaa19
...
...
@@ -39,6 +39,7 @@ dnl ** which are needed by FP_SETUP_PROJECT_VERSION
dnl ** Find find command (for Win32's benefit)
FP_PROG_FIND
FP_PROG_SORT
dnl ----------------------------------------------------------
FP_SETUP_PROJECT_VERSION
...
...
@@ -505,13 +506,13 @@ esac
dnl ** Which LLVM llc to use?
dnl --------------------------------------------------------------
F
P_ARG_WITH_PATH_GNU_PROG_OPTIONAL
([LLC], [llc], [llc])
F
IND_LLVM_PROG
([LLC], [llc], [llc])
LlcCmd="$LLC"
AC_SUBST([LlcCmd])
dnl ** Which LLVM opt to use?
dnl --------------------------------------------------------------
F
P_ARG_WITH_PATH_GNU_PROG_OPTIONAL
([OPT], [opt], [opt])
F
IND_LLVM_PROG
([OPT], [opt], [opt])
OptCmd="$OPT"
AC_SUBST([OptCmd])
...
...
@@ -1001,6 +1002,8 @@ echo ["\
which is version : $GccVersion
Building a cross compiler : $CrossCompiling
llc : $LlcCmd
opt : $OptCmd
ld : $LdCmd
Happy : $HappyCmd ($HappyVersion)
Alex : $AlexCmd ($AlexVersion)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment