[llvm-commits] CVS: llvm/Makefile.Linux Makefile.SunOS Makefile.config.in configure configure.ac

John Criswell criswell at choi.cs.uiuc.edu
Tue Jun 24 16:20:03 PDT 2003


Changes in directory llvm:

Makefile.Linux updated: 1.10 -> 1.10.2.1
Makefile.SunOS updated: 1.9 -> 1.9.2.1
Makefile.config.in updated: 1.1.2.1 -> 1.1.2.2
configure updated: 1.1.2.1 -> 1.1.2.2
configure.ac updated: 1.1.2.1 -> 1.1.2.2

---
Log message:

Moved functionality from Makefile.<platform> to the autoconf scripts.



---
Diffs of the changes:

Index: llvm/Makefile.Linux
diff -u llvm/Makefile.Linux:1.10 llvm/Makefile.Linux:1.10.2.1
--- llvm/Makefile.Linux:1.10	Sun May 25 11:52:41 2003
+++ llvm/Makefile.Linux	Tue Jun 24 16:19:14 2003
@@ -8,16 +8,6 @@
 # Set the architecture so that x86 platform dependant code is compmiled
 ARCH := x86
 
-# MakeSharedObjectOption - This option is passed to the linker by
-# Makefile.common when compiling a shared object.
-#
-MakeSharedObjectOption := -shared
-
-# PLATFORMLINKOPTS - On Linux, we must specify this linker option so that all
-# symbols are exported by tools for runtime use by dlsym.
-#
-PLATFORMLINKOPTS := -Wl,--export-dynamic
-
 # PLATFORMSTRIPOPTS - Command to pass to the link phase to cause symbols to be 
 # stripped from the resultant binary.
 PLATFORMSTRIPOPTS := -Wl,-x


Index: llvm/Makefile.SunOS
diff -u llvm/Makefile.SunOS:1.9 llvm/Makefile.SunOS:1.9.2.1
--- llvm/Makefile.SunOS:1.9	Sun May 25 11:52:41 2003
+++ llvm/Makefile.SunOS	Tue Jun 24 16:19:14 2003
@@ -8,15 +8,6 @@
 # Set the architecture so that Sparc platform dependant code is compmiled
 ARCH := Sparc
 
-# MakeSharedObjectOption - This option is passed to the linker by
-# Makefile.common when compiling a shared object.
-#
-MakeSharedObjectOption := -G
-
-# PLATFORMLINKOPTS - On sun we need to link to libmalloc.so to get a definition
-# of mallinfo.
-PLATFORMLINKOPTS := -lmalloc
-
 # PLATFORMSTRIPOPTS - Command to pass to the link phase to cause symbols to be 
 # stripped from the resultant binary.
 #


Index: llvm/Makefile.config.in
diff -u llvm/Makefile.config.in:1.1.2.1 llvm/Makefile.config.in:1.1.2.2
--- llvm/Makefile.config.in:1.1.2.1	Mon Jun 23 13:59:24 2003
+++ llvm/Makefile.config.in	Tue Jun 24 16:19:14 2003
@@ -63,7 +63,7 @@
 #
 # Determine the target for which LLVM should generate code.
 #
-#LLVMGCCARCH := @target@/3.4-llvm
+LLVMGCCARCH := @target@/3.4-llvm
 
 # Path to directory where object files should be stored during a build.
 # Set OBJ_ROOT to "." if you do not want to use a separate place for
@@ -75,7 +75,7 @@
 # Path to location for LLVM front-end this should only be specified here if you
 # want to override the value set in Makefile.$(uname)
 #
-#LLVMGCCDIR := @LLVMGCCDIR@
+LLVMGCCDIR := @LLVMGCCDIR@
 
 # When this setting is set to true, programs in the llvm/test/Programs hierarchy
 # are not recompiled from source code.  Instead, the bytecode for the file is
@@ -146,4 +146,14 @@
 #
 #ENABLE_PURIFY = 1
 @ENABLE_PURIFY@
+
+#
+# Enable JIT for this platform
+#
+ at JIT@
+
+#
+# Disable LLC diffs for testing.
+#
+ at DISABLE_LLC_DIFFS@
 


Index: llvm/configure
diff -u llvm/configure:1.1.2.1 llvm/configure:1.1.2.2
--- llvm/configure:1.1.2.1	Tue Jun 24 13:27:03 2003
+++ llvm/configure	Tue Jun 24 16:19:14 2003
@@ -1009,13 +1009,19 @@
   --enable-spec           Compile SPEC benchmarks (default is NO)
   --enable-precompiled_bytecode
                           Use pre-compiled bytecode (default is NO)
+  --enable-jit            Enable Just In Time Compiling (default is NO)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
   --with-pic              try to use only PIC/non-PIC objects default=use both
