summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-19 21:47:18 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-19 21:47:18 +0000
commit5ff5b630048221ef121f0b96f0cf56a4de32a96e (patch)
treee95cfac9e0906324782bc8ba3b345c6239d36e4d /configure
parent99c68579e5ffe20ed5bc4cdf82633a31ed649c21 (diff)
downloadgcc-5ff5b630048221ef121f0b96f0cf56a4de32a96e.tar.gz
* configure.ac: Add target-libgo to target_libraries. Set
and substitute GOC_FOR_BUILD and GOC_FOR_TARGET. * Makefile.tpl (BUILD_EXPORTS): Add GOC and GOCFLAGS. (HOST_EXPORTS): Add GOC. (BASE_TARGET_EXPORTS): Add GOC. (GOC_FOR_BUILD, GOCFLAGS, GOC_FOR_TARGET): New variables. (GOCFLAGS_FOR_TARGET): New variable. (EXTRA_HOST_FLAGS): Add GOC. (EXTRA_TARGET_FLAGS): Add GOC and GOCFLAGS. * Makefile.def (target_modules): Add libgo. (flags_to_pass): Add GOC_FOR_TARGET and GOCFLAGS_FOR_TARGET. (dependencies): Add dependency from configure-target-libgo to configure-target-libffi and all-target-libstdc++-v3. Add dependencies from all-target-libgo to all-target-libffi. (languages): Add go. * configure: Rebuild. * Makefile.in: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166959 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure217
1 files changed, 216 insertions, 1 deletions
diff --git a/configure b/configure
index b1235c2afa2..f224ab61915 100755
--- a/configure
+++ b/configure
@@ -578,6 +578,7 @@ LD_FOR_TARGET
DLLTOOL_FOR_TARGET
AS_FOR_TARGET
AR_FOR_TARGET
+GOC_FOR_TARGET
GFORTRAN_FOR_TARGET
GCJ_FOR_TARGET
GCC_FOR_TARGET
@@ -610,6 +611,7 @@ RANLIB_FOR_BUILD
NM_FOR_BUILD
LD_FOR_BUILD
LDFLAGS_FOR_BUILD
+GOC_FOR_BUILD
GFORTRAN_FOR_BUILD
GCJ_FOR_BUILD
DLLTOOL_FOR_BUILD
@@ -811,6 +813,7 @@ CXX_FOR_TARGET
GCC_FOR_TARGET
GCJ_FOR_TARGET
GFORTRAN_FOR_TARGET
+GOC_FOR_TARGET
AR_FOR_TARGET
AS_FOR_TARGET
DLLTOOL_FOR_TARGET
@@ -1563,6 +1566,8 @@ Some influential environment variables:
GCJ for the target
GFORTRAN_FOR_TARGET
GFORTRAN for the target
+ GOC_FOR_TARGET
+ GOC for the target
AR_FOR_TARGET
AR for the target
AS_FOR_TARGET
@@ -2701,7 +2706,8 @@ target_libraries="target-libgcc \
target-boehm-gc \
${libgcj} \
target-libobjc \
- target-libada"
+ target-libada \
+ target-libgo"
# these tools are built using the target libraries, and are intended to
# run only in the target environment
@@ -3758,6 +3764,7 @@ if test "${build}" != "${host}" ; then
CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
+ GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
LD_FOR_BUILD=${LD_FOR_BUILD-ld}
NM_FOR_BUILD=${NM_FOR_BUILD-nm}
@@ -3771,6 +3778,7 @@ else
CXX_FOR_BUILD="\$(CXX)"
GCJ_FOR_BUILD="\$(GCJ)"
GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
+ GOC_FOR_BUILD="\$(GOC)"
DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
LD_FOR_BUILD="\$(LD)"
NM_FOR_BUILD="\$(NM)"
@@ -7527,6 +7535,7 @@ done
+
# Generate default definitions for YACC, M4, LEX and other programs that run
# on the build machine. These are used if the Makefile can't locate these
# programs in objdir.
@@ -10441,6 +10450,167 @@ fi
+if test -n "$GOC_FOR_TARGET"; then
+ ac_cv_prog_GOC_FOR_TARGET=$GOC_FOR_TARGET
+elif test -n "$ac_cv_prog_GOC_FOR_TARGET"; then
+ GOC_FOR_TARGET=$ac_cv_prog_GOC_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_GOC_FOR_TARGET"; then
+ for ncn_progname in gccgo; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_GOC_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$GOC_FOR_TARGET"; then
+ ac_cv_prog_GOC_FOR_TARGET="$GOC_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_GOC_FOR_TARGET="${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+GOC_FOR_TARGET=$ac_cv_prog_GOC_FOR_TARGET
+if test -n "$GOC_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOC_FOR_TARGET" >&5
+$as_echo "$GOC_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ done
+fi
+
+if test -z "$ac_cv_prog_GOC_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in gccgo; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
+ if test -x $with_build_time_tools/${ncn_progname}; then
+ ac_cv_prog_GOC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_GOC_FOR_TARGET"; then
+ for ncn_progname in gccgo; do
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_GOC_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$GOC_FOR_TARGET"; then
+ ac_cv_prog_GOC_FOR_TARGET="$GOC_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_GOC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+GOC_FOR_TARGET=$ac_cv_prog_GOC_FOR_TARGET
+if test -n "$GOC_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOC_FOR_TARGET" >&5
+$as_echo "$GOC_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ if test -z "$ac_cv_prog_GOC_FOR_TARGET" && test $build = $target ; then
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_GOC_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$GOC_FOR_TARGET"; then
+ ac_cv_prog_GOC_FOR_TARGET="$GOC_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_GOC_FOR_TARGET="${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+GOC_FOR_TARGET=$ac_cv_prog_GOC_FOR_TARGET
+if test -n "$GOC_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOC_FOR_TARGET" >&5
+$as_echo "$GOC_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ test -n "$ac_cv_prog_GOC_FOR_TARGET" && break
+ done
+fi
+
+if test -z "$ac_cv_prog_GOC_FOR_TARGET" ; then
+ set dummy gccgo
+ if test $build = $target ; then
+ GOC_FOR_TARGET="$2"
+ else
+ GOC_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+else
+ GOC_FOR_TARGET="$ac_cv_prog_GOC_FOR_TARGET"
+fi
+
+
+
cat > conftest.c << \EOF
#ifdef __GNUC__
gcc_yay;
@@ -13377,6 +13547,51 @@ $as_echo "pre-installed" >&6; }
fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gccgo" >&5
+$as_echo_n "checking where to find the target gccgo... " >&6; }
+if test "x${build}" != "x${host}" ; then
+ if expr "x$GOC_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $GOC_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ else
+ # Canadian cross, just use what we found
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" gcc "*) ;;
+ *) ok=no ;;
+ esac
+ case ,${enable_languages}, in
+ *,go,*) ;;
+ *) ok=no ;;
+ esac
+ if test $ok = yes; then
+ # An in-tree tool is available and we can use it
+ GOC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
+$as_echo "just compiled" >&6; }
+ elif expr "x$GOC_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $GOC_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ GOC_FOR_TARGET='$(GOC)'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
+$as_echo "host tool" >&6; }
+ else
+ # We need a cross tool
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ld" >&5
$as_echo_n "checking where to find the target ld... " >&6; }
if test "x${build}" != "x${host}" ; then