diff options
author | Sebastian Pop <spop@codeaurora.org> | 2012-04-16 04:11:45 +0000 |
---|---|---|
committer | Sebastian Pop <spop@codeaurora.org> | 2012-04-16 04:11:45 +0000 |
commit | 5c9e18443d4bf32081c7054b048c743b92a215fa (patch) | |
tree | ed979bce1128410e4f692a28e2be8776337d4da3 /llvm | |
parent | 0066db90394ee6153e3f4f0c8ab21acadc8932e1 (diff) | |
download | bcm5719-llvm-5c9e18443d4bf32081c7054b048c743b92a215fa.tar.gz bcm5719-llvm-5c9e18443d4bf32081c7054b048c743b92a215fa.zip |
add configure flag --with-default-sysroot
llvm-svn: 154791
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/autoconf/configure.ac | 7 | ||||
-rwxr-xr-x | llvm/configure | 19 | ||||
-rw-r--r-- | llvm/include/llvm/Config/config.h.cmake | 3 | ||||
-rw-r--r-- | llvm/include/llvm/Config/config.h.in | 3 |
4 files changed, 27 insertions, 5 deletions
diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac index 0a2c8b69ddd..a3961efe1b5 100644 --- a/llvm/autoconf/configure.ac +++ b/llvm/autoconf/configure.ac @@ -838,6 +838,13 @@ AC_ARG_WITH(gcc-toolchain, AC_DEFINE_UNQUOTED(GCC_INSTALL_PREFIX,"$withval", [Directory where gcc is installed.]) +AC_ARG_WITH(sysroot, + AS_HELP_STRING([--with-default-sysroot], + [Add --sysroot=<path> to all compiler invocations.]),, + withval="") +AC_DEFINE_UNQUOTED(DEFAULT_SYSROOT,"$withval", + [Default <path> to all compiler invocations for --sysroot=<path>.]) + dnl Allow linking of LLVM with GPLv3 binutils code. AC_ARG_WITH(binutils-include, AS_HELP_STRING([--with-binutils-include], diff --git a/llvm/configure b/llvm/configure index e87160d75c4..df462a923a5 100755 --- a/llvm/configure +++ b/llvm/configure @@ -1442,6 +1442,7 @@ Optional Packages: --with-c-include-dirs Colon separated list of directories clang will search for headers --with-gcc-toolchain Directory where gcc is installed. + --with-default-sysroot Add --sysroot=<path> to all compiler invocations. --with-binutils-include Specify path to binutils/include/ containing plugin-api.h file for gold plugin. --with-bug-report-url Specify the URL where bug reports should be @@ -3802,7 +3803,7 @@ else llvm_cv_target_os_type="Darwin" ;; *-*-minix*) llvm_cv_target_os_type="Minix" ;; - *-*-freebsd*| *-*-kfreebsd-gnu) + *-*-freebsd* | *-*-kfreebsd-gnu) llvm_cv_target_os_type="FreeBSD" ;; *-*-openbsd*) llvm_cv_target_os_type="OpenBSD" ;; @@ -5583,6 +5584,20 @@ _ACEOF +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then + withval=$with_sysroot; +else + withval="" +fi + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_SYSROOT "$withval" +_ACEOF + + + # Check whether --with-binutils-include was given. if test "${with_binutils_include+set}" = set; then withval=$with_binutils_include; @@ -10386,7 +10401,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10387 "configure" +#line 10404 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake index 69e358031eb..95c4d6cac79 100644 --- a/llvm/include/llvm/Config/config.h.cmake +++ b/llvm/include/llvm/Config/config.h.cmake @@ -11,9 +11,6 @@ /* Relative directory for resource files */ #define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}" -/* Directory wherelibstdc++ is installed. */ -#define GCC_INSTALL_PREFIX "${GCC_INSTALL_PREFIX}" - /* Directories clang will search for headers */ #define C_INCLUDE_DIRS "${C_INCLUDE_DIRS}" diff --git a/llvm/include/llvm/Config/config.h.in b/llvm/include/llvm/Config/config.h.in index ccff7da9671..677bf2e40b8 100644 --- a/llvm/include/llvm/Config/config.h.in +++ b/llvm/include/llvm/Config/config.h.in @@ -12,6 +12,9 @@ /* Directories clang will search for headers */ #undef C_INCLUDE_DIRS +/* Default <path> to all compiler invocations for --sysroot=<path>. */ +#undef DEFAULT_SYSROOT + /* Define if position independent code is enabled */ #undef ENABLE_PIC |