-
+  --with-spec             Location of SPEC benchmarks
+  --with-llvmgccdir       Location of LLVM GCC front-end
+  --with-bcrepos          Location of Bytecode Repository
+  --with-papi             Location of PAPI
+  --with-objroot          Location where object files should be placed
+                          (default is .)
 
 Some influential environment variables:
   CXX         C++ compiler command
@@ -1578,14 +1584,30 @@
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
 
-echo $build
 case $build in
 	*i*86*)  OS=Linux
 
+	         DISABLE_LLC_DIFFS=DISABLE_LLC_DIFFS:=1
+
+	         LLVMGCCDIR=/home/vadve/lattner/local/x86/llvm-gcc/
+
 	         ;;
+
 	*sparc*) OS=SunOS
 
+	         LLVMGCCDIR=/home/vadve/lattner/local/sparc/llvm-gcc/
+
 	         ;;
+
+	*)       OS=Unknown
+
+	         ;;
+esac
+
+case $target in
+	*sparc*solaris*)  target=sparcv9-sun-solaris2.8
+
+	                  ;;
 esac
 
 
@@ -4274,7 +4296,7 @@
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4277 "configure"' > conftest.$ac_ext
+  echo '#line 4299 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -4824,7 +4846,7 @@
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 compiler_c_o=no
-if { (eval echo configure:4827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
   # The compiler can only warn and ignore the option if not recognized
   # So say no if there are warnings
   if test -s out/conftest.err; then
@@ -6655,7 +6677,7 @@
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 6658 "configure"
+#line 6680 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -6753,7 +6775,7 @@
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 6756 "configure"
+#line 6778 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11343,6 +11365,78 @@
    { (exit 1); exit 1; }; }
 fi
 
+echo "$as_me:$LINENO: checking for mprotect" >&5
+echo $ECHO_N "checking for mprotect... $ECHO_C" >&6
+if test "${ac_cv_func_mprotect+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char mprotect (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char mprotect ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_mprotect) || defined (__stub___mprotect)
+choke me
+#else
+f = mprotect;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_mprotect=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_mprotect=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_mprotect" >&5
+echo "${ECHO_T}$ac_cv_func_mprotect" >&6
+if test $ac_cv_func_mprotect = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: Function mprotect() required but not found" >&5
+echo "$as_me: error: Function mprotect() required but not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 
 # Check whether --enable-purify or --disable-purify was given.
 if test "${enable_purify+set}" = set; then
@@ -11398,6 +11492,20 @@
   UPB=
 
 fi;
+case $build in
+	*i*86*)  # Check whether --enable-jit or --disable-jit was given.
+if test "${enable_jit+set}" = set; then
+  enableval="$enable_jit"
+  JIT=TARGET_HAS_JIT=1
+
+else
+  JIT=
+
+fi;
+	         ;;
+	*)
+	         ;;
+esac
 
 
 # Check whether --with-spec or --without-spec was given.
@@ -12018,6 +12126,8 @@
 s, at target_vendor@,$target_vendor,;t t
 s, at target_os@,$target_os,;t t
 s, at OS@,$OS,;t t
+s, at DISABLE_LLC_DIFFS@,$DISABLE_LLC_DIFFS,;t t
+s, at LLVMGCCDIR@,$LLVMGCCDIR,;t t
 s, at CXX@,$CXX,;t t
 s, at CXXFLAGS@,$CXXFLAGS,;t t
 s, at LDFLAGS@,$LDFLAGS,;t t
@@ -12059,8 +12169,8 @@
 s, at ENABLE_OPTIMIZED@,$ENABLE_OPTIMIZED,;t t
 s, at USE_SPEC@,$USE_SPEC,;t t
 s, at UPB@,$UPB,;t t
+s, at JIT@,$JIT,;t t
 s, at SPEC_ROOT@,$SPEC_ROOT,;t t
-s, at LLVMGCCDIR@,$LLVMGCCDIR,;t t
 s, at BCR@,$BCR,;t t
 s, at PAPIDIR@,$PAPIDIR,;t t
 s, at OBJROOT@,$OBJROOT,;t t


Index: llvm/configure.ac
diff -u llvm/configure.ac:1.1.2.1 llvm/configure.ac:1.1.2.2
--- llvm/configure.ac:1.1.2.1	Mon Jun 23 13:54:23 2003
+++ llvm/configure.ac	Tue Jun 24 16:19:14 2003
@@ -33,17 +33,32 @@
 
 dnl
 dnl Now, for some of our own magic:
-dnl We will use the build machine information to determine which master
-dnl Makefile dnl to load.  It will either be Linux or SparcV9
+dnl We will use the build machine information to set some variables.
 dnl
