llvm.org GIT mirror llvm / 1526b19
Initial support for being able to specify the llvm-gcc to use like this: --with-llvmgcc="gcc-4.5 -fplugin=dragonegg.so" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120149 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan Sands 8 years ago
2 changed file(s) with 14 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
14241424 dnl Check wether llvm-gcc is based on dragonegg
14251425 AC_CACHE_CHECK([whether llvm-gcc is dragonegg],[llvm_cv_llvmgcc_dragonegg],
14261426 [llvm_cv_llvmgcc_dragonegg="no"
1427 if test -x "$LLVMGCC" ; then
1427 if test -n "$LLVMGCC" ; then
14281428 cp /dev/null conftest.c
1429 "$LLVMGCC" -fplugin-arg-dragonegg-emit-ir -S -o - conftest.c | \
1430 grep 'target datalayout =' > /dev/null 2>&1
1429 $LLVMGCC -fplugin-arg-dragonegg-emit-ir -S -o - conftest.c > /dev/null 2>&1
14311430 if test $? -eq 0 ; then
14321431 llvm_cv_llvmgcc_dragonegg="yes"
14331432 fi
14491448 dnl See if the llvm-gcc executable can compile to LLVM assembly
14501449 AC_CACHE_CHECK([whether llvm-gcc is sane],[llvm_cv_llvmgcc_sanity],
14511450 [llvm_cv_llvmgcc_sanity="no"
1452 if test -x "$LLVMGCC" ; then
1451 if test -n "$LLVMGCC" ; then
14531452 cp /dev/null conftest.c
1454 "$LLVMGCC" "$LLVMCC_EMITIR_FLAG" -S -o - conftest.c | \
1453 $LLVMGCC "$LLVMCC_EMITIR_FLAG" -S -o - conftest.c | \
14551454 grep 'target datalayout =' > /dev/null 2>&1
14561455 if test $? -eq 0 ; then
14571456 llvm_cv_llvmgcc_sanity="yes"
14631462 dnl Furthermore, add some information about the tools
14641463 if test "$llvm_cv_llvmgcc_sanity" = "yes" ; then
14651464 AC_MSG_CHECKING([llvm-gcc component support])
1466 llvmcc1path=`"$LLVMGCC" --print-prog-name=cc1`
1465 llvmcc1path=`$LLVMGCC --print-prog-name=cc1`
14671466 AC_SUBST(LLVMCC1,$llvmcc1path)
1468 llvmcc1pluspath=`"$LLVMGCC" --print-prog-name=cc1plus`
1467 llvmcc1pluspath=`$LLVMGCC --print-prog-name=cc1plus`
14691468 AC_SUBST(LLVMCC1PLUS,$llvmcc1pluspath)
14701469 llvmgccdir=`echo "$llvmcc1path" | sed 's,/libexec/.*,,'`
14711470 AC_SUBST(LLVMGCCDIR,$llvmgccdir)
1472 llvmgcclangs=[`"$LLVMGCC" -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'`]
1471 llvmgcclangs=[`$LLVMGCC -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'`]
14731472 AC_SUBST(LLVMGCC_LANGS,$llvmgcclangs)
14741473 AC_SUBST(LLVMGCC_DRAGONEGG,$llvm_cv_llvmgcc_dragonegg)
14751474 AC_SUBST(LLVMGCC_DISABLEOPT_FLAGS)
2058520585 echo $ECHO_N "(cached) $ECHO_C" >&6
2058620586 else
2058720587 llvm_cv_llvmgcc_dragonegg="no"
20588 if test -x "$LLVMGCC" ; then
20588 if test -n "$LLVMGCC" ; then
2058920589 cp /dev/null conftest.c
20590 "$LLVMGCC" -fplugin-arg-dragonegg-emit-ir -S -o - conftest.c | \
20591 grep 'target datalayout =' > /dev/null 2>&1
20590 $LLVMGCC -fplugin-arg-dragonegg-emit-ir -S -o - conftest.c > /dev/null 2>&1
2059220591 if test $? -eq 0 ; then
2059320592 llvm_cv_llvmgcc_dragonegg="yes"
2059420593 fi
2061420613 echo $ECHO_N "(cached) $ECHO_C" >&6
2061520614 else
2061620615 llvm_cv_llvmgcc_sanity="no"
20617 if test -x "$LLVMGCC" ; then
20616 if test -n "$LLVMGCC" ; then
2061820617 cp /dev/null conftest.c
20619 "$LLVMGCC" "$LLVMCC_EMITIR_FLAG" -S -o - conftest.c | \
20618 $LLVMGCC "$LLVMCC_EMITIR_FLAG" -S -o - conftest.c | \
2062020619 grep 'target datalayout =' > /dev/null 2>&1
2062120620 if test $? -eq 0 ; then
2062220621 llvm_cv_llvmgcc_sanity="yes"
2063020629 if test "$llvm_cv_llvmgcc_sanity" = "yes" ; then
2063120630 { echo "$as_me:$LINENO: checking llvm-gcc component support" >&5
2063220631 echo $ECHO_N "checking llvm-gcc component support... $ECHO_C" >&6; }
20633 llvmcc1path=`"$LLVMGCC" --print-prog-name=cc1`
20632 llvmcc1path=`$LLVMGCC --print-prog-name=cc1`
2063420633 LLVMCC1=$llvmcc1path
2063520634
20636 llvmcc1pluspath=`"$LLVMGCC" --print-prog-name=cc1plus`
20635 llvmcc1pluspath=`$LLVMGCC --print-prog-name=cc1plus`
2063720636 LLVMCC1PLUS=$llvmcc1pluspath
2063820637
2063920638 llvmgccdir=`echo "$llvmcc1path" | sed 's,/libexec/.*,,'`
2064020639 LLVMGCCDIR=$llvmgccdir
2064120640
20642 llvmgcclangs=`"$LLVMGCC" -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'`
20641 llvmgcclangs=`$LLVMGCC -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'`
2064320642 LLVMGCC_LANGS=$llvmgcclangs
2064420643
2064520644 LLVMGCC_DRAGONEGG=$llvm_cv_llvmgcc_dragonegg