summaryrefslogtreecommitdiffstats
path: root/config/acx.m4
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-05 15:00:27 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-05 15:00:27 +0000
commitf5aebe3e886c2c3a22c4c0e8b43fb333c1e83eb3 (patch)
tree05cc5ce809715a6dd302c3a48e97b1407f60db9d /config/acx.m4
parent782bd3b14cd90096ff6d5d161fa1675cc23e66cb (diff)
downloadppe42-gcc-f5aebe3e886c2c3a22c4c0e8b43fb333c1e83eb3.tar.gz
ppe42-gcc-f5aebe3e886c2c3a22c4c0e8b43fb333c1e83eb3.zip
toplevel:
2005-12-05 Paolo Bonzini <bonzini@gnu.org> * configure.in (CONFIGURED_BISON, CONFIGURED_YACC, CONFIGURED_M4, CONFIGURED_FLEX, CONFIGURED_LEX, CONFIGURED_MAKEINFO): Remove "CONFIGURED_" from the AC_CHECK_PROGS invocation. Move below. Find in-tree tools if available. (EXPECT, RUNTEST, LIPO, STRIP): Find them and substitute them. (CONFIGURED_*_FOR_TARGET): Don't set nor substitute. (*_FOR_TARGET): Set them with GCC_TARGET_TOOL. (COMPILER_*_FOR_TARGET): New. * Makefile.tpl (HOST_EXPORTS): Add *_FOR_TARGET symbols that gcc needs. (BASE_TARGET_EXPORTS): Use COMPILER_*_FOR_TARGET symbols. (CONFIGURED_*, USUAL_*): Remove. (BISON, YACC, FLEX, LEX, M4, MAKEINFO, EXPECT, RUNTEST, LIPO, STRIP): Use autoconf substitutions. (COMPILER_AS_FOR_TARGET, COMPILER_LD_FOR_TARGET, COMPILER_NM_FOR_TARGET): New. (EXTRA_HOST_FLAGS): Pass LIPO and STRIP. (all): Make all-host and all-target in parallel. (do-[+make_target+], do-check, install, [+compare-target+]): Ensure that $$r and $$s are set before invoking a recursive make. (stage[+id+]-bubble): Likewise, and invoke the comparison at the end. ([+bootstrap-target+]): Inline most of the `all' target. config: 2005-12-05 Paolo Bonzini <bonzini@gnu.org> * acx.m4 (GCC_TARGET_TOOL): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108059 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'config/acx.m4')
-rw-r--r--config/acx.m431
1 files changed, 31 insertions, 0 deletions
diff --git a/config/acx.m4 b/config/acx.m4
index 94e3216367b..c71f39b44b8 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -296,3 +296,34 @@ fi
AC_SUBST(LN)dnl
])
+dnl GCC_TARGET_TOOL(PROGRAM, TARGET-VAR, HOST-VAR, IN-TREE-TOOL, LANGUAGE)
+AC_DEFUN([GCC_TARGET_TOOL],
+[AC_MSG_CHECKING(where to find the target $1)
+if test "x${build}" != "x${host}" ; then
+ # Canadian cross, just use what we found
+ AC_MSG_RESULT(pre-installed)
+else
+ ifelse([$4],,,
+ [ok=yes
+ case " ${configdirs} " in
+ *" patsubst([$4], [/.*], []) "*) ;;
+ *) ok=no ;;
+ esac
+ ifelse([$5],,,
+ [case ,${enable_languages}, in
+ *,$5,*) ;;
+ *) ok=no ;;
+ esac])
+ if test $ok = yes; then
+ # An in-tree tool is available and we can use it
+ $2='$$r/$(HOST_SUBDIR)/$4'
+ AC_MSG_RESULT(just compiled)
+ el])if test "x$target" = "x$host"; then
+ # We can use an host tool
+ $2='$($3)'
+ AC_MSG_RESULT(host tool)
+ else
+ # We need a cross tool
+ AC_MSG_RESULT(pre-installed)
+ fi
+fi])
OpenPOWER on IntegriCloud