This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH RFA: Add Go support to config-ml.in


This patch adds Go support to config-ml.in.  I will also send this patch
back to the automake maintainers, though probably not until after the
autoconf and libtool patches are accepted.

Bootstrapped on x86_64-unknown-linux-gnu.

OK for mainline?

Ian


2010-11-19  Ian Lance Taylor  <iant@google.com>

	* config-ml.in: Add Go support: treat GOC and GOCFLAGS like other
	compiler/flag environment variables.


Index: config-ml.in
===================================================================
--- config-ml.in	(revision 166919)
+++ config-ml.in	(working copy)
@@ -517,6 +517,7 @@ multi-do:
 				prefix="$(prefix)" \
 				exec_prefix="$(exec_prefix)" \
 				GCJFLAGS="$(GCJFLAGS) $${flags}" \
+				GOCFLAGS="$(GOCFLAGS) $${flags}" \
 				CXXFLAGS="$(CXXFLAGS) $${flags}" \
 				LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
 				LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
@@ -750,7 +751,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n
         break
       fi
     done
-    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"'
+    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags" GOC="${GOC_}$flags"'
 
     if [ "${with_target_subdir}" = "." ]; then
 	CC_=$CC' '
@@ -758,6 +759,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n
 	F77_=$F77' '
 	GCJ_=$GCJ' '
 	GFORTRAN_=$GFORTRAN' '
+	GOC_=$GOC' '
     else
 	# Create a regular expression that matches any string as long
 	# as ML_POPDIR.
@@ -822,6 +824,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n
 	  esac
 	done
 
+	GOC_=
+	for arg in ${GOC}; do
+	  case $arg in
+	  -[BIL]"${ML_POPDIR}"/*)
+	    GOC_="${GOC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+	  "${ML_POPDIR}"/*)
+	    GOC_="${GOC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+	  *)
+	    GOC_="${GOC_}${arg} " ;;
+	  esac
+	done
+
 	if test "x${LD_LIBRARY_PATH+set}" = xset; then
 	  LD_LIBRARY_PATH_=
 	  for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]