[llvm-commits] [llvm] r63621 - in /llvm/trunk: Makefile.config.in autoconf/configure.ac
Nick Lewycky
nicholas at mxc.ca
Mon Feb 2 23:10:08 PST 2009
Author: nicholas
Date: Tue Feb 3 01:10:08 2009
New Revision: 63621
URL: http://llvm.org/viewvc/llvm-project?rev=63621&view=rev
Log:
Add the ability to pass the path to binutils source to configure. This is
needed to build the LLVM gold plugin.
Modified:
llvm/trunk/Makefile.config.in
llvm/trunk/autoconf/configure.ac
Modified: llvm/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=63621&r1=63620&r2=63621&view=diff
==============================================================================
--- llvm/trunk/Makefile.config.in (original)
+++ llvm/trunk/Makefile.config.in Tue Feb 3 01:10:08 2009
@@ -283,3 +283,6 @@
else
SYSPATH = $(1)
endif
+
+# Location of the plugin header file for gold.
+BINUTILS_INCDIR := @BINUTILS_INCDIR@
Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=63621&r1=63620&r2=63621&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Tue Feb 3 01:10:08 2009
@@ -514,6 +514,24 @@
*) AC_MSG_ERROR([Invalid path for --with-ocaml-libdir. Provide full path]) ;;
esac
+dnl Allow linking of LLVM with GPLv3 binutils code.
+AC_ARG_WITH(binutils-include,
+ AS_HELP_STRING([--with-binutils-include],
+ [Specify path to binutils/include/ containing plugin-api.h file for gold plugin.]),,
+ withval=default)
+case "$withval" in
+ default) WITH_BINUTILS_INCDIR=default ;;
+ /* | [[A-Za-z]]:[[\\/]]*) WITH_BINUTILS_INCDIR=$withval ;;
+ *) AC_MSG_ERROR([Invalid path for --with-binutils-include. Provide full path]) ;;
+esac
+if test "x$WITH_BINUTILS_INCDIR" != xdefault ; then
+ AC_SUBST(BINUTILS_INCDIR,$WITH_BINUTILS_INCDIR)
+ if test ! -f "$WITH_BINUTILS_INCDIR/plugin-api.h"; then
+ echo "$WITH_BINUTILS_INCDIR/plugin-api.h"
+ AC_MSG_ERROR([Invalid path to directory containing plugin-api.h.]);
+ fi
+fi
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 4: Check for programs we need and that they are the right version
More information about the llvm-commits
mailing list