1 | dnl $Id$ |
---|
2 | dnl |
---|
3 | dnl Set target tools |
---|
4 | dnl |
---|
5 | dnl 98/02/12 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
6 | dnl |
---|
7 | |
---|
8 | AC_DEFUN(RTEMS_CANONICALIZE_TOOLS, |
---|
9 | [AC_REQUIRE([RTEMS_PROG_CC])dnl |
---|
10 | if test "$rtems_cv_prog_gcc" = "yes" ; then |
---|
11 | dnl We are using gcc, now ask it about its tools |
---|
12 | dnl Necessary if gcc was configured to use the target's native tools |
---|
13 | dnl or uses prefixes for gnutools (e.g. gas instead of as) |
---|
14 | AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar` |
---|
15 | AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as` |
---|
16 | LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld` |
---|
17 | NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm` |
---|
18 | RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib` |
---|
19 | fi |
---|
20 | |
---|
21 | dnl check whether the tools exist |
---|
22 | dnl FIXME: What shall be done if they don't exist? |
---|
23 | |
---|
24 | dnl NOTE: CC_FOR_TARGET should always be valid at this point, |
---|
25 | dnl cf. RTEMS_PROG_CC |
---|
26 | AC_PATH_PROG(CC_FOR_TARGET,"$program_prefix"gcc,no) |
---|
27 | |
---|
28 | dnl FIXME: This may fail if the compiler has not been recognized as gcc |
---|
29 | dnl and uses tools with different names |
---|
30 | AC_PATH_PROG(AR_FOR_TARGET,"$program_prefix"ar,no) |
---|
31 | AC_PATH_PROG(AS_FOR_TARGET,"$program_prefix"as,no) |
---|
32 | AC_PATH_PROG(NM_FOR_TARGET,"$program_prefix"nm,no) |
---|
33 | AC_PATH_PROG(LD_FOR_TARGET,"$program_prefix"ld,no) |
---|
34 | |
---|
35 | dnl NOTE: This is doubtful, but should not disturb all current rtems' |
---|
36 | dnl targets (remark: solaris fakes ranlib!!) |
---|
37 | AC_PATH_PROG(RANLIB_FOR_TARGET,"$program_prefix"ranlib,no) |
---|
38 | |
---|
39 | dnl NOTE: These may not be available, if not using gnutools |
---|
40 | AC_PATH_PROG(OBJCOPY_FOR_TARGET,"$program_prefix"objcopy,no) |
---|
41 | AC_PATH_PROG(SIZE_FOR_TARGET,"$program_prefix"size,no) |
---|
42 | ]) |
---|