source: rtems/aclocal/canonicalize-tools.m4 @ a7a0871

4.104.114.84.9
Last change on this file since a7a0871 was 51c195d5, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 19, 1998 at 4:23:56 PM

New files missed in previous merge.

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