source: rtems/aclocal/canonicalize-tools.m4 @ 232429f6

4.104.114.84.9
Last change on this file since 232429f6 was 232429f6, checked in by Joel Sherrill <joel.sherrill@…>, on May 22, 1998 at 12:26:47 PM

Removed SIZE_FOR_TARGET change after Ralf pointed out that gcc does
not properly report it all the time.

  • Property mode set to 100644
File size: 1.4 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`
19fi
20
21dnl check whether the tools exist
22dnl FIXME: What shall be done if they don't exist?
23
24dnl FIXME: This may fail if the compiler has not been recognized as gcc
25dnl       and uses tools with different names
26AC_PATH_PROG(AR_FOR_TARGET,"$program_prefix"ar,no)
27AC_PATH_PROG(AS_FOR_TARGET,"$program_prefix"as,no)
28AC_PATH_PROG(NM_FOR_TARGET,"$program_prefix"nm,no)
29AC_PATH_PROG(LD_FOR_TARGET,"$program_prefix"ld,no)
30
31dnl NOTE: This is doubtful, but should not disturb all current rtems'
32dnl       targets (remark: solaris fakes ranlib!!)
33AC_PATH_PROG(RANLIB_FOR_TARGET,"$program_prefix"ranlib,no)
34
35dnl NOTE: These may not be available, if not using gnutools
36AC_PATH_PROG(OBJCOPY_FOR_TARGET,"$program_prefix"objcopy,no)
37AC_PATH_PROG(SIZE_FOR_TARGET,"$program_prefix"size,no)
38])
Note: See TracBrowser for help on using the repository browser.