/hg/icedtea6: Strip stupid options that llvm-config supplies
gbenson at icedtea.classpath.org
gbenson at icedtea.classpath.org
Fri Feb 12 05:24:33 PST 2010
changeset fc600c234771 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=fc600c234771
author: Gary Benson <gbenson at redhat.com>
date: Fri Feb 12 13:24:25 2010 +0000
Strip stupid options that llvm-config supplies
diffstat:
2 files changed, 36 insertions(+), 5 deletions(-)
ChangeLog | 4 ++++
configure.ac | 37 ++++++++++++++++++++++++++++++++-----
diffs (59 lines):
diff -r 748156804502 -r fc600c234771 ChangeLog
--- a/ChangeLog Tue Feb 09 09:15:27 2010 +0000
+++ b/ChangeLog Fri Feb 12 13:24:25 2010 +0000
@@ -1,3 +1,7 @@ 2010-02-09 Edward Nevill <ed at camswl.com
+2010-02-12 Gary Benson <gbenson at redhat.com>
+
+ * configure.ac: Strip stupid options that llvm-config supplies.
+
2010-02-09 Edward Nevill <ed at camswl.com>
* cppInterpreter_arm.S / thumb2.cpp
diff -r 748156804502 -r fc600c234771 configure.ac
--- a/configure.ac Tue Feb 09 09:15:27 2010 +0000
+++ b/configure.ac Fri Feb 12 13:24:25 2010 +0000
@@ -432,12 +432,39 @@ if test "x${SHARK_BUILD_TRUE}" = x || te
if test "x${SHARK_BUILD_TRUE}" = x || test "x${ADD_SHARK_BUILD_TRUE}" = x; then
FIND_TOOL([LLVM_CONFIG], [llvm-config])
llvm_components="jit engine nativecodegen"
- LLVM_CFLAGS=`$LLVM_CONFIG --cxxflags $llvm_components | \
- sed -e 's/-O.//g' | sed -e 's/-fomit-frame-pointer//g' | \
- sed -e 's/-pedantic//g' | sed -e 's/-D_DEBUG//g'`
+ dnl LLVM_CFLAGS
+ LLVM_CFLAGS=
+ for flag in $($LLVM_CONFIG --cxxflags $llvm_components); do
+ if echo "$flag" | grep -q '^-[[ID]]'; then
+ if test "$flag" != "-D_DEBUG"; then
+ if test "x$LLVM_CFLAGS" != "x"; then
+ LLVM_CFLAGS="$LLVM_CFLAGS "
+ fi
+ LLVM_CFLAGS="$LLVM_CFLAGS$flag"
+ fi
+ fi
+ done
+ dnl LLVM_LDFLAGS
+ LLVM_LDFLAGS=
+ for flag in $($LLVM_CONFIG --ldflags $llvm_components); do
+ if echo "$flag" | grep -q '^-L'; then
+ if test "x$LLVM_LDFLAGS" != "x"; then
+ LLVM_LDFLAGS="$LLVM_LDFLAGS "
+ fi
+ LLVM_LDFLAGS="$LLVM_LDFLAGS$flag"
+ fi
+ done
+ dnl LLVM_LIBS
+ LLVM_LIBS=
+ for flag in $($LLVM_CONFIG --libs $llvm_components); do
+ if echo "$flag" | grep -q '^-l'; then
+ if test "x$LLVM_LIBS" != "x"; then
+ LLVM_LIBS="$LLVM_LIBS "
+ fi
+ LLVM_LIBS="$LLVM_LIBS$flag"
+ fi
+ done
LLVM_CFLAGS="$LLVM_CFLAGS -DSHARK_LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/\.//;s/svn.*//'`"
- LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags $llvm_components`
- LLVM_LIBS=`$LLVM_CONFIG --libs $llvm_components`
fi
AC_SUBST(LLVM_CFLAGS)
AC_SUBST(LLVM_LDFLAGS)
More information about the distro-pkg-dev
mailing list