summaryrefslogtreecommitdiffstats
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-26 18:52:49 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2006-01-26 18:52:49 +0000
commitc47832b1e268e7787a1ed5bf652adefbffcde4b8 (patch)
tree484b52fd96363ad918849a7497ef8337eed90672 /gcc/configure.ac
parent06bc8842b3810f96cfde29bf73fe108c735c29d2 (diff)
downloadppe42-gcc-c47832b1e268e7787a1ed5bf652adefbffcde4b8.tar.gz
ppe42-gcc-c47832b1e268e7787a1ed5bf652adefbffcde4b8.zip
2006-01-26 Paolo Bonzini <bonzini@gnu.org>
* configure.in: Set with_gnu_as, with_gnu_ld, with_newlib earlier. Set md_exec_prefix. Use ACX_CHECK_INSTALLED_TARGET_TOOL to find the assembler, linker and binutils. * configure: Regenerate. 2006-01-26 Paolo Bonzini <bonzini@gnu.org> * config/acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Test $with_build_time_tools. (ACX_PATH_SEP): New. (ACX_TOOL_DIRS): Move here from the gcc directory. (ACX_CHECK_INSTALLED_TARGET_TOOL): New. (GCC_TARGET_TOOL): Do not use a host tool if we found a target tool with a complete path in either $with_build_time_tools or $exec_prefix. 2006-01-26 Paolo Bonzini <bonzini@gnu.org> * configure.ac: Expect target tools paths to be passed from the toplevel and wrap the detection into AS_SET_VAR_IF. Extract side-effects out of AS_SET_VAR_IF. * acinclude.m4 (gcc_AC_TOOL_DIRS, gcc_AC_CHECK_TOOL): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110266 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac131
1 files changed, 74 insertions, 57 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index e536b0ae547..03964d6f9fe 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1813,22 +1813,38 @@ esac
# If build != host, and we aren't building gas in-tree, we identify a
# build->target assembler and hope that it will have the same features
# as the host->target assembler we'll be using.
-in_tree_gas=no
-gcc_cv_as=
gcc_cv_gas_major_version=
gcc_cv_gas_minor_version=
gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
+
+m4_pattern_allow([AS_FOR_TARGET])dnl
+AS_VAR_SET_IF(gcc_cv_as,, [
if test -x "$DEFAULT_ASSEMBLER"; then
gcc_cv_as="$DEFAULT_ASSEMBLER"
elif test -f $gcc_cv_as_gas_srcdir/configure.in \
&& test -f ../gas/Makefile \
&& test x$build = x$host; then
+ gcc_cv_as=../gas/as-new$build_exeext
+elif test -x as$build_exeext; then
+ # Build using assembler in the current directory.
+ gcc_cv_as=./as$build_exeext
+elif test -x $AS_FOR_TARGET; then
+ gcc_cv_as="$AS_FOR_TARGET"
+else
+ AC_PATH_PROG(gcc_cv_as, $AS_FOR_TARGET)
+fi])
+
+ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
+AC_SUBST(ORIGINAL_AS_FOR_TARGET)
+
+AC_MSG_CHECKING(what assembler to use)
+if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
# Single tree build which includes gas. We want to prefer it
# over whatever linker top-level may have detected, since
# we'll use what we're building after installation anyway.
+ AC_MSG_RESULT(newly built gas)
in_tree_gas=yes
_gcc_COMPUTE_GAS_VERSION
- gcc_cv_as=../gas/as-new$build_exeext
in_tree_gas_is_elf=no
if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
|| (grep 'obj_format = multi' ../gas/Makefile \
@@ -1836,23 +1852,11 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in \
then
in_tree_gas_is_elf=yes
fi
-m4_pattern_allow([AS_FOR_TARGET])dnl
-elif test -x as$build_exeext; then
- # Build using assembler in the current directory.
- gcc_cv_as=./as$build_exeext
+else
+ AC_MSG_RESULT($gcc_cv_as)
+ in_tree_gas=no
fi
-gcc_AC_CHECK_TOOL(gcc_cv_as, as, ORIGINAL_AS_FOR_TARGET, AS_FOR_TARGET, AS)
-AC_MSG_CHECKING(what assembler to use)
-case $in_tree_gas in
- yes)
- AC_MSG_RESULT("newly built gas")
- ;;
- no)
- AC_MSG_RESULT($gcc_cv_as)
- ;;
-esac
-
# Identify the linker which will work hand-in-glove with the newly
# built GCC, so that we can examine its features. This is the linker
# which will be driven by the driver program.
@@ -1860,20 +1864,36 @@ esac
# If build != host, and we aren't building gas in-tree, we identify a
# build->target linker and hope that it will have the same features
# as the host->target linker we'll be using.
-in_tree_ld=no
-gcc_cv_ld=
gcc_cv_gld_major_version=
gcc_cv_gld_minor_version=
gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
+
+AS_VAR_SET_IF(gcc_cv_ld,, [
if test -x "$DEFAULT_LINKER"; then
gcc_cv_ld="$DEFAULT_LINKER"
elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
&& test -f ../ld/Makefile \
&& test x$build = x$host; then
+ gcc_cv_ld=../ld/ld-new$build_exeext
+elif test -x collect-ld$build_exeext; then
+ # Build using linker in the current directory.
+ gcc_cv_ld=./collect-ld$build_exeext
+elif test -x $LD_FOR_TARGET; then
+ gcc_cv_ld="$LD_FOR_TARGET"
+else
+ AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET)
+fi])
+
+ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
+AC_SUBST(ORIGINAL_LD_FOR_TARGET)
+
+AC_MSG_CHECKING(what linker to use)
+if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
# Single tree build which includes ld. We want to prefer it
# over whatever linker top-level may have detected, since
# we'll use what we're building after installation anyway.
+ AC_MSG_RESULT(newly built ld)
in_tree_ld=yes
in_tree_ld_is_elf=no
if (grep 'EMUL = .*elf' ../ld/Makefile \
@@ -1885,71 +1905,68 @@ elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
do
changequote(,)dnl
gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f`
-changequote([,])dnl
if test x$gcc_cv_gld_version != x; then
break
fi
done
-changequote(,)dnl
gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
changequote([,])dnl
- gcc_cv_ld=../ld/ld-new$build_exeext
-elif test -x collect-ld$build_exeext; then
- # Build using linker in the current directory.
- gcc_cv_ld=./collect-ld$build_exeext
+else
+ AC_MSG_RESULT($gcc_cv_ld)
+ in_tree_ld=no
fi
-gcc_AC_CHECK_TOOL(gcc_cv_ld, ld, ORIGINAL_LD_FOR_TARGET, LD_FOR_TARGET, LD)
-AC_MSG_CHECKING(what linker to use)
-case $in_tree_ld in
- yes)
- AC_MSG_RESULT("newly built ld")
- ;;
- no)
- AC_MSG_RESULT($gcc_cv_ld)
- ;;
-esac
-
# Figure out what nm we will be using.
gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
-in_tree_nm=no
-gcc_cv_nm=
+AS_VAR_SET_IF(gcc_cv_nm,, [
if test -f $gcc_cv_binutils_srcdir/configure.in \
&& test -f ../binutils/Makefile; then
- # Single tree build which includes binutils.
- in_tree_nm=yes
gcc_cv_nm=../binutils/nm-new$build_exeext
elif test -x nm$build_exeext; then
gcc_cv_nm=./nm$build_exeext
-fi
+elif test -x $NM_FOR_TARGET; then
+ gcc_cv_nm="$NM_FOR_TARGET"
+else
+ AC_PATH_PROG(gcc_cv_nm, $NM_FOR_TARGET)
+fi])
-gcc_AC_CHECK_TOOL(gcc_cv_nm, nm, ORIGINAL_NM_FOR_TARGET, NM_FOR_TARGET, NM)
AC_MSG_CHECKING(what nm to use)
-case $in_tree_nm in
- yes) AC_MSG_RESULT("newly built nm") ;;
- no) AC_MSG_RESULT($gcc_cv_nm) ;;
-esac
+if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then
+ # Single tree build which includes binutils.
+ AC_MSG_RESULT(newly built nm)
+ in_tree_nm=yes
+else
+ AC_MSG_RESULT($gcc_cv_nm)
+ in_tree_nm=no
+fi
+
+ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
+AC_SUBST(ORIGINAL_NM_FOR_TARGET)
# Figure out what objdump we will be using.
-in_tree_objdump=no
-gcc_cv_objdump=
+AS_VAR_SET_IF(gcc_cv_objdump,, [
if test -f $gcc_cv_binutils_srcdir/configure.in \
&& test -f ../binutils/Makefile; then
# Single tree build which includes binutils.
- in_tree_objdump=yes
gcc_cv_objdump=../binutils/objdump$build_exeext
elif test -x objdump$build_exeext; then
gcc_cv_objdump=./objdump$build_exeext
-fi
+elif test -x $OBJDUMP_FOR_TARGET; then
+ gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
+else
+ AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET)
+fi])
-gcc_AC_CHECK_TOOL(gcc_cv_objdump, objdump, ORIGINAL_OBJDUMP_FOR_TARGET,
- OBJDUMP_FOR_TARGET, OBJDUMP)
AC_MSG_CHECKING(what objdump to use)
-case $in_tree_objdump in
- yes) AC_MSG_RESULT("newly built objdump") ;;
- no) AC_MSG_RESULT($gcc_cv_objdump) ;;
-esac
+if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
+ # Single tree build which includes binutils.
+ AC_MSG_RESULT(newly built objdump)
+elif test x$gcc_cv_objdump = x; then
+ AC_MSG_RESULT(not found)
+else
+ AC_MSG_RESULT($gcc_cv_objdump)
+fi
# Figure out what assembler alignment features are present.
gcc_GAS_CHECK_FEATURE([.balign and .p2align], gcc_cv_as_balign_and_p2align,
OpenPOWER on IntegriCloud