diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index 175513a4f60c..0367874b2af6 100644 --- a/llvm/Makefile.rules +++ b/llvm/Makefile.rules @@ -805,7 +805,7 @@ SharedLibKindMessage := "Loadable Module" else SharedLibKindMessage := "Shared Library" endif -$(LibName.LA): $(ObjectsLO) $(LibDir)/.dir +$(LibName.LA): $(ObjectsLO) $(ProjLibsPaths) $(LLVMLibsPaths) $(LibDir)/.dir $(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \ $(LIBRARYNAME)$(SHLIBEXT) $(Verb) $(LTLink) -o $@ $(ObjectsLO) $(ProjLibsOptions) \ diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac index 98f0fe6c8b53..db9fdddb18a5 100644 --- a/llvm/autoconf/configure.ac +++ b/llvm/autoconf/configure.ac @@ -119,7 +119,7 @@ AC_CACHE_CHECK([type of operating system we're going to host on], llvm_cv_platform_type="Unix" ;; *-*-darwin*) llvm_cv_link_all_option="-Wl,-all_load" - llvm_cv_link_all_option="-Wl,-noall_load" + llvm_cv_no_link_all_option="-Wl,-noall_load" llvm_cv_os_type="Darwin" llvm_cv_platform_type="Unix" ;; *-*-freebsd*) @@ -656,11 +656,10 @@ fi dnl Verify that GCC is version 3.0 or higher if test "$GCC" = "yes" then - gccmajor=`$CC --version | head -n 1 | sed 's/[[^0-9]]*\([[0-9.]]\).*/\1/'` - if test "$gccmajor" -lt "3" - then - AC_MSG_ERROR([gcc 3.x required, but you have a lower version]) - fi + AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3 +#error Unsupported GCC version +#endif +]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower version])]) fi dnl Check for GNU Make. We use its extensions, so don't build without it