Hi,

Please add this patch to llvm-gcc-4-0. It creates the ModuleInfo.txt
file and the build-for-llvm-top.sh script. Both of these files are
needed in order to include llvm-gcc-4-0 in the build mechanism from
llvm-top.

Thanks,

Reid.
Index: build-for-llvm-top.sh
===================================================================
--- build-for-llvm-top.sh	(revision 0)
+++ build-for-llvm-top.sh	(revision 0)
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+is_debug=1
+for arg in "$@" ; do
+  case "$arg" in
+    LLVM_TOP=*)
+      LLVM_TOP=`echo "$arg" | sed -e 's/LLVM_TOP=//'`
+      ;;
+    PREFIX=*)
+      PREFIX=`echo "$arg" | sed -e 's/PREFIX=//'`
+      ;;
+    ENABLE_OPTIMIZED=1)
+      is_debug=0
+      ;;
+    *=*)
+      build_opts="$build_opts $arg"
+      ;;
+    --*)
+      config_opts="$config_opts $arg"
+      ;;
+  esac
+done
+
+# First, see if the build directory is there. If not, create it.
+build_dir="$LLVM_TOP/build.llvm-gcc-4-0"
+if test ! -d "$build_dir" ; then
+  mkdir -p "$build_dir"
+fi
+
+# Next, see if we have previously been configured by sensing the presense
+# of the config.status scripts
+config_status="$build_dir/config.status"
+if test ! -d "$config_status" ; then
+  # We must configure so build a list of configure options
+  config_options="--prefix=$PREFIX --program-prefix=llvm-"
+  config_options="$config_opts --enable-languages=c,c++ $config_opts"
+  if test "$is_debug" -eq "1" ; then
+    config_options="$config_opts --enable-checking --enable-libstdcxx-debug"
+  fi
+  host=`./config.guess`
+  if test ! -z `echo "$host" | grep 'linux'` ; then
+    config_options="$config_opts --disable-shared"
+  fi
+  src_dir=`pwd`
+  cd "$build_dir"
+  echo $src_dir/configure $config_options
+  $src_dir/configure $config_options
+fi
+
+echo make $build_opts '&&' make install $build_opts
+make $build_opts && make install $build_opts

Property changes on: build-for-llvm-top.sh
___________________________________________________________________
Name: svn:executable
   + *

Index: ModuleInfo.txt
===================================================================
--- ModuleInfo.txt	(revision 0)
+++ ModuleInfo.txt	(revision 0)
@@ -0,0 +1,2 @@
+DepModule: llvm
+ConfigCmd: build-for-llvm-top.sh 
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to