summaryrefslogtreecommitdiffstats
path: root/aclocal
diff options
context:
space:
mode:
Diffstat (limited to 'aclocal')
-rw-r--r--aclocal/canonical-target-name.m426
-rw-r--r--aclocal/check-cpu.m44
2 files changed, 16 insertions, 14 deletions
diff --git a/aclocal/canonical-target-name.m4 b/aclocal/canonical-target-name.m4
index 8a12973436..65c55b8dc5 100644
--- a/aclocal/canonical-target-name.m4
+++ b/aclocal/canonical-target-name.m4
@@ -10,33 +10,35 @@ dnl and we have to fix it for rtems ourselves
AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
[
-AC_REQUIRE([AC_CANONICAL_SYSTEM])
+rtems_target=$target;
+case "$target" in
+no_cpu*) target=$host;;
+*) ;;
+esac
+AC_CANONICAL_SYSTEM
AC_MSG_CHECKING(rtems target cpu)
changequote(,)dnl
-case "${target}" in
+case "${rtems_target}" in
# hpux unix port should go here
i[3456]86-go32-rtems*)
- target_cpu=i386
+ RTEMS_CPU=i386
;;
i[3456]86-pc-linux*) # unix "simulator" port
- target_cpu=unix
+ RTEMS_CPU=unix
;;
i[3456]86-*freebsd2*) # unix "simulator" port
- target_cpu=unix
+ RTEMS_CPU=unix
;;
no_cpu-*rtems*)
- target_cpu=no_cpu
- ;;
- ppc*-*rtems*)
- target_cpu=powerpc
+ RTEMS_CPU=no_cpu
;;
sparc-sun-solaris*) # unix "simulator" port
- target_cpu=unix
+ RTEMS_CPU=unix
;;
*)
- target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
+ RTEMS_CPU=`echo $rtems_target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
;;
esac
changequote([,])dnl
-AC_MSG_RESULT($target_cpu)
+AC_MSG_RESULT($RTEMS_CPU)
])
diff --git a/aclocal/check-cpu.m4 b/aclocal/check-cpu.m4
index 89ef96e661..60551ba4d8 100644
--- a/aclocal/check-cpu.m4
+++ b/aclocal/check-cpu.m4
@@ -6,8 +6,8 @@ AC_DEFUN(RTEMS_CHECK_CPU,
AC_REQUIRE([RTEMS_TOP])
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
# Is this a supported CPU?
-AC_MSG_CHECKING([if cpu $target_cpu is supported])
-if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$target_cpu"; then
+AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
+if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR(no)