-echo $build
 case $build in
 	*i*86*)  AC_SUBST(OS,[Linux])
+	         AC_SUBST(DISABLE_LLC_DIFFS,[[DISABLE_LLC_DIFFS:=1]])
+	         AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/x86/llvm-gcc/])
 	         ;;
+
 	*sparc*) AC_SUBST(OS,[SunOS])
+	         AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/sparc/llvm-gcc/])
+	         ;;
+
+	*)       AC_SUBST(OS,[Unknown])
 	         ;;
 esac
 
+dnl
+dnl If we are on a Solaris machine, pretend that it is V9, since that is all
+dnl that we support at the moment, and autoconf will only tell us we're a
+dnl sparc.
+dnl
+case $target in
+	*sparc*solaris*)  AC_SUBST(target,[[sparcv9-sun-solaris2.8]])
+	                  ;;
+esac
+
 dnl **************************************************************************
 dnl * Check for programs.
 dnl **************************************************************************
@@ -190,6 +205,7 @@
 dnl As the code is made more portable (i.e. less reliant on these functions,
 dnl these checks should go away.
 AC_CHECK_FUNC(mmap,,AC_MSG_ERROR([Function mmap() required but not found]))
+AC_CHECK_FUNC(mprotect,,AC_MSG_ERROR([Function mprotect() required but not found]))
 
 dnl **************************************************************************
 dnl * Enable various compile-time options
@@ -200,14 +216,20 @@
 AC_ARG_ENABLE(optimized,AC_HELP_STRING([--enable-optimized],[Compile with optimizations enabled (default is NO)]), AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]), AC_SUBST(ENABLE_OPTIMIZED,[[]]))
 AC_ARG_ENABLE(spec,AC_HELP_STRING([--enable-spec],[Compile SPEC benchmarks (default is NO)]), AC_SUBST(USE_SPEC,[[USE_SPEC=1]]), AC_SUBST(USE_SPEC,[[]]))
 AC_ARG_ENABLE(precompiled_bytecode,AC_HELP_STRING([--enable-precompiled_bytecode],[Use pre-compiled bytecode (default is NO)]), AC_SUBST(UPB,[[USE_PRECOMPILED_BYTECODE=1]]), AC_SUBST(UPB,[[]]))
+case $build in
+	*i*86*)  AC_ARG_ENABLE(jit,AC_HELP_STRING([--enable-jit],[Enable Just In Time Compiling (default is NO)]), AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]), AC_SUBST(JIT,[[]]))
+	         ;;
+	*)
+	         ;;
+esac
 
 dnl **************************************************************************
 dnl * Set the location of various third-party software packages
 dnl **************************************************************************
-AC_ARG_WITH(spec,,AC_SUBST(SPEC_ROOT,[$withval]),AC_SUBST(SPEC_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec]))
-AC_ARG_WITH(llvmgccdir,,AC_SUBST(LLVMGCCDIR,[$withval]))
-AC_ARG_WITH(bcrepos,,AC_SUBST(BCR,[$withval]),AC_SUBST(BCR,[/home/vadve/lattner/LLVMPrograms]))
-AC_ARG_WITH(papi,,AC_SUBST(PAPIDIR,[$withval]),AC_SUBST(PAPIDIR,[/home/vadve/shared/papi-2.3.4.1]))
-AC_ARG_WITH(objroot,,AC_SUBST(OBJROOT,[$withval]),AC_SUBST(OBJROOT,[.]))
+AC_ARG_WITH(spec,AC_HELP_STRING([--with-spec],[Location of SPEC benchmarks]),AC_SUBST(SPEC_ROOT,[$withval]),AC_SUBST(SPEC_ROOT,[/home/vadve/shared/benchmarks/speccpu2000/benchspec]))
+AC_ARG_WITH(llvmgccdir,AC_HELP_STRING([--with-llvmgccdir],[Location of LLVM GCC front-end]),AC_SUBST(LLVMGCCDIR,[$withval]))
+AC_ARG_WITH(bcrepos,AC_HELP_STRING([--with-bcrepos],[Location of Bytecode Repository]),AC_SUBST(BCR,[$withval]),AC_SUBST(BCR,[/home/vadve/lattner/LLVMPrograms]))
+AC_ARG_WITH(papi,AC_HELP_STRING([--with-papi],[Location of PAPI]),AC_SUBST(PAPIDIR,[$withval]),AC_SUBST(PAPIDIR,[/home/vadve/shared/papi-2.3.4.1]))
+AC_ARG_WITH(objroot,AC_HELP_STRING([--with-objroot],[Location where object files should be placed (default is .)]),AC_SUBST(OBJROOT,[$withval]),AC_SUBST(OBJROOT,[.]))
 
 AC_OUTPUT(Makefile.config)





More information about the llvm-commits mailing list