[llvm-commits] [llvm] r46760 - in /llvm/trunk: Makefile.rules autoconf/configure.ac

Chris Lattner sabre at nondot.org
Tue Feb 5 11:43:41 PST 2008


Author: lattner
Date: Tue Feb  5 13:43:40 2008
New Revision: 46760

URL: http://llvm.org/viewvc/llvm-project?rev=46760&view=rev
Log:
Make the check for GCC version more robust, fix shared library
dependencies in makefile, and fix llvm_cv_no_link_all_option
on darwin.

Patch by Shantonu Sen, more info here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-February/012410.html

Modified:
    llvm/trunk/Makefile.rules
    llvm/trunk/autoconf/configure.ac

Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=46760&r1=46759&r2=46760&view=diff

==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Tue Feb  5 13:43:40 2008
@@ -805,7 +805,7 @@
 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) \

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=46760&r1=46759&r2=46760&view=diff

==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Tue Feb  5 13:43:40 2008
@@ -119,7 +119,7 @@
     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 @@
 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





More information about the llvm-commits mailing list