diff options
author | Logan Chien <loganchien@google.com> | 2013-05-22 17:11:20 +0800 |
---|---|---|
committer | Logan Chien <tzuhsiang.chien@gmail.com> | 2013-12-22 22:11:20 +0800 |
commit | dcdd8fc8019d09ac30bf2d97640f0c31f9cca3a2 (patch) | |
tree | 04abba72eb93aa4e0b8103dbd90a26d47fc7159a | |
parent | 3397465933abe35e2117f5b9aeceb898c7e507d9 (diff) | |
download | llvm-dcdd8fc8019d09ac30bf2d97640f0c31f9cca3a2.tar.gz |
[ndk][conf] Fix Canadian build.
1. Add new two new flags: CFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD
and use them in $BUILD_CC test.
2. Unset $LDFLAGS in cross-compile-build-tools.
3. $ARCH can be overrided by environment variable.
Cherry-picked from release_33 branch.
Regenerated with ./autoconf/AutoRegen.sh.
Conflicts:
configure
projects/sample/configure
Change-Id: I81ad0aa4fc5fa1111c6bd9b56be2c703a51f9fbe
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | autoconf/configure.ac | 4 | ||||
-rw-r--r-- | autoconf/m4/build_exeext.m4 | 4 | ||||
-rwxr-xr-x | configure | 18 | ||||
-rw-r--r-- | include/llvm/Config/config.h.in | 18 | ||||
-rw-r--r-- | projects/sample/autoconf/m4/build_exeext.m4 | 4 | ||||
-rwxr-xr-x | projects/sample/configure | 4 |
7 files changed, 26 insertions, 27 deletions
@@ -112,6 +112,7 @@ cross-compile-build-tools: cd BuildTools ; \ unset CFLAGS ; \ unset CXXFLAGS ; \ + unset LDFLAGS ; \ unset SDKROOT ; \ unset UNIVERSAL_SDK_PATH ; \ $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \ diff --git a/autoconf/configure.ac b/autoconf/configure.ac index a9d491548f1..df25b07994a 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -424,7 +424,9 @@ case "$llvm_cv_target_arch" in esac dnl Define a substitution, ARCH, for the target architecture -AC_SUBST(ARCH,$llvm_cv_target_arch) +if test -z "$ARCH" ; then + AC_SUBST(ARCH,$llvm_cv_target_arch) +fi dnl Determine what our host architecture. dnl This will allow MCJIT regress tests runs only for supported diff --git a/autoconf/m4/build_exeext.m4 b/autoconf/m4/build_exeext.m4 index 1bdecc1ba57..571106d5a0c 100644 --- a/autoconf/m4/build_exeext.m4 +++ b/autoconf/m4/build_exeext.m4 @@ -18,7 +18,9 @@ else fi fi test -z "$BUILD_CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) - ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD' + test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="$CFLAGS $CPPFLAGS" + test -z "$LDFLAGS_FOR_BUILD" && LDFLAGS_FOR_BUILD="$LDFLAGS" + ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD' rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_build_exeext= diff --git a/configure b/configure index 72e9b133044..bc11c3b3bcb 100755 --- a/configure +++ b/configure @@ -4055,8 +4055,10 @@ case "$llvm_cv_target_arch" in *) LLVM_NATIVE_ARCH="$llvm_cv_target_arch" ;; esac -ARCH=$llvm_cv_target_arch +if test -z "$ARCH" ; then + ARCH=$llvm_cv_target_arch +fi case $host in i?86-*) host_arch="x86" ;; @@ -4957,7 +4959,9 @@ fi test -z "$BUILD_CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } - ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="$CFLAGS $CPPFLAGS" + test -z "$LDFLAGS_FOR_BUILD" && LDFLAGS_FOR_BUILD="$LDFLAGS" + ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS 1>&5' rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_build_exeext= @@ -8825,7 +8829,9 @@ if test "${enable_ltdl_install+set}" = set; then fi - if test x"${enable_ltdl_install-no}" != xno; then + + +if test x"${enable_ltdl_install-no}" != xno; then INSTALL_LTDL_TRUE= INSTALL_LTDL_FALSE='#' else @@ -8833,7 +8839,9 @@ else INSTALL_LTDL_FALSE= fi - if test x"${enable_ltdl_convenience-no}" != xno; then + + +if test x"${enable_ltdl_convenience-no}" != xno; then CONVENIENCE_LTDL_TRUE= CONVENIENCE_LTDL_FALSE='#' else @@ -10582,7 +10590,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10585 "configure" +#line 10593 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in index dcec8f8cd1e..0d43ae50a14 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -3,9 +3,6 @@ #ifndef CONFIG_H #define CONFIG_H -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - /* Bug report URL. */ #undef BUG_REPORT_URL @@ -673,9 +670,6 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME -/* Define to the home page for this package. */ -#undef PACKAGE_URL - /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -700,18 +694,6 @@ /* Type of 1st arg on ELM Callback */ #undef WIN32_ELMCB_PCSTR -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - /* Define to empty if `const' does not conform to ANSI C. */ #undef const diff --git a/projects/sample/autoconf/m4/build_exeext.m4 b/projects/sample/autoconf/m4/build_exeext.m4 index 1bdecc1ba57..571106d5a0c 100644 --- a/projects/sample/autoconf/m4/build_exeext.m4 +++ b/projects/sample/autoconf/m4/build_exeext.m4 @@ -18,7 +18,9 @@ else fi fi test -z "$BUILD_CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) - ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD' + test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="$CFLAGS $CPPFLAGS" + test -z "$LDFLAGS_FOR_BUILD" && LDFLAGS_FOR_BUILD="$LDFLAGS" + ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD' rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_build_exeext= diff --git a/projects/sample/configure b/projects/sample/configure index bc04c9628de..422a4de9f7e 100755 --- a/projects/sample/configure +++ b/projects/sample/configure @@ -4754,7 +4754,9 @@ fi test -z "$BUILD_CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } - ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="$CFLAGS $CPPFLAGS" + test -z "$LDFLAGS_FOR_BUILD" && LDFLAGS_FOR_BUILD="$LDFLAGS" + ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS 1>&5' rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_build_exeext= |