source: rtems/aclocal/canonicalize-tools.m4 @ 31668a6

4.104.114.84.9
Last change on this file since 31668a6 was 31668a6, checked in by Joel Sherrill <joel.sherrill@…>, on May 21, 1998 at 6:46:36 PM

Use gcc to look for size also

  • Property mode set to 100644
File size: 1.5 KB
Line 
1dnl $Id$
2dnl
3dnl Set target tools
4dnl
5dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
6dnl
7
8AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
9[AC_REQUIRE([RTEMS_PROG_CC])dnl
10if 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  SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size`
20fi
21
22dnl check whether the tools exist
23dnl FIXME: What shall be done if they don't exist?
24
25dnl FIXME: This may fail if the compiler has not been recognized as gcc
26dnl       and uses tools with different names
27AC_PATH_PROG(AR_FOR_TARGET,"$program_prefix"ar,no)
28AC_PATH_PROG(AS_FOR_TARGET,"$program_prefix"as,no)
29AC_PATH_PROG(NM_FOR_TARGET,"$program_prefix"nm,no)
30AC_PATH_PROG(LD_FOR_TARGET,"$program_prefix"ld,no)
31
32dnl NOTE: This is doubtful, but should not disturb all current rtems'
33dnl       targets (remark: solaris fakes ranlib!!)
34AC_PATH_PROG(RANLIB_FOR_TARGET,"$program_prefix"ranlib,no)
35
36dnl NOTE: These may not be available, if not using gnutools
37AC_PATH_PROG(OBJCOPY_FOR_TARGET,"$program_prefix"objcopy,no)
38AC_PATH_PROG(SIZE_FOR_TARGET,"$program_prefix"size,no)
39])
Note: See TracBrowser for help on using the repository browser.