Changeset 98100d2 in rtems


Ignore:
Timestamp:
Jun 27, 1998, 5:09:47 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
5d18fb0
Parents:
d13b247
Message:

Monstrous patch from Ralf Corsepius <corsepiu@…>. I have
made no attempt to divide the comments up and place them with just
the appropriate files. Here is an excerpt from Ralf's email:

Changes including comments on changes I made after cycling through
all the targets:

  • Added ranlib support. Now all targets use "ranlib" instead of "ar -s" to build an index for a library. If ranlib isn't detected during configuration, check if ar -s is working and try "ar -s" instead of
  • Removed $(XXX_FOR_TARGET) from make/target.cfg.in, use $(XXX) instead now.
  • gcc-target-default.cfg: LINK_XXXX-defines reworked to solve the -l problem under posix (cf gcc-target-default.cfg)
  • rtems-glom replaced by Makefile-rules inside of the wrapup/Makefile.in that has been using rtems-glom until now.
  • Removed CCC and friends in gcc-target-default.cfg, as they have been breaking CXX support.
  • Removed CONFIG.$(TARGET_ARCH).CC lines from several custom/*.cfg files, because this is now set in custom/default.cfg.
  • Added aclocal/ar-s.m4, check whether "ar -s" is working
  • Added aclocal/cygwin.m4 and aclocal/exeext.m4.
  • Reworked aclocal/canonicalize-tools.m4: Added ar -s check; fixes for problems when XXX_FOR_TARGET is given via environment variables (didn't work for gcc until now), adding cygwin check, improved autoconf-cache handling.
  • Removed -l from make rule dependencies. LINK_LIBS is now allowed to contain -L and -l. LINK_OBJS and LINK_FILES must not contain -L or -l. gcc28 make-exe rules now link using $(LINK_OBJS) $(LINK_LIBS) => Almost all custom/*.cfg are modified. This is very likely to break something because of typos or having missed to edit a file.

Open problems, known bugs, things I didn't do:

  • custom/p4000.cfg seems to be out of date and requires to be reviewed.

(JRS NOTE: It is subordinate p4650 and p4600 -- both of which build ok

after minor changes.)

  • custom/psim.cfg needs to be reviewed, I added some changes to it, I am insecure about.

(JRS NOTE: psim had a minor problem endif/endef swapped but runs fine.)

  • rtems-glom.in can now be removed.
  • gcc*.cfg files "make depend" rules don't honor language specific flags (e.g CXXFLAGS is ignored for *.cc) - Nothing to worry about now, but may cause problems for hosts/targets not using gcc or rtems-add-ons that use external packages.
  • AFAIS, the no_bsp BSP can't be build anymore, i.e. configure refused to configure for it whatever I tried.
  • The toplevel and toplevel+1 README files are quite out-dated
  • cygwin.m4 isn't of much use for rtems. In most cases (cf. aclocal/*.m4) it is worked around by directly using $host_os. I think I'll remove it soon after the next snapshot
  • Before release the cygwin patch needs to be tested under cygwin. I may have broken/missed something (esp. the sed-pattern to convert
    into / may be broken).
  • You should try to build/run the posix-BSP under solaris - I don't expect problems, but I am not 100% sure, esp. with regard to ranlib/ar -s.
  • You should consider to convert all make/compilers/*.cfg files into make/compilers/*.cfg.in files and let autoconf generate the *.cfg. This may help getting rid of some if/then/else statements and help hard-coding some defines into those files in future and shouldn't disturb now.
  • Not having installed libc.a/libm.a on a host may still break building rtems, esp. when using -disable-gcc28 as the gcc27-configuration scheme directly accesses libc.a and libm.a. The problem should not appear when using gcc28 because it references libc/libm only through -lc and -lm which may be static or dynamic (I didn't test this).
  • shgen is not yet included (I didn't yet have enough time to integrate it).
  • I know about a few more configure-probs (esp. cross-checking --enable-* flags).

+ warn/refuse to configure when --enable-libcdir and

--enable-gcc28 are given.

+ force --enable-libcdir when --disable-gcc28 is given

  • Replaced KSHELL with @KSH@ in some shell scripts generated by configure.in.
  • Added a dependency to aclocal/*.m4 in the toplevel Makefile => configure and aclocal.m4 will now be rebuild when any aclocal/*.m4 file is changed
  • Some changes to aclocal/gcc-pipe.m4 and aclocal/gcc-specs.m4
  • Replaced i3456?86-unknown-freebsd2.12? with i3456?86-*freebsd2.* in configure.in, as I suppose there might exist a variety of valid vendors (2nd field of the name-tripple)
  • Disabled override MAKEFLAGS in toplevel Makefile.in - Potential side-effects are not really clear to me.
  • In mvme162.cfg, $(LINK_LIBS) is missing in the CC line in gcc28's make-exe rule (yet another one I missed to edit). Just append $(LINK_LIBS) to the "CC" line, like I hopefully did to ALL other custom/*.cfg files.
  • the problem with mvme162lx.cfg is a follow-up problem of the mvme162.cfg-bug.
  • mvme162/console and idp/console had variables named Buffer which conflicted with similarly named variables in some tests.
Files:
3 added
57 edited

Legend:

Unmodified
Added
Removed
  • Makefile.in

    rd13b247 r98100d2  
    3838EXIT_CMD = exit 1
    3939
    40 # Don't pass flags from previous make - especially NOT CFLAGS
    41 override MAKEFLAGS=
     40# Don't pass flags from previous make - especially NOT CFLAGS 
     41# NOTE: Previous versions overrode MAKEFLAGS, but this also disables
     42# a lot of useful features
     43# override MAKEFLAGS=
    4244
    4345$(MTARGETS):
     
    5658AUTOCONF = autoconf
    5759
     60ACLOCAL_FILES := $(wildcard $(srcdir)/aclocal/*.m4)
    5861ACLOCAL_M4 = aclocal.m4
    5962
    60 $(ACLOCAL_M4): configure.in
     63$(ACLOCAL_M4): configure.in $(ACLOCAL_FILES)
    6164        -cd $(RTEMS_ROOT) && $(ACLOCAL)
    6265
  • aclocal.m4

    rd13b247 r98100d2  
    152152[AC_REQUIRE([RTEMS_PROG_CC])
    153153AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
    154 [touch confspec
    155 echo 'void f(){}' >conftest.c
    156 if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
    157   rtems_cv_gcc_specs=yes
    158 else
    159   rtems_cv_gcc_specs=no
     154[
     155rtems_cv_gcc_specs=no
     156if test "$rtems_cv_prog_gcc" = "yes"; then
     157  touch confspec
     158  echo 'void f(){}' >conftest.c
     159  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
     160    rtems_cv_gcc_specs=yes
     161  fi
    160162fi
    161163rm -f confspec conftest*
     
    175177AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
    176178[
     179rtems_cv_gcc_pipe=no
     180if test "$rtems_cv_prog_gcc" = "yes"; then
    177181case "$host_os" in
    178182  cygwin32*)
    179     rtems_cv_gcc_pipe=no
    180183    ;;
    181184  *)
     
    183186    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
    184187      rtems_cv_gcc_pipe=yes
    185     else
    186       rtems_cv_gcc_pipe=no
    187188    fi
    188189    rm -f conftest*
    189190    ;;
    190191esac
     192fi
    191193])
    192194])
     
    262264dnl Set target tools
    263265dnl
     266dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     267dnl             fixing cache/environment variable handling
     268dnl             adding checks for cygwin/egcs '\\'-bug
     269dnl             adding checks for ranlib/ar -s problem
     270dnl
    264271dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    265272dnl
     273
     274AC_DEFUN(RTEMS_GCC_PRINT,
     275[ case $host_os in
     276  *cygwin32*)
     277    dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
     278    dnl        Should be removed once cygwin/egcs reports '/' only
     279    $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e "s%\\\\%/%g" `
     280    ;;
     281  *)
     282    $1=`$CC_FOR_TARGET --print-prog-name=$2`
     283    ;;
     284  esac
     285])
     286
     287AC_DEFUN(RTEMS_PATH_TOOL,
     288[
     289AC_MSG_CHECKING([target's $2])
     290AC_CACHE_VAL(ac_cv_path_$1,:)
     291AC_MSG_RESULT([$ac_cv_path_$1])
     292
     293if test -n "$ac_cv_path_$1"; then
     294  dnl retrieve the value from the cache
     295  $1=$ac_cv_path_$1
     296else
     297  dnl the cache was not set
     298  if test -z "[$]$1" ; then
     299    if test "$rtems_cv_prog_gcc" = "yes"; then
     300      # We are using gcc, ask it about its tool
     301      # NOTE: Necessary if gcc was configured to use the target's
     302      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     303      RTEMS_GCC_PRINT($1,$2)
     304    fi
     305  else
     306    # The user set an environment variable.
     307    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     308    # will override the environment variable, which isn't what the user
     309    # intends
     310    AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
     311    case "[$]$1" in
     312    /*) # valid
     313      AC_MSG_RESULT("yes")
     314    ;;
     315    *)  # invalid for AC_PATH_PROG
     316      AC_MSG_RESULT("no")
     317      AC_MSG_ERROR([***]
     318        [Environment variable $1 should ether]
     319        [be unset (preferred) or contain an absolute path])
     320    ;;
     321    esac
     322  fi
     323
     324  AC_PATH_PROG($1,"$program_prefix"$2,$3)
     325fi
     326])
    266327
    267328AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
    268329[AC_REQUIRE([RTEMS_PROG_CC])dnl
    269 if test "$rtems_cv_prog_gcc" = "yes" ; then
    270   dnl We are using gcc, now ask it about its tools
    271   dnl Necessary if gcc was configured to use the target's native tools
    272   dnl or uses prefixes for gnutools (e.g. gas instead of as)
    273   AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
    274   AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
    275   LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
    276   NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
    277   RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
    278 fi
    279 
    280 dnl check whether the tools exist
    281 dnl FIXME: What shall be done if they don't exist?
    282 
    283 dnl FIXME: This may fail if the compiler has not been recognized as gcc
    284 dnl       and uses tools with different names
    285 AC_PATH_PROG(AR_FOR_TARGET,"$program_prefix"ar,no)
    286 AC_PATH_PROG(AS_FOR_TARGET,"$program_prefix"as,no)
    287 AC_PATH_PROG(NM_FOR_TARGET,"$program_prefix"nm,no)
    288 AC_PATH_PROG(LD_FOR_TARGET,"$program_prefix"ld,no)
    289 
    290 dnl NOTE: This is doubtful, but should not disturb all current rtems'
    291 dnl       targets (remark: solaris fakes ranlib!!)
    292 AC_PATH_PROG(RANLIB_FOR_TARGET,"$program_prefix"ranlib,no)
    293 
    294 dnl NOTE: These may not be available, if not using gnutools
    295 AC_PATH_PROG(OBJCOPY_FOR_TARGET,"$program_prefix"objcopy,no)
    296 AC_PATH_PROG(SIZE_FOR_TARGET,"$program_prefix"size,no)
    297 ])
     330
     331dnl FIXME: What shall be done if these tools are not available?
     332  RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
     333  RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
     334  RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
     335  RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
     336
     337dnl special treatment of ranlib
     338  RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
     339  if test "$RANLIB_FOR_TARGET" = "no"; then
     340    # ranlib wasn't found; check if ar -s is available
     341    RTEMS_AR_FOR_TARGET_S
     342    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
     343      dnl override RANLIB_FOR_TARGET's cache
     344      ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
     345      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
     346    else
     347      AC_MSG_ERROR([***]
     348        [Can't figure out how to build a library index]
     349        [Nether ranlib nor ar -s seem to be available] )
     350    fi
     351  fi
     352
     353dnl NOTE: These may not be available if not using gnutools
     354  RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
     355  RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
     356])
     357
     358AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
     359[
     360AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
     361rtems_cv_AR_FOR_TARGET_S,
     362[
     363cat > conftest.$ac_ext <<EOF
     364int foo( int b )
     365{ return b; }
     366EOF
     367if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
     368  && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
     369  && test -s conftest.a ; \
     370then
     371  rtems_cv_AR_FOR_TARGET_S="yes"
     372else
     373  rtems_cv_AR_FOR_TARGET_S="no"
     374fi
     375  rm -f conftest*
     376])
     377])
     378
     379
     380dnl Detect the Cygwin32 environment (unix under Win32)
     381dnl
     382dnl 98/06/16 David Fiddes       (D.J.Fiddes@hw.ac.uk)
     383dnl                             Hacked from automake-1.3
     384
     385# Check to see if we're running under Cygwin32, without using
     386# AC_CANONICAL_*.  If so, set output variable CYGWIN32 to "yes".
     387# Otherwise set it to "no".
     388
     389dnl RTEMS_CYGWIN32()
     390AC_DEFUN(RTEMS_CYGWIN32,
     391[AC_CACHE_CHECK(for Cygwin32 environment, rtems_cv_cygwin32,
     392[AC_TRY_COMPILE(,[return __CYGWIN32__;],
     393rtems_cv_cygwin32=yes, rtems_cv_cygwin32=no)
     394rm -f conftest*])
     395CYGWIN32=
     396test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes])
     397
     398
     399dnl Set the EXE extension
     400dnl
     401dnl 98/06/16 David Fiddes       (D.J.Fiddes@hw.ac.uk)
     402dnl                             Hacked from automake-1.3
     403
     404# Check to see if we're running under Win32, without using
     405# AC_CANONICAL_*.  If so, set output variable EXEEXT to ".exe".
     406# Otherwise set it to "".
     407
     408dnl RTEMS_EXEEXT()
     409dnl This knows we add .exe if we're building in the Cygwin32
     410dnl environment. But if we're not, then it compiles a test program
     411dnl to see if there is a suffix for executables.
     412AC_DEFUN(RTEMS_EXEEXT,
     413[AC_REQUIRE([RTEMS_CYGWIN32])
     414AC_MSG_CHECKING([for executable suffix])
     415AC_CACHE_VAL(rtems_cv_exeext,
     416[if test "$CYGWIN32" = yes; then
     417rtems_cv_exeext=.exe
     418else
     419cat > rtems_c_test.c << 'EOF'
     420int main() {
     421/* Nothing needed here */
     422}
     423EOF
     424${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5
     425rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//`
     426rm -f rtems_c_test*])
     427test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no
     428fi
     429EXEEXT=""
     430test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext}
     431AC_MSG_RESULT(${rtems_cv_exeext})
     432AC_SUBST(EXEEXT)])
     433
    298434
    299435dnl $Id$
  • aclocal/canonicalize-tools.m4

    rd13b247 r98100d2  
    33dnl Set target tools
    44dnl
     5dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     6dnl             fixing cache/environment variable handling
     7dnl             adding checks for cygwin/egcs '\\'-bug
     8dnl             adding checks for ranlib/ar -s problem
     9dnl
    510dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    611dnl
    712
     13AC_DEFUN(RTEMS_GCC_PRINT,
     14[ case $host_os in
     15  *cygwin32*)
     16    dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
     17    dnl        Should be removed once cygwin/egcs reports '/' only
     18    $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e "s%\\\\%/%g" `
     19    ;;
     20  *)
     21    $1=`$CC_FOR_TARGET --print-prog-name=$2`
     22    ;;
     23  esac
     24])
     25
     26AC_DEFUN(RTEMS_PATH_TOOL,
     27[
     28AC_MSG_CHECKING([target's $2])
     29AC_CACHE_VAL(ac_cv_path_$1,:)
     30AC_MSG_RESULT([$ac_cv_path_$1])
     31
     32if test -n "$ac_cv_path_$1"; then
     33  dnl retrieve the value from the cache
     34  $1=$ac_cv_path_$1
     35else
     36  dnl the cache was not set
     37  if test -z "[$]$1" ; then
     38    if test "$rtems_cv_prog_gcc" = "yes"; then
     39      # We are using gcc, ask it about its tool
     40      # NOTE: Necessary if gcc was configured to use the target's
     41      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     42      RTEMS_GCC_PRINT($1,$2)
     43    fi
     44  else
     45    # The user set an environment variable.
     46    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     47    # will override the environment variable, which isn't what the user
     48    # intends
     49    AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
     50    case "[$]$1" in
     51    /*) # valid
     52      AC_MSG_RESULT("yes")
     53    ;;
     54    *)  # invalid for AC_PATH_PROG
     55      AC_MSG_RESULT("no")
     56      AC_MSG_ERROR([***]
     57        [Environment variable $1 should ether]
     58        [be unset (preferred) or contain an absolute path])
     59    ;;
     60    esac
     61  fi
     62
     63  AC_PATH_PROG($1,"$program_prefix"$2,$3)
     64fi
     65])
     66
    867AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
    968[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
    2069
    21 dnl check whether the tools exist
    22 dnl FIXME: What shall be done if they don't exist?
     70dnl FIXME: What shall be done if these tools are not available?
     71  RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
     72  RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
     73  RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
     74  RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
    2375
    24 dnl FIXME: This may fail if the compiler has not been recognized as gcc
    25 dnl       and uses tools with different names
    26 AC_PATH_PROG(AR_FOR_TARGET,"$program_prefix"ar,no)
    27 AC_PATH_PROG(AS_FOR_TARGET,"$program_prefix"as,no)
    28 AC_PATH_PROG(NM_FOR_TARGET,"$program_prefix"nm,no)
    29 AC_PATH_PROG(LD_FOR_TARGET,"$program_prefix"ld,no)
     76dnl special treatment of ranlib
     77  RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
     78  if test "$RANLIB_FOR_TARGET" = "no"; then
     79    # ranlib wasn't found; check if ar -s is available
     80    RTEMS_AR_FOR_TARGET_S
     81    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
     82      dnl override RANLIB_FOR_TARGET's cache
     83      ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
     84      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
     85    else
     86      AC_MSG_ERROR([***]
     87        [Can't figure out how to build a library index]
     88        [Nether ranlib nor ar -s seem to be available] )
     89    fi
     90  fi
    3091
    31 dnl NOTE: This is doubtful, but should not disturb all current rtems'
    32 dnl       targets (remark: solaris fakes ranlib!!)
    33 AC_PATH_PROG(RANLIB_FOR_TARGET,"$program_prefix"ranlib,no)
    34 
    35 dnl NOTE: These may not be available, if not using gnutools
    36 AC_PATH_PROG(OBJCOPY_FOR_TARGET,"$program_prefix"objcopy,no)
    37 AC_PATH_PROG(SIZE_FOR_TARGET,"$program_prefix"size,no)
     92dnl NOTE: These may not be available if not using gnutools
     93  RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
     94  RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
    3895])
  • aclocal/gcc-pipe.m4

    rd13b247 r98100d2  
    1212AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
    1313[
     14rtems_cv_gcc_pipe=no
     15if test "$rtems_cv_prog_gcc" = "yes"; then
    1416case "$host_os" in
    1517  cygwin32*)
    16     rtems_cv_gcc_pipe=no
    1718    ;;
    1819  *)
     
    2021    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
    2122      rtems_cv_gcc_pipe=yes
    22     else
    23       rtems_cv_gcc_pipe=no
    2423    fi
    2524    rm -f conftest*
    2625    ;;
    2726esac
     27fi
    2828])
    2929])
  • aclocal/gcc-specs.m4

    rd13b247 r98100d2  
    1010[AC_REQUIRE([RTEMS_PROG_CC])
    1111AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
    12 [touch confspec
    13 echo 'void f(){}' >conftest.c
    14 if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
    15   rtems_cv_gcc_specs=yes
    16 else
    17   rtems_cv_gcc_specs=no
     12[
     13rtems_cv_gcc_specs=no
     14if test "$rtems_cv_prog_gcc" = "yes"; then
     15  touch confspec
     16  echo 'void f(){}' >conftest.c
     17  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
     18    rtems_cv_gcc_specs=yes
     19  fi
    1820fi
    1921rm -f confspec conftest*
  • c/PROBLEMS

    rd13b247 r98100d2  
    5151    an ISR each millisecond and only call rtems_clock_tick every
    5252    so many ISRs.
     53
     54+  Cross-check configure --enable-* flags.
     55   + warn/refuse to configure when --enable-libcdir and
     56     --enable-gcc28 are given.
     57   + force --enable-libcdir when --disable-gcc28 is given
     58
  • c/build-tools/scripts/Makefile.in

    rd13b247 r98100d2  
    1818DESTDIR=$(PROJECT_RELEASE)/build-tools
    1919
    20 PGMS=install-if-change rcs-clean lock-directory unlock-directory rtems-glom search-id.sh
    21 
     20PGMS=install-if-change rcs-clean lock-directory unlock-directory \
     21  search-id.sh
    2222
    2323INSTALLED=$(PGMS:%=$(DESTDIR)/%)
  • c/build-tools/src/Makefile.in

    rd13b247 r98100d2  
    1111manext = 1
    1212mandir = @mandir@/man$(manext)
     13
     14# FIXME: $EXEEXT should be set in a central cfg-file used for native
     15#        compiling (e.g. gcc.cfg) instead of setting EXEEXE here.
     16EXEEXT=@EXEEXT@
    1317
    1418VPATH = @srcdir@
     
    2933OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
    3034
    31 PGMS=$(ARCH)/cklength $(ARCH)/eolstrip $(ARCH)/packhex $(ARCH)/unhex
     35PGMS=$(ARCH)/cklength$(EXEEXT) $(ARCH)/eolstrip$(EXEEXT) \
     36        $(ARCH)/packhex$(EXEEXT) $(ARCH)/unhex$(EXEEXT)
    3237
    3338include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
  • c/src/exec/score/tools/generic/size_rtems.in

    rd13b247 r98100d2  
    1 #!KSHELL -p
     1#!@KSH@ -p
    22#
    33#  size_rtems
  • c/src/lib/libbsp/i386/pc386/tools/bin2boot.c

    rd13b247 r98100d2  
    6868  char *dummy;
    6969
    70   if (arg[0] == '0')
     70  if (arg[0] == '0') {
    7171    if ((arg[1] == 'x') || (arg[1] == 'X'))  /* Hexadecimal */
    7272      return (DWord)strtol(arg, &dummy, 16);
    7373    else  /* Octal */
    7474      return (DWord)strtol(arg, &dummy, 8);
    75     else  /* Decimal */
     75  } else  /* Decimal */
    7676      return (DWord)strtol(arg, &dummy, 10);
    7777} /* getNumArg */
  • c/src/lib/libbsp/m68k/idp/console/console.c

    rd13b247 r98100d2  
    1717#include <ringbuf.h>
    1818
    19 Ring_buffer_t  Buffer[ 2 ];
     19Ring_buffer_t  Console_Buffer[ 2 ];
    2020
    2121rtems_isr C_Receive_ISR(rtems_vector_number vector);
     
    4040  rtems_status_code status;
    4141
    42   Ring_buffer_Initialize( &Buffer[ 0 ] );
    43   Ring_buffer_Initialize( &Buffer[ 1 ] );
     42  Ring_buffer_Initialize( &Console_Buffer[ 0 ] );
     43  Ring_buffer_Initialize( &Console_Buffer[ 1 ] );
    4444
    4545  init_pit();
     
    9292)
    9393{
    94   if ( Ring_buffer_Is_empty( &Buffer[ port ] ) )
     94  if ( Ring_buffer_Is_empty( &Console_Buffer[ port ] ) )
    9595    return FALSE;
    9696
    97   Ring_buffer_Remove_character( &Buffer[ port ], *ch );
     97  Ring_buffer_Remove_character( &Console_Buffer[ port ], *ch );
    9898  return TRUE;
    9999}
     
    115115)
    116116{
    117   if ( Ring_buffer_Is_empty( &Buffer[ port ] ) )
     117  if ( Ring_buffer_Is_empty( &Console_Buffer[ port ] ) )
    118118    return FALSE;
    119119
  • c/src/lib/libbsp/m68k/mvme162/console/console.c

    rd13b247 r98100d2  
    2626#include <ringbuf.h>
    2727
    28 Ring_buffer_t  Buffer[2];
     28Ring_buffer_t  Console_Buffer[2];
    2929
    3030/*
     
    4444  else return;
    4545   
    46   Ring_buffer_Add_character(&Buffer[port], ZREADD(port));
     46  Ring_buffer_Add_character(&Console_Buffer[port], ZREADD(port));
    4747 
    4848  if (ZREAD(port, 1) & 0x70) {    /* check error stat */
     
    6565
    6666  for (i = 0; i <= 1; i++) {
    67     Ring_buffer_Initialize( &Buffer[i] );
     67    Ring_buffer_Initialize( &Console_Buffer[i] );
    6868    ZWRITE(i, 2, SCC_VECTOR);
    6969    ZWRITE(i, 10, 0);
     
    114114rtems_boolean char_ready(int port, char *ch)
    115115{
    116   if ( Ring_buffer_Is_empty( &Buffer[port] ) )
     116  if ( Ring_buffer_Is_empty( &Console_Buffer[port] ) )
    117117    return FALSE;
    118118
    119   Ring_buffer_Remove_character( &Buffer[port], *ch );
     119  Ring_buffer_Remove_character( &Console_Buffer[port], *ch );
    120120 
    121121  return TRUE;
  • c/src/lib/wrapup/Makefile.in

    rd13b247 r98100d2  
    1414include $(RTEMS_ROOT)/make/lib.cfg
    1515 
    16 LIB=$(PROJECT_RELEASE)/lib/librtemsall.a
     16LIB=$(PROJECT_RELEASE)/lib/librtemsall${LIB_VARIANT}.a
    1717 
    1818SRCS=$(wildcard $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a) \
     
    2020     $(wildcard $(PROJECT_RELEASE)/lib/libposix$(LIB_VARIANT).a) \
    2121     $(wildcard $(PROJECT_RELEASE)/lib/libka9q$(LIB_VARIANT).a) \
     22     $(wildcard $(PROJECT_RELEASE)/lib/libcpu$(LIB_VARIANT).a) \
    2223     $(PROJECT_RELEASE)/lib/libcsupport$(LIB_VARIANT).a \
    2324     $(PROJECT_RELEASE)/lib/libmisc$(LIB_VARIANT).a \
     
    2526     $(wildcard $(PROJECT_RELEASE)/lib/libno-ctor$(LIB_VARIANT).a)
    2627 
    27 CLEAN_ADDITIONS +=
     28CLEAN_ADDITIONS += $(ARCH)/check
    2829CLOBBER_ADDITIONS +=
    2930 
    3031all:    $(ARCH) $(LIB)
    31  
    32 $(LIB):  $(SRCS)
    33         PROJECT_RELEASE=$(PROJECT_RELEASE) \
    34             $(PROJECT_RELEASE)/build-tools/rtems-glom \
    35                 -d $(PROJECT_RELEASE)/lib -v -V "$(LIB_VARIANT)" \
    36                 -a $(AR)
    37  
     32
    3833install:  all
    3934
     35$(ARCH)/check:: $(SRCS)
     36        @$(RM) $@; touch $@;
     37        @for f in $(SRCS); do \
     38          case $$f in \
     39          *.o)   echo " `basename $$f`" >> $@ \
     40            ;; \
     41          *.rel) echo " `basename $$f`" >> $@ \
     42            ;; \
     43          *.a) \
     44          ( list=`$(AR) t $$f`;\
     45            for i in $$list; do \
     46              if grep " $$i" $@; then \
     47                echo "ERROR -- $$i in multiple files"; exit 1; \
     48              fi;\
     49              echo " $$i" >> $@;\
     50            done; ) \
     51            ;; \
     52          esac; \
     53        done;
     54
     55$(LIB):: $(ARCH)/check
     56        @for f in $(SRCS); do \
     57          case $$f in \
     58          *.o) $(AR) ru $@ $$f \
     59            ;;\
     60          *.rel) $(AR) ru $@ $$f \
     61            ;;\
     62          *.a) \
     63            (cd $(ARCH); \
     64            list=`$(AR) t $$f`; \
     65            $(AR) x $$f $$list; $(AR) ru $@ $$list; \
     66            $(RM) $$list ;)\
     67            ;; \
     68          esac; \
     69        done;
     70        @$(RANLIB) $@
     71        @echo "*** Glommed $@"
  • c/src/make/README

    rd13b247 r98100d2  
    211211            personality modules specified by the customization file for:
    212212                compiler            ( make/compilers/??.cfg )
    213                 operating system    ( make/os/??.cfg )
    214213
    215214
     
    310309            a number of MAKE variables are automatically set and maintained by
    311310            the config files.
    312 
    313             CONFIG.$(HOST_ARCH).OS
    314                         -- full path of OS config file, set by
    315                            custom config file.
    316311
    317312            CONFIG.$(HOST_ARCH).CC
  • c/src/make/compilers/gcc-target-default.cfg

    rd13b247 r98100d2  
    44#  $Id$
    55#
    6 
    7 # names for C++ compilers.
    8 CXX=$(CC)
    9 CCC=$(CXX)
    106
    117CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
     
    4642# Used for embedded bsps
    4743# Ask gcc where it finds its own include files
    48 GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include)
     44GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include $(GCCSED))
    4945
    5046CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
     
    7773# default location of Standard C Library
    7874ifndef LIBC_LIBC
    79 LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a)
     75LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a $(GCCSED))
    8076endif
    8177
    8278ifndef LIBC_LIBM
    83 LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a)
     79LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a $(GCCSED))
    8480endif
    8581endif
     
    9490endif
    9591
    96 # debug flag; typically
     92# debug flag;
    9793CFLAGS_DEBUG_V+=-Wno-unused
    9894
     
    174170#
    175171# Command to convert a normal archive to one searchable by $(LD)
    176 # Not needed on SVR4
    177 #
    178 
    179 MKLIB=echo library is complete:
     172#
     173# NOTE: Obsolete, use $(RANLIB) instead, MKLIB may disappear soon
     174MKLIB=$(RANLIB)
    180175
    181176#
     
    192187
    193188${ARCH}/%.o: %.cc
    194         ${COMPILE.cc} -o $@ $<
    195 
    196 ${ARCH}/%.o: %.cpp
    197         ${COMPILE.cc} -o $@ $<
    198 
    199 ${ARCH}/%.o: %.cxx
    200189        ${COMPILE.cc} -o $@ $<
    201190
     
    273262
    274263ifndef LIBGCC
    275 LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
    276 endif
    277 
    278 LINK_OBJS=\
     264LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
     265endif
     266
     267#
     268# NOTE: a rule to link an rtems' application should look similar to this
     269#       (cf. "make-exe" in make/custom/*.cfg):
     270#
     271# gcc27:
     272# $(PGM): $(LINK_FILES)
     273#       $(LD) $(LDFLAGS) -o $@ $(LINK_OBJS) \
     274#       --start-group $(LIB_LIBS) --end-group
     275#
     276# gcc28:
     277# $(PGM): $(LINK_FILES)
     278#       $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LIB_LIBS)
     279#
     280
     281LINK_OBJS =\
    279282    $(CONSTRUCTOR) \
    280283    $(OBJS) \
    281284    $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
    282     $(LD_LIBS) \
    283285    $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA)
    284286
    285 LINK_LIBS=\
    286     $(LD_LIBS) \
    287     $(LIBC_EXTRA_LIBS)  \
    288     $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA) \
    289     $(LIBC_LIBM) $(LIBC_LIBC) $(LIBGCC)
    290 
    291 LINK_FILES=\
     287LINK_FILES =\
    292288    $(START_FILE) \
    293     $(LINK_OBJS) \
    294     $(LINK_LIBS)
     289    $(CONSTRUCTOR) \
     290    $(OBJS) \
     291    $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
     292    $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA) \
     293    $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
     294
     295ifeq ($(RTEMS_USE_GCC272),yes)
     296LINK_LIBS = $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
     297ifeq ($(RTEMS_CROSS_TARGET),yes)
     298# NOTE: add libc and libgcc only for embedded targets
     299#       LIBC_LIBM should not be needed by rtems itself.
     300# FIXME: If a BSP requires libm, its make/custom/*.cfg file should add
     301#        LIBC_LIBM to LINK_LIBS (untested)
     302LINK_LIBS += $(LIBC_LIBC) $(LIBGCC)
     303endif
     304endif
     305
     306LINK_LIBS += $(LD_LIBS)   
    295307
    296308#
  • c/src/make/host.cfg.in

    rd13b247 r98100d2  
    3838EGREP=@EGREP@
    3939
     40# FIXME: HACK for a bug in cygwin-hosted egcs which returns a mixture
     41#        of '\\' and '/' as path separators.
     42#        Should be removed as soon as this bug is fixed in egcs.
     43GCCSED = @GCCSED@
     44
    4045# ksh (or bash) is used by some shell scripts; ref build-tools/scripts/Makefile
    4146#
  • c/src/wrapup/Makefile.in

    rd13b247 r98100d2  
    1414include $(RTEMS_ROOT)/make/lib.cfg
    1515 
    16 LIB=$(PROJECT_RELEASE)/lib/librtemsall.a
     16LIB=$(PROJECT_RELEASE)/lib/librtemsall${LIB_VARIANT}.a
    1717 
    1818SRCS=$(wildcard $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a) \
     
    2020     $(wildcard $(PROJECT_RELEASE)/lib/libposix$(LIB_VARIANT).a) \
    2121     $(wildcard $(PROJECT_RELEASE)/lib/libka9q$(LIB_VARIANT).a) \
     22     $(wildcard $(PROJECT_RELEASE)/lib/libcpu$(LIB_VARIANT).a) \
    2223     $(PROJECT_RELEASE)/lib/libcsupport$(LIB_VARIANT).a \
    2324     $(PROJECT_RELEASE)/lib/libmisc$(LIB_VARIANT).a \
     
    2526     $(wildcard $(PROJECT_RELEASE)/lib/libno-ctor$(LIB_VARIANT).a)
    2627 
    27 CLEAN_ADDITIONS +=
     28CLEAN_ADDITIONS += $(ARCH)/check
    2829CLOBBER_ADDITIONS +=
    2930 
    3031all:    $(ARCH) $(LIB)
    31  
    32 $(LIB):  $(SRCS)
    33         PROJECT_RELEASE=$(PROJECT_RELEASE) \
    34             $(PROJECT_RELEASE)/build-tools/rtems-glom \
    35                 -d $(PROJECT_RELEASE)/lib -v -V "$(LIB_VARIANT)" \
    36                 -a $(AR)
    37  
     32
    3833install:  all
    3934
     35$(ARCH)/check:: $(SRCS)
     36        @$(RM) $@; touch $@;
     37        @for f in $(SRCS); do \
     38          case $$f in \
     39          *.o)   echo " `basename $$f`" >> $@ \
     40            ;; \
     41          *.rel) echo " `basename $$f`" >> $@ \
     42            ;; \
     43          *.a) \
     44          ( list=`$(AR) t $$f`;\
     45            for i in $$list; do \
     46              if grep " $$i" $@; then \
     47                echo "ERROR -- $$i in multiple files"; exit 1; \
     48              fi;\
     49              echo " $$i" >> $@;\
     50            done; ) \
     51            ;; \
     52          esac; \
     53        done;
     54
     55$(LIB):: $(ARCH)/check
     56        @for f in $(SRCS); do \
     57          case $$f in \
     58          *.o) $(AR) ru $@ $$f \
     59            ;;\
     60          *.rel) $(AR) ru $@ $$f \
     61            ;;\
     62          *.a) \
     63            (cd $(ARCH); \
     64            list=`$(AR) t $$f`; \
     65            $(AR) x $$f $$list; $(AR) ru $@ $$list; \
     66            $(RM) $$list ;)\
     67            ;; \
     68          esac; \
     69        done;
     70        @$(RANLIB) $@
     71        @echo "*** Glommed $@"
  • configure

    rd13b247 r98100d2  
    13221322        RTEMS_HAS_POSIX_API=no
    13231323        ;;
    1324   i[3456]86-unknown-freebsd2.[12]*) # unix "simulator" port
     1324  i[3456]86-*freebsd2*) # unix "simulator" port
    13251325        target_cpu=unix
    13261326        RTEMS_HOST=FreeBSD
     
    15361536  echo $ac_n "(cached) $ac_c" 1>&6
    15371537else
     1538 
     1539rtems_cv_gcc_specs=no
     1540if test "$rtems_cv_prog_gcc" = "yes"; then
    15381541  touch confspec
    1539 echo 'void f(){}' >conftest.c
    1540 if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
    1541   rtems_cv_gcc_specs=yes
    1542 else
    1543   rtems_cv_gcc_specs=no
     1542  echo 'void f(){}' >conftest.c
     1543  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
     1544    rtems_cv_gcc_specs=yes
     1545  fi
    15441546fi
    15451547rm -f confspec conftest*
     
    15511553
    15521554echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
    1553 echo "configure:1554: checking whether $CC_FOR_TARGET accepts --pipe" >&5
     1555echo "configure:1556: checking whether $CC_FOR_TARGET accepts --pipe" >&5
    15541556if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
    15551557  echo $ac_n "(cached) $ac_c" 1>&6
    15561558else
    15571559 
     1560rtems_cv_gcc_pipe=no
     1561if test "$rtems_cv_prog_gcc" = "yes"; then
    15581562case "$host_os" in
    15591563  cygwin32*)
    1560     rtems_cv_gcc_pipe=no
    15611564    ;;
    15621565  *)
     
    15641567    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
    15651568      rtems_cv_gcc_pipe=yes
    1566     else
    1567       rtems_cv_gcc_pipe=no
    15681569    fi
    15691570    rm -f conftest*
    15701571    ;;
    15711572esac
     1573fi
    15721574
    15731575fi
     
    15921594set dummy $ac_prog; ac_word=$2
    15931595echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1594 echo "configure:1595: checking for $ac_word" >&5
     1596echo "configure:1597: checking for $ac_word" >&5
    15951597if eval "test \"`echo '$''{'ac_cv_path_CXX_FOR_TARGET'+set}'`\" = set"; then
    15961598  echo $ac_n "(cached) $ac_c" 1>&6
     
    16321634
    16331635echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    1634 echo "configure:1635: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
     1636echo "configure:1637: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
    16351637
    16361638ac_ext=C
     
    16421644
    16431645cat > conftest.$ac_ext <<EOF
    1644 #line 1645 "configure"
     1646#line 1647 "configure"
    16451647#include "confdefs.h"
    16461648main(){return(0);}
    16471649EOF
    1648 if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     1650if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    16491651  ac_cv_prog_cxx_works=yes
    16501652  # If we can't run a trivial program, we are probably using a cross compiler.
     
    16721674fi
    16731675echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    1674 echo "configure:1675: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
     1676echo "configure:1677: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
    16751677echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
    16761678cross_compiling=$ac_cv_prog_cxx_cross
    16771679
    16781680echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
    1679 echo "configure:1680: checking whether we are using GNU C++" >&5
     1681echo "configure:1682: checking whether we are using GNU C++" >&5
    16801682if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
    16811683  echo $ac_n "(cached) $ac_c" 1>&6
     
    16861688#endif
    16871689EOF
    1688 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     1690if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    16891691  ac_cv_prog_gxx=yes
    16901692else
     
    17011703  CXXFLAGS=
    17021704  echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
    1703 echo "configure:1704: checking whether ${CXX-g++} accepts -g" >&5
     1705echo "configure:1706: checking whether ${CXX-g++} accepts -g" >&5
    17041706if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
    17051707  echo $ac_n "(cached) $ac_c" 1>&6
     
    17521754fi
    17531755
    1754 if test "$rtems_cv_prog_gcc" = "yes" ; then
    1755         AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
    1756   AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
    1757   LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
    1758   NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
    1759   RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
    1760 fi
    1761 
    1762 
    1763 # Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
     1756
     1757 
     1758echo $ac_n "checking target's ar""... $ac_c" 1>&6
     1759echo "configure:1760: checking target's ar" >&5
     1760if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
     1761  echo $ac_n "(cached) $ac_c" 1>&6
     1762else
     1763  :
     1764fi
     1765
     1766echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
     1767
     1768if test -n "$ac_cv_path_AR_FOR_TARGET"; then
     1769    AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
     1770else
     1771    if test -z "$AR_FOR_TARGET" ; then
     1772    if test "$rtems_cv_prog_gcc" = "yes"; then
     1773      # We are using gcc, ask it about its tool
     1774      # NOTE: Necessary if gcc was configured to use the target's
     1775      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     1776       case $host_os in
     1777  *cygwin32*)
     1778            AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar | sed -e "s%\\\\%/%g" `
     1779    ;;
     1780  *)
     1781    AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
     1782    ;;
     1783  esac
     1784
     1785    fi
     1786  else
     1787    # The user set an environment variable.
     1788    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     1789    # will override the environment variable, which isn't what the user
     1790    # intends
     1791    echo $ac_n "checking whether environment variable AR_FOR_TARGET is an absolute path""... $ac_c" 1>&6
     1792echo "configure:1793: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
     1793    case "$AR_FOR_TARGET" in
     1794    /*) # valid
     1795      echo "$ac_t"""yes"" 1>&6
     1796    ;;
     1797    *)  # invalid for AC_PATH_PROG
     1798      echo "$ac_t"""no"" 1>&6
     1799      { echo "configure: error: ***
     1800        Environment variable AR_FOR_TARGET should ether
     1801        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
     1802    ;;
     1803    esac
     1804  fi
     1805
     1806  # Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
    17641807set dummy "$program_prefix"ar; ac_word=$2
    17651808echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1766 echo "configure:1767: checking for $ac_word" >&5
     1809echo "configure:1810: checking for $ac_word" >&5
    17671810if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
    17681811  echo $ac_n "(cached) $ac_c" 1>&6
     
    17931836fi
    17941837
    1795 # Extract the first word of ""$program_prefix"as", so it can be a program name with args.
     1838fi
     1839
     1840 
     1841echo $ac_n "checking target's as""... $ac_c" 1>&6
     1842echo "configure:1843: checking target's as" >&5
     1843if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
     1844  echo $ac_n "(cached) $ac_c" 1>&6
     1845else
     1846  :
     1847fi
     1848
     1849echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
     1850
     1851if test -n "$ac_cv_path_AS_FOR_TARGET"; then
     1852    AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
     1853else
     1854    if test -z "$AS_FOR_TARGET" ; then
     1855    if test "$rtems_cv_prog_gcc" = "yes"; then
     1856      # We are using gcc, ask it about its tool
     1857      # NOTE: Necessary if gcc was configured to use the target's
     1858      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     1859       case $host_os in
     1860  *cygwin32*)
     1861            AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as | sed -e "s%\\\\%/%g" `
     1862    ;;
     1863  *)
     1864    AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
     1865    ;;
     1866  esac
     1867
     1868    fi
     1869  else
     1870    # The user set an environment variable.
     1871    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     1872    # will override the environment variable, which isn't what the user
     1873    # intends
     1874    echo $ac_n "checking whether environment variable AS_FOR_TARGET is an absolute path""... $ac_c" 1>&6
     1875echo "configure:1876: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
     1876    case "$AS_FOR_TARGET" in
     1877    /*) # valid
     1878      echo "$ac_t"""yes"" 1>&6
     1879    ;;
     1880    *)  # invalid for AC_PATH_PROG
     1881      echo "$ac_t"""no"" 1>&6
     1882      { echo "configure: error: ***
     1883        Environment variable AS_FOR_TARGET should ether
     1884        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
     1885    ;;
     1886    esac
     1887  fi
     1888
     1889  # Extract the first word of ""$program_prefix"as", so it can be a program name with args.
    17961890set dummy "$program_prefix"as; ac_word=$2
    17971891echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1798 echo "configure:1799: checking for $ac_word" >&5
     1892echo "configure:1893: checking for $ac_word" >&5
    17991893if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
    18001894  echo $ac_n "(cached) $ac_c" 1>&6
     
    18251919fi
    18261920
    1827 # Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
     1921fi
     1922
     1923 
     1924echo $ac_n "checking target's ld""... $ac_c" 1>&6
     1925echo "configure:1926: checking target's ld" >&5
     1926if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
     1927  echo $ac_n "(cached) $ac_c" 1>&6
     1928else
     1929  :
     1930fi
     1931
     1932echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
     1933
     1934if test -n "$ac_cv_path_LD_FOR_TARGET"; then
     1935    LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
     1936else
     1937    if test -z "$LD_FOR_TARGET" ; then
     1938    if test "$rtems_cv_prog_gcc" = "yes"; then
     1939      # We are using gcc, ask it about its tool
     1940      # NOTE: Necessary if gcc was configured to use the target's
     1941      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     1942       case $host_os in
     1943  *cygwin32*)
     1944            LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld | sed -e "s%\\\\%/%g" `
     1945    ;;
     1946  *)
     1947    LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
     1948    ;;
     1949  esac
     1950
     1951    fi
     1952  else
     1953    # The user set an environment variable.
     1954    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     1955    # will override the environment variable, which isn't what the user
     1956    # intends
     1957    echo $ac_n "checking whether environment variable LD_FOR_TARGET is an absolute path""... $ac_c" 1>&6
     1958echo "configure:1959: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
     1959    case "$LD_FOR_TARGET" in
     1960    /*) # valid
     1961      echo "$ac_t"""yes"" 1>&6
     1962    ;;
     1963    *)  # invalid for AC_PATH_PROG
     1964      echo "$ac_t"""no"" 1>&6
     1965      { echo "configure: error: ***
     1966        Environment variable LD_FOR_TARGET should ether
     1967        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
     1968    ;;
     1969    esac
     1970  fi
     1971
     1972  # Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
     1973set dummy "$program_prefix"ld; ac_word=$2
     1974echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     1975echo "configure:1976: checking for $ac_word" >&5
     1976if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
     1977  echo $ac_n "(cached) $ac_c" 1>&6
     1978else
     1979  case "$LD_FOR_TARGET" in
     1980  /*)
     1981  ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
     1982  ;;
     1983  *)
     1984  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
     1985  for ac_dir in $PATH; do
     1986    test -z "$ac_dir" && ac_dir=.
     1987    if test -f $ac_dir/$ac_word; then
     1988      ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
     1989      break
     1990    fi
     1991  done
     1992  IFS="$ac_save_ifs"
     1993  test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no"
     1994  ;;
     1995esac
     1996fi
     1997LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
     1998if test -n "$LD_FOR_TARGET"; then
     1999  echo "$ac_t""$LD_FOR_TARGET" 1>&6
     2000else
     2001  echo "$ac_t""no" 1>&6
     2002fi
     2003
     2004fi
     2005
     2006 
     2007echo $ac_n "checking target's nm""... $ac_c" 1>&6
     2008echo "configure:2009: checking target's nm" >&5
     2009if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
     2010  echo $ac_n "(cached) $ac_c" 1>&6
     2011else
     2012  :
     2013fi
     2014
     2015echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
     2016
     2017if test -n "$ac_cv_path_NM_FOR_TARGET"; then
     2018    NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
     2019else
     2020    if test -z "$NM_FOR_TARGET" ; then
     2021    if test "$rtems_cv_prog_gcc" = "yes"; then
     2022      # We are using gcc, ask it about its tool
     2023      # NOTE: Necessary if gcc was configured to use the target's
     2024      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     2025       case $host_os in
     2026  *cygwin32*)
     2027            NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm | sed -e "s%\\\\%/%g" `
     2028    ;;
     2029  *)
     2030    NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
     2031    ;;
     2032  esac
     2033
     2034    fi
     2035  else
     2036    # The user set an environment variable.
     2037    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     2038    # will override the environment variable, which isn't what the user
     2039    # intends
     2040    echo $ac_n "checking whether environment variable NM_FOR_TARGET is an absolute path""... $ac_c" 1>&6
     2041echo "configure:2042: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
     2042    case "$NM_FOR_TARGET" in
     2043    /*) # valid
     2044      echo "$ac_t"""yes"" 1>&6
     2045    ;;
     2046    *)  # invalid for AC_PATH_PROG
     2047      echo "$ac_t"""no"" 1>&6
     2048      { echo "configure: error: ***
     2049        Environment variable NM_FOR_TARGET should ether
     2050        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
     2051    ;;
     2052    esac
     2053  fi
     2054
     2055  # Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
    18282056set dummy "$program_prefix"nm; ac_word=$2
    18292057echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1830 echo "configure:1831: checking for $ac_word" >&5
     2058echo "configure:2059: checking for $ac_word" >&5
    18312059if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
    18322060  echo $ac_n "(cached) $ac_c" 1>&6
     
    18572085fi
    18582086
    1859 # Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
    1860 set dummy "$program_prefix"ld; ac_word=$2
    1861 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1862 echo "configure:1863: checking for $ac_word" >&5
    1863 if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
    1864   echo $ac_n "(cached) $ac_c" 1>&6
    1865 else
    1866   case "$LD_FOR_TARGET" in
    1867   /*)
    1868   ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
    1869   ;;
     2087fi
     2088
     2089
     2090 
     2091echo $ac_n "checking target's ranlib""... $ac_c" 1>&6
     2092echo "configure:2093: checking target's ranlib" >&5
     2093if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
     2094  echo $ac_n "(cached) $ac_c" 1>&6
     2095else
     2096  :
     2097fi
     2098
     2099echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
     2100
     2101if test -n "$ac_cv_path_RANLIB_FOR_TARGET"; then
     2102    RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
     2103else
     2104    if test -z "$RANLIB_FOR_TARGET" ; then
     2105    if test "$rtems_cv_prog_gcc" = "yes"; then
     2106      # We are using gcc, ask it about its tool
     2107      # NOTE: Necessary if gcc was configured to use the target's
     2108      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     2109       case $host_os in
     2110  *cygwin32*)
     2111            RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib | sed -e "s%\\\\%/%g" `
     2112    ;;
    18702113  *)
    1871   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
    1872   for ac_dir in $PATH; do
    1873     test -z "$ac_dir" && ac_dir=.
    1874     if test -f $ac_dir/$ac_word; then
    1875       ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
    1876       break
    1877     fi
    1878   done
    1879   IFS="$ac_save_ifs"
    1880   test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no"
    1881   ;;
    1882 esac
    1883 fi
    1884 LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
    1885 if test -n "$LD_FOR_TARGET"; then
    1886   echo "$ac_t""$LD_FOR_TARGET" 1>&6
    1887 else
    1888   echo "$ac_t""no" 1>&6
    1889 fi
    1890 
    1891 
    1892 # Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
     2114    RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
     2115    ;;
     2116  esac
     2117
     2118    fi
     2119  else
     2120    # The user set an environment variable.
     2121    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     2122    # will override the environment variable, which isn't what the user
     2123    # intends
     2124    echo $ac_n "checking whether environment variable RANLIB_FOR_TARGET is an absolute path""... $ac_c" 1>&6
     2125echo "configure:2126: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
     2126    case "$RANLIB_FOR_TARGET" in
     2127    /*) # valid
     2128      echo "$ac_t"""yes"" 1>&6
     2129    ;;
     2130    *)  # invalid for AC_PATH_PROG
     2131      echo "$ac_t"""no"" 1>&6
     2132      { echo "configure: error: ***
     2133        Environment variable RANLIB_FOR_TARGET should ether
     2134        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
     2135    ;;
     2136    esac
     2137  fi
     2138
     2139  # Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
    18932140set dummy "$program_prefix"ranlib; ac_word=$2
    18942141echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1895 echo "configure:1896: checking for $ac_word" >&5
     2142echo "configure:2143: checking for $ac_word" >&5
    18962143if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
    18972144  echo $ac_n "(cached) $ac_c" 1>&6
     
    19222169fi
    19232170
    1924 
    1925 # Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
     2171fi
     2172
     2173  if test "$RANLIB_FOR_TARGET" = "no"; then
     2174    # ranlib wasn't found; check if ar -s is available
     2175   
     2176echo $ac_n "checking whether $AR_FOR_TARGET -s works""... $ac_c" 1>&6
     2177echo "configure:2178: checking whether $AR_FOR_TARGET -s works" >&5
     2178if eval "test \"`echo '$''{'rtems_cv_AR_FOR_TARGET_S'+set}'`\" = set"; then
     2179  echo $ac_n "(cached) $ac_c" 1>&6
     2180else
     2181 
     2182cat > conftest.$ac_ext <<EOF
     2183int foo( int b )
     2184{ return b; }
     2185EOF
     2186if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:2187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
     2187  && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:2188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
     2188  && test -s conftest.a ; \
     2189then
     2190  rtems_cv_AR_FOR_TARGET_S="yes"
     2191else
     2192  rtems_cv_AR_FOR_TARGET_S="no"
     2193fi
     2194  rm -f conftest*
     2195
     2196fi
     2197
     2198echo "$ac_t""$rtems_cv_AR_FOR_TARGET_S" 1>&6
     2199
     2200    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
     2201            ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
     2202      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
     2203    else
     2204      { echo "configure: error: ***
     2205        Can't figure out how to build a library index
     2206        Nether ranlib nor ar -s seem to be available " 1>&2; exit 1; }
     2207    fi
     2208  fi
     2209
     2210 
     2211echo $ac_n "checking target's objcopy""... $ac_c" 1>&6
     2212echo "configure:2213: checking target's objcopy" >&5
     2213if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
     2214  echo $ac_n "(cached) $ac_c" 1>&6
     2215else
     2216  :
     2217fi
     2218
     2219echo "$ac_t""$ac_cv_path_OBJCOPY_FOR_TARGET" 1>&6
     2220
     2221if test -n "$ac_cv_path_OBJCOPY_FOR_TARGET"; then
     2222    OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
     2223else
     2224    if test -z "$OBJCOPY_FOR_TARGET" ; then
     2225    if test "$rtems_cv_prog_gcc" = "yes"; then
     2226      # We are using gcc, ask it about its tool
     2227      # NOTE: Necessary if gcc was configured to use the target's
     2228      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     2229       case $host_os in
     2230  *cygwin32*)
     2231            OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy | sed -e "s%\\\\%/%g" `
     2232    ;;
     2233  *)
     2234    OBJCOPY_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=objcopy`
     2235    ;;
     2236  esac
     2237
     2238    fi
     2239  else
     2240    # The user set an environment variable.
     2241    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     2242    # will override the environment variable, which isn't what the user
     2243    # intends
     2244    echo $ac_n "checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path""... $ac_c" 1>&6
     2245echo "configure:2246: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
     2246    case "$OBJCOPY_FOR_TARGET" in
     2247    /*) # valid
     2248      echo "$ac_t"""yes"" 1>&6
     2249    ;;
     2250    *)  # invalid for AC_PATH_PROG
     2251      echo "$ac_t"""no"" 1>&6
     2252      { echo "configure: error: ***
     2253        Environment variable OBJCOPY_FOR_TARGET should ether
     2254        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
     2255    ;;
     2256    esac
     2257  fi
     2258
     2259  # Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
    19262260set dummy "$program_prefix"objcopy; ac_word=$2
    19272261echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1928 echo "configure:1929: checking for $ac_word" >&5
     2262echo "configure:2263: checking for $ac_word" >&5
    19292263if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
    19302264  echo $ac_n "(cached) $ac_c" 1>&6
     
    19552289fi
    19562290
    1957 # Extract the first word of ""$program_prefix"size", so it can be a program name with args.
     2291fi
     2292
     2293 
     2294echo $ac_n "checking target's size""... $ac_c" 1>&6
     2295echo "configure:2296: checking target's size" >&5
     2296if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
     2297  echo $ac_n "(cached) $ac_c" 1>&6
     2298else
     2299  :
     2300fi
     2301
     2302echo "$ac_t""$ac_cv_path_SIZE_FOR_TARGET" 1>&6
     2303
     2304if test -n "$ac_cv_path_SIZE_FOR_TARGET"; then
     2305    SIZE_FOR_TARGET=$ac_cv_path_SIZE_FOR_TARGET
     2306else
     2307    if test -z "$SIZE_FOR_TARGET" ; then
     2308    if test "$rtems_cv_prog_gcc" = "yes"; then
     2309      # We are using gcc, ask it about its tool
     2310      # NOTE: Necessary if gcc was configured to use the target's
     2311      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     2312       case $host_os in
     2313  *cygwin32*)
     2314            SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size | sed -e "s%\\\\%/%g" `
     2315    ;;
     2316  *)
     2317    SIZE_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=size`
     2318    ;;
     2319  esac
     2320
     2321    fi
     2322  else
     2323    # The user set an environment variable.
     2324    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     2325    # will override the environment variable, which isn't what the user
     2326    # intends
     2327    echo $ac_n "checking whether environment variable SIZE_FOR_TARGET is an absolute path""... $ac_c" 1>&6
     2328echo "configure:2329: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
     2329    case "$SIZE_FOR_TARGET" in
     2330    /*) # valid
     2331      echo "$ac_t"""yes"" 1>&6
     2332    ;;
     2333    *)  # invalid for AC_PATH_PROG
     2334      echo "$ac_t"""no"" 1>&6
     2335      { echo "configure: error: ***
     2336        Environment variable SIZE_FOR_TARGET should ether
     2337        be unset (preferred) or contain an absolute path" 1>&2; exit 1; }
     2338    ;;
     2339    esac
     2340  fi
     2341
     2342  # Extract the first word of ""$program_prefix"size", so it can be a program name with args.
    19582343set dummy "$program_prefix"size; ac_word=$2
    19592344echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1960 echo "configure:1961: checking for $ac_word" >&5
     2345echo "configure:2346: checking for $ac_word" >&5
    19612346if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
    19622347  echo $ac_n "(cached) $ac_c" 1>&6
     
    19872372fi
    19882373
     2374fi
     2375
    19892376
    19902377
     
    19922379set dummy gcc; ac_word=$2
    19932380echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1994 echo "configure:1995: checking for $ac_word" >&5
     2381echo "configure:2382: checking for $ac_word" >&5
    19952382if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    19962383  echo $ac_n "(cached) $ac_c" 1>&6
     
    20212408set dummy cc; ac_word=$2
    20222409echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2023 echo "configure:2024: checking for $ac_word" >&5
     2410echo "configure:2411: checking for $ac_word" >&5
    20242411if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    20252412  echo $ac_n "(cached) $ac_c" 1>&6
     
    20692456
    20702457echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    2071 echo "configure:2072: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     2458echo "configure:2459: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    20722459
    20732460ac_ext=c
     
    20792466
    20802467cat > conftest.$ac_ext <<EOF
    2081 #line 2082 "configure"
     2468#line 2469 "configure"
    20822469#include "confdefs.h"
    20832470main(){return(0);}
    20842471EOF
    2085 if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     2472if { (eval echo configure:2473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    20862473  ac_cv_prog_cc_works=yes
    20872474  # If we can't run a trivial program, we are probably using a cross compiler.
     
    21032490fi
    21042491echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    2105 echo "configure:2106: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     2492echo "configure:2493: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    21062493echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    21072494cross_compiling=$ac_cv_prog_cc_cross
    21082495
    21092496echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    2110 echo "configure:2111: checking whether we are using GNU C" >&5
     2497echo "configure:2498: checking whether we are using GNU C" >&5
    21112498if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    21122499  echo $ac_n "(cached) $ac_c" 1>&6
     
    21172504#endif
    21182505EOF
    2119 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     2506if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    21202507  ac_cv_prog_gcc=yes
    21212508else
     
    21322519  CFLAGS=
    21332520  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    2134 echo "configure:2135: checking whether ${CC-cc} accepts -g" >&5
     2521echo "configure:2522: checking whether ${CC-cc} accepts -g" >&5
    21352522if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    21362523  echo $ac_n "(cached) $ac_c" 1>&6
     
    21602547
    21612548
     2549echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
     2550echo "configure:2551: checking for Cygwin32 environment" >&5
     2551if eval "test \"`echo '$''{'rtems_cv_cygwin32'+set}'`\" = set"; then
     2552  echo $ac_n "(cached) $ac_c" 1>&6
     2553else
     2554  cat > conftest.$ac_ext <<EOF
     2555#line 2556 "configure"
     2556#include "confdefs.h"
     2557
     2558int main() {
     2559return __CYGWIN32__;
     2560; return 0; }
     2561EOF
     2562if { (eval echo configure:2563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2563  rm -rf conftest*
     2564  rtems_cv_cygwin32=yes
     2565else
     2566  echo "configure: failed program was:" >&5
     2567  cat conftest.$ac_ext >&5
     2568  rm -rf conftest*
     2569  rtems_cv_cygwin32=no
     2570fi
     2571rm -f conftest*
     2572rm -f conftest*
     2573fi
     2574
     2575echo "$ac_t""$rtems_cv_cygwin32" 1>&6
     2576CYGWIN32=
     2577test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes
     2578
     2579echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
     2580echo "configure:2581: checking for executable suffix" >&5
     2581if eval "test \"`echo '$''{'rtems_cv_exeext'+set}'`\" = set"; then
     2582  echo $ac_n "(cached) $ac_c" 1>&6
     2583else
     2584  if test "$CYGWIN32" = yes; then
     2585rtems_cv_exeext=.exe
     2586else
     2587cat > rtems_c_test.c << 'EOF'
     2588int main() {
     2589/* Nothing needed here */
     2590}
     2591EOF
     2592${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5
     2593rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//`
     2594rm -f rtems_c_test*
     2595fi
     2596
     2597test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no
     2598fi
     2599EXEEXT=""
     2600test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext}
     2601echo "$ac_t""${rtems_cv_exeext}" 1>&6
     2602
     2603
     2604case $host_os in
     2605*cygwin32*)     GCCSED="| sed 's%\\\\%/%g'" ;;
     2606*) ;;
     2607esac
     2608
     2609
    21622610for ac_func in strerror
    21632611do
    21642612echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    2165 echo "configure:2166: checking for $ac_func" >&5
     2613echo "configure:2614: checking for $ac_func" >&5
    21662614if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
    21672615  echo $ac_n "(cached) $ac_c" 1>&6
    21682616else
    21692617  cat > conftest.$ac_ext <<EOF
    2170 #line 2171 "configure"
     2618#line 2619 "configure"
    21712619#include "confdefs.h"
    21722620/* System header to define __stub macros and hopefully few prototypes,
     
    21912639; return 0; }
    21922640EOF
    2193 if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     2641if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    21942642  rm -rf conftest*
    21952643  eval "ac_cv_func_$ac_func=yes"
     
    22192667
    22202668echo $ac_n "checking for Makefile.in in c/src/exec/score/tools/$target_cpu""... $ac_c" 1>&6
    2221 echo "configure:2222: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
     2669echo "configure:2670: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
    22222670if test -d $srcdir/c/src/exec/score/tools/$target_cpu; then
    22232671  rtems_av_save_dir=`pwd`;
     
    22342682
    22352683echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6
    2236 echo "configure:2237: checking for Makefile.in in c/src/exec/rtems" >&5
     2684echo "configure:2685: checking for Makefile.in in c/src/exec/rtems" >&5
    22372685if test -d $srcdir/c/src/exec/rtems; then
    22382686  rtems_av_save_dir=`pwd`;
     
    22492697
    22502698echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6
    2251 echo "configure:2252: checking for Makefile.in in c/src/exec/sapi" >&5
     2699echo "configure:2700: checking for Makefile.in in c/src/exec/sapi" >&5
    22522700if test -d $srcdir/c/src/exec/sapi; then
    22532701  rtems_av_save_dir=`pwd`;
     
    22662714 
    22672715echo $ac_n "checking for Makefile.in in c/src/exec/posix""... $ac_c" 1>&6
    2268 echo "configure:2269: checking for Makefile.in in c/src/exec/posix" >&5
     2716echo "configure:2717: checking for Makefile.in in c/src/exec/posix" >&5
    22692717if test -d $srcdir/c/src/exec/posix; then
    22702718  rtems_av_save_dir=`pwd`;
     
    22882736  if test -z "$rtems_bsp"; then
    22892737    echo $ac_n "checking for bsps""... $ac_c" 1>&6
    2290 echo "configure:2291: checking for bsps" >&5
     2738echo "configure:2739: checking for bsps" >&5
    22912739    files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
    22922740    for file in $files; do
     
    23432791       
    23442792echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir""... $ac_c" 1>&6
    2345 echo "configure:2346: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir" >&5
     2793echo "configure:2794: checking for Makefile.in in c/src/lib/libbsp/$bspcpudir$bspdir" >&5
    23462794if test -d $srcdir/c/src/lib/libbsp/$bspcpudir$bspdir; then
    23472795  rtems_av_save_dir=`pwd`;
     
    23662814
    23672815echo $ac_n "checking for Makefile.in in c/src/lib/libcpu/$target_cpu""... $ac_c" 1>&6
    2368 echo "configure:2369: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
     2816echo "configure:2817: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
    23692817if test -d $srcdir/c/src/lib/libcpu/$target_cpu; then
    23702818  rtems_av_save_dir=`pwd`;
     
    23832831 
    23842832echo $ac_n "checking for Makefile.in in c/src/lib/start/$target_cpu""... $ac_c" 1>&6
    2385 echo "configure:2386: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
     2833echo "configure:2834: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
    23862834if test -d $srcdir/c/src/lib/start/$target_cpu; then
    23872835  rtems_av_save_dir=`pwd`;
     
    24252873# If the tests are enabled, then find all the test suite Makefiles
    24262874echo $ac_n "checking if the test suites are enabled? ""... $ac_c" 1>&6
    2427 echo "configure:2428: checking if the test suites are enabled? " >&5
     2875echo "configure:2876: checking if the test suites are enabled? " >&5
    24282876tests_enabled=yes
    24292877# Check whether --enable-tests or --disable-tests was given.
     
    24442892
    24452893echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6
    2446 echo "configure:2447: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
     2894echo "configure:2895: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
    24472895if test -d $srcdir/c/src/tests/tools/$target_cpu; then
    24482896  rtems_av_save_dir=`pwd`;
     
    24612909   
    24622910echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6
    2463 echo "configure:2464: checking for Makefile.in in c/src/tests/libtests" >&5
     2911echo "configure:2912: checking for Makefile.in in c/src/tests/libtests" >&5
    24642912if test -d $srcdir/c/src/tests/libtests; then
    24652913  rtems_av_save_dir=`pwd`;
     
    24762924   
    24772925echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6
    2478 echo "configure:2479: checking for Makefile.in in c/src/tests/sptests" >&5
     2926echo "configure:2927: checking for Makefile.in in c/src/tests/sptests" >&5
    24792927if test -d $srcdir/c/src/tests/sptests; then
    24802928  rtems_av_save_dir=`pwd`;
     
    24912939   
    24922940echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6
    2493 echo "configure:2494: checking for Makefile.in in c/src/tests/tmtests" >&5
     2941echo "configure:2942: checking for Makefile.in in c/src/tests/tmtests" >&5
    24942942if test -d $srcdir/c/src/tests/tmtests; then
    24952943  rtems_av_save_dir=`pwd`;
     
    25062954   
    25072955echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6
    2508 echo "configure:2509: checking for Makefile.in in c/src/tests/mptests" >&5
     2956echo "configure:2957: checking for Makefile.in in c/src/tests/mptests" >&5
    25092957if test -d $srcdir/c/src/tests/mptests; then
    25102958  rtems_av_save_dir=`pwd`;
     
    25222970     
    25232971echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6
    2524 echo "configure:2525: checking for Makefile.in in c/src/tests/psxtests" >&5
     2972echo "configure:2973: checking for Makefile.in in c/src/tests/psxtests" >&5
    25252973if test -d $srcdir/c/src/tests/psxtests; then
    25262974  rtems_av_save_dir=`pwd`;
     
    25402988# If the HWAPI is enabled, the find the HWAPI Makefiles
    25412989echo $ac_n "checking if the HWAPI is enabled? ""... $ac_c" 1>&6
    2542 echo "configure:2543: checking if the HWAPI is enabled? " >&5
     2990echo "configure:2991: checking if the HWAPI is enabled? " >&5
    25432991# Check whether --enable-hwapi or --disable-hwapi was given.
    25442992if test "${enable_hwapi+set}" = set; then
     
    25512999           
    25523000echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6
    2553 echo "configure:2554: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
     3001echo "configure:3002: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
    25543002if test -d $srcdir/c/src/lib/libhwapi/analog; then
    25553003  rtems_av_save_dir=`pwd`;
     
    25663014           
    25673015echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6
    2568 echo "configure:2569: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
     3016echo "configure:3017: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
    25693017if test -d $srcdir/c/src/lib/libhwapi/discrete; then
    25703018  rtems_av_save_dir=`pwd`;
     
    25813029           
    25823030echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6
    2583 echo "configure:2584: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
     3031echo "configure:3032: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
    25843032if test -d $srcdir/c/src/lib/libhwapi/drivers; then
    25853033  rtems_av_save_dir=`pwd`;
     
    25963044           
    25973045echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6
    2598 echo "configure:2599: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
     3046echo "configure:3047: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
    25993047if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then
    26003048  rtems_av_save_dir=`pwd`;
     
    26113059           
    26123060echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6
    2613 echo "configure:2614: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
     3061echo "configure:3062: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
    26143062if test -d $srcdir/c/src/lib/libhwapi/serial; then
    26153063  rtems_av_save_dir=`pwd`;
     
    26263074           
    26273075echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6
    2628 echo "configure:2629: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
     3076echo "configure:3077: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
    26293077if test -d $srcdir/c/src/lib/libhwapi/support; then
    26303078  rtems_av_save_dir=`pwd`;
     
    26413089           
    26423090echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6
    2643 echo "configure:2644: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
     3091echo "configure:3092: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
    26443092if test -d $srcdir/c/src/lib/libhwapi/wrapup; then
    26453093  rtems_av_save_dir=`pwd`;
     
    26863134
    26873135echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6
    2688 echo "configure:2689: checking for Makefile.in in c/build-tools" >&5
     3136echo "configure:3137: checking for Makefile.in in c/build-tools" >&5
    26893137if test -d $srcdir/c/build-tools; then
    26903138  rtems_av_save_dir=`pwd`;
     
    27013149
    27023150echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6
    2703 echo "configure:2704: checking for Makefile.in in make" >&5
     3151echo "configure:3152: checking for Makefile.in in make" >&5
    27043152if test -d $srcdir/make; then
    27053153  rtems_av_save_dir=`pwd`;
     
    27163164
    27173165echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6
    2718 echo "configure:2719: checking for Makefile.in in c/src/lib/libmisc" >&5
     3166echo "configure:3167: checking for Makefile.in in c/src/lib/libmisc" >&5
    27193167if test -d $srcdir/c/src/lib/libmisc; then
    27203168  rtems_av_save_dir=`pwd`;
     
    27313179
    27323180echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6
    2733 echo "configure:2734: checking for Makefile.in in c/src/tests/samples" >&5
     3181echo "configure:3182: checking for Makefile.in in c/src/tests/samples" >&5
    27343182if test -d $srcdir/c/src/tests/samples; then
    27353183  rtems_av_save_dir=`pwd`;
     
    29463394s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
    29473395s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
     3396s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
    29483397s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
    2949 s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
    29503398s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
    29513399s%@OBJCOPY_FOR_TARGET@%$OBJCOPY_FOR_TARGET%g
    29523400s%@SIZE_FOR_TARGET@%$SIZE_FOR_TARGET%g
    29533401s%@CC@%$CC%g
     3402s%@EXEEXT@%$EXEEXT%g
     3403s%@GCCSED@%$GCCSED%g
    29543404s%@rtems_cv_prog_cc_cross@%$rtems_cv_prog_cc_cross%g
    29553405s%@RTEMS_BSP_LIST@%$RTEMS_BSP_LIST%g
  • configure.in

    rd13b247 r98100d2  
    154154        RTEMS_HAS_POSIX_API=no
    155155        ;;
    156   i[[3456]]86-unknown-freebsd2.[[12]]*) # unix "simulator" port
     156  i[[3456]]86-*freebsd2*) # unix "simulator" port
    157157        target_cpu=unix
    158158        RTEMS_HOST=FreeBSD
     
    229229dnl check host cc
    230230AC_PROG_CC
     231
     232RTEMS_CYGWIN32
     233RTEMS_EXEEXT
     234
     235dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
     236case $host_os in
     237*cygwin32*)     GCCSED="| sed 's%\\\\%/%g'" ;;
     238*) ;;
     239esac
     240AC_SUBST(GCCSED)
    231241
    232242dnl check for host library functions
  • make/README

    rd13b247 r98100d2  
    211211            personality modules specified by the customization file for:
    212212                compiler            ( make/compilers/??.cfg )
    213                 operating system    ( make/os/??.cfg )
    214213
    215214
     
    310309            a number of MAKE variables are automatically set and maintained by
    311310            the config files.
    312 
    313             CONFIG.$(HOST_ARCH).OS
    314                         -- full path of OS config file, set by
    315                            custom config file.
    316311
    317312            CONFIG.$(HOST_ARCH).CC
  • make/compilers/gcc-no_bsp.cfg

    rd13b247 r98100d2  
    265265CONSTRUCTOR=
    266266
    267 LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
     267LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
    268268
    269269LINK_FILES= $(START_FILE) \
  • make/compilers/gcc-portsw.cfg

    rd13b247 r98100d2  
    242242LIBC_LOW=   $(PROJECT_RELEASE)/lib/libcsupport$(LIBSUFFIX_VA)
    243243
    244 LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
     244LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
    245245
    246246LIBOSBOOT=/home/src/amd29k/sps2000/netrom.o
  • make/compilers/gcc-target-default.cfg

    rd13b247 r98100d2  
    44#  $Id$
    55#
    6 
    7 # names for C++ compilers.
    8 CXX=$(CC)
    9 CCC=$(CXX)
    106
    117CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
     
    4642# Used for embedded bsps
    4743# Ask gcc where it finds its own include files
    48 GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include)
     44GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include $(GCCSED))
    4945
    5046CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
     
    7773# default location of Standard C Library
    7874ifndef LIBC_LIBC
    79 LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a)
     75LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a $(GCCSED))
    8076endif
    8177
    8278ifndef LIBC_LIBM
    83 LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a)
     79LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a $(GCCSED))
    8480endif
    8581endif
     
    9490endif
    9591
    96 # debug flag; typically
     92# debug flag;
    9793CFLAGS_DEBUG_V+=-Wno-unused
    9894
     
    174170#
    175171# Command to convert a normal archive to one searchable by $(LD)
    176 # Not needed on SVR4
    177 #
    178 
    179 MKLIB=echo library is complete:
     172#
     173# NOTE: Obsolete, use $(RANLIB) instead, MKLIB may disappear soon
     174MKLIB=$(RANLIB)
    180175
    181176#
     
    192187
    193188${ARCH}/%.o: %.cc
    194         ${COMPILE.cc} -o $@ $<
    195 
    196 ${ARCH}/%.o: %.cpp
    197         ${COMPILE.cc} -o $@ $<
    198 
    199 ${ARCH}/%.o: %.cxx
    200189        ${COMPILE.cc} -o $@ $<
    201190
     
    273262
    274263ifndef LIBGCC
    275 LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
    276 endif
    277 
    278 LINK_OBJS=\
     264LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
     265endif
     266
     267#
     268# NOTE: a rule to link an rtems' application should look similar to this
     269#       (cf. "make-exe" in make/custom/*.cfg):
     270#
     271# gcc27:
     272# $(PGM): $(LINK_FILES)
     273#       $(LD) $(LDFLAGS) -o $@ $(LINK_OBJS) \
     274#       --start-group $(LIB_LIBS) --end-group
     275#
     276# gcc28:
     277# $(PGM): $(LINK_FILES)
     278#       $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LIB_LIBS)
     279#
     280
     281LINK_OBJS =\
    279282    $(CONSTRUCTOR) \
    280283    $(OBJS) \
    281284    $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
    282     $(LD_LIBS) \
    283285    $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA)
    284286
    285 LINK_LIBS=\
    286     $(LD_LIBS) \
    287     $(LIBC_EXTRA_LIBS)  \
    288     $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA) \
    289     $(LIBC_LIBM) $(LIBC_LIBC) $(LIBGCC)
    290 
    291 LINK_FILES=\
     287LINK_FILES =\
    292288    $(START_FILE) \
    293     $(LINK_OBJS) \
    294     $(LINK_LIBS)
     289    $(CONSTRUCTOR) \
     290    $(OBJS) \
     291    $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
     292    $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA) \
     293    $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
     294
     295ifeq ($(RTEMS_USE_GCC272),yes)
     296LINK_LIBS = $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
     297ifeq ($(RTEMS_CROSS_TARGET),yes)
     298# NOTE: add libc and libgcc only for embedded targets
     299#       LIBC_LIBM should not be needed by rtems itself.
     300# FIXME: If a BSP requires libm, its make/custom/*.cfg file should add
     301#        LIBC_LIBM to LINK_LIBS (untested)
     302LINK_LIBS += $(LIBC_LIBC) $(LIBGCC)
     303endif
     304endif
     305
     306LINK_LIBS += $(LD_LIBS)   
    295307
    296308#
  • make/custom/FreeBSD-posix.cfg

    rd13b247 r98100d2  
    3535ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
    3636HAS_CPLUSPLUS=yes
    37 # No need to set it, gcc knows about them
    38 # LIBCC_INCLUDE=/usr/include/g++
    3937CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
    40 else
    41 HAS_CPLUSPLUS=no
    4238endif
    4339
     
    8177endef
    8278
    83 ifeq ($(RTEMS_USE_GCC272),yes)
    8479define make-exe
    85         $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
     80        $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
    8681        $(NM) -ng $@ > $(basename $@).num
    8782        $(SIZE) $@
    8883endef
    89 else
    90 #
    91 # gcc28 not yet supported
    92 #
    93 endif
    9484
    9585
    9686# *****************************************************************
    9787# Miscellaneous additions go here
    98 
    99 # Workaround for missing ranlib support in RTEMS
    100 MKLIB=$(AR) s $(@) ; echo library is complete:
  • make/custom/HPUX9-posix.cfg

    rd13b247 r98100d2  
    7676endef
    7777
    78 ifeq ($(RTEMS_USE_GCC272),yes)
    7978define make-exe
    80         $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
     79        $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
    8180        $(NM) -ng $@ > $(basename $@).num
    8281        $(SIZE) $@
    8382endef
    84 else
    85 #
    86 # gcc28 not yet supported
    87 #
    88 endif
    8983
    9084# Miscellaneous additions go here
    9185
    92 # Workaround for missing ranlib support in RTEMS
    93 MKLIB=$(AR) s $(@) ; echo library is complete:
    94 
  • make/custom/Linux-posix.cfg

    rd13b247 r98100d2  
    7878endef
    7979
    80 ifeq ($(RTEMS_USE_GCC272),yes)
    8180define make-exe
    82         $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
     81        $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
    8382        $(NM) -ng $@ > $(basename $@).num
    8483        $(SIZE) $@
    8584endef
    86 else
    87 #
    88 # just use the same make-exe as gcc 272
    89 #
    90 define make-exe
    91         $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
    92         $(NM) -ng $@ > $(basename $@).num
    93         $(SIZE) $@
    94 endef
    95 endif
    9685
    9786
    9887# *****************************************************************
    9988# Miscellaneous additions go here
    100 
    101 # Workaround for missing ranlib support in RTEMS
    102 MKLIB=$(AR) s $(@) ; echo library is complete:
  • make/custom/Solaris-posix.cfg

    rd13b247 r98100d2  
    2828LIBC_DEFINES += -DHEAPSPACE_MB=1
    2929LIBC_DEFINES +=-DRTEMS_UNIXLIB -DRTEMS_UNIX -DMALLOC_PROVIDED -DRTEMS_DEBUG
    30 LIBC_LIBM=-lm
    3130
    3231DEFINES += -D__EXTENSIONS__ -Dsolaris2
     
    7877endef
    7978
    80 ifeq ($(RTEMS_USE_GCC272),yes)
    8179define make-exe
    82         $(CC) -o $@ $(LINK_FILES) $(LD_LIBS) $(LIBC_LIBM) $(LIBC_LIBC)
     80        $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
    8381        $(NM) -ng $@ > $(basename $@).num
    8482        $(SIZE) $@
    8583endef
    86 else
    87 # NOTE: Untested
    88 define make-exe
    89         $(CC) -v $(CFLAGS) -o $@ $(LINK_OBJS)
    90         $(NM) -ng $@ > $(basename $@).num
    91         $(SIZE) $@
    92 endef
    93 endif
    94 
    9584
    9685# *****************************************************************
  • make/custom/bare.cfg

    rd13b247 r98100d2  
    1717
    1818include $(RTEMS_ROOT)/make/custom/default.cfg
    19 
    20 ## Target compiler config file, if any
    21 CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
    2219
    2320# optimize flag: typically -0, could use -O4 or -fast
  • make/custom/cvme961.cfg

    rd13b247 r98100d2  
    6969else
    7070define make-exe
    71         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
     71        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
     72            $(LINK_OBJS) $(LINK_LIBS)
    7273        $(NM) -g -n $(basename $@).exe > $(basename $@).num
    7374        $(SIZE) $(basename $@).exe
  • make/custom/dmv152.cfg

    rd13b247 r98100d2  
    7272else
    7373define make-exe
    74         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
     74        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
     75            $(LINK_OBJS) $(LINK_LIBS)
    7576        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    7677        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
  • make/custom/efi332.cfg

    rd13b247 r98100d2  
    6363else
    6464define make-exe
    65         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
     65        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
     66            $(LINK_OBJS) $(LINK_LIBS)
    6667        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    6768        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
  • make/custom/efi68k.cfg

    rd13b247 r98100d2  
    6363else
    6464define make-exe
    65         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
     65        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
     66            $(LINK_OBJS) $(LINK_LIBS)
    6667        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    6768        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
  • make/custom/erc32.cfg

    rd13b247 r98100d2  
    9191else
    9292define make-exe
    93         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
     93        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
     94            $(LINK_OBJS) $(LINK_LIBS)
    9495        $(NM) -g -n $(basename $@).exe > $(basename $@).num
    9596        $(SIZE) $(basename $@).exe
  • make/custom/force386.cfg

    rd13b247 r98100d2  
    6767else
    6868define make-exe
    69         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
     69        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
     70            $(LINK_OBJS) $(LINK_LIBS)
    7071        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    7172        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
  • make/custom/gen68302.cfg

    rd13b247 r98100d2  
    6363else
    6464define make-exe
    65         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
     65        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
     66            $(LINK_OBJS) $(LINK_LIBS)
    6667        $(NM) -g -n $(basename $@).exe > $(basename $@).num
    6768        $(SIZE) $(basename $@).exe
  • make/custom/gen68360.cfg

    rd13b247 r98100d2  
    8484
    8585define make-exe
    86         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
     86        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
     87            $(LINK_OBJS) $(LINK_LIBS)
    8788        $(NM) -g -n $(basename $@).exe > $(basename $@).num
    8889        $(SIZE) $(basename $@).exe
  • make/custom/gensh1.cfg

    rd13b247 r98100d2  
    6464# is currently required.  It is expected that as of gcc 2.8, the end user
    6565# will be able to override parts of the compilers specs and link using gcc.
    66 #           -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) -lrtemsall -lc $(LD_PATHS:%=-L %)
    6766
    6867ifeq ($(RTEMS_USE_GCC272),yes)
    6968define make-exe
    70         $(CC) $(LDFLAGS) -nostdlib -o $(basename $@).exe \
    71         -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) $(LD_PATHS:%=-L %)
     69        $(LD) $(LDFLAGS) -N -e _start \
     70            -T$(PROJECT_RELEASE)/lib/linkcmds\
     71            -o $(basename $@).exe \
     72            $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
    7273        $(NM) -n $(basename $@).exe > $(basename $@).num
    7374        $(SIZE) $(basename $@).exe
     
    7576else
    7677define make-exe
    77         $(CC) -Wl,-Map,$(basename $@).map $(CFLAGS) \
    78              -o $(basename $@).exe $(LINK_OBJS)
     78        $(CC) -v -Wl,-Map,$(basename $@).map \
     79            $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
     80            $(LINK_OBJS) $(LINK_LIBS)
    7981        $(NM) -n $(basename $@).exe > $(basename $@).num
    8082        $(SIZE) $(basename $@).exe
     
    8486# Miscellaneous additions go here
    8587
    86 # Workaround for missing ranlib support in rtems
    87 MKLIB=$(RANLIB)
  • make/custom/go32.cfg

    rd13b247 r98100d2  
    9494            $(shell $(CC) $(CPU_CFLAGS) -print-file-name=crt0.o) \
    9595            $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group \
    96             $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libcgo32.a) \
    97             $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libpc.a)
     96            $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libcgo32.a $(GCCSED)) \
     97            $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libpc.a $(GCCSED))
    9898        $(NM) -g -n $(basename $@).exe > $(basename $@).num
    9999        $(SIZE) $(basename $@).exe
     
    102102else
    103103define make-exe
    104         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
     104        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
     105            $(LINK_OBJS) $(LINK_LIBS)
    105106        $(NM) -g -n $(basename $@).exe > $(basename $@).num
    106107        $(SIZE) $(basename $@).exe
  • make/custom/i386ex.cfg

    rd13b247 r98100d2  
    6868else
    6969define make-exe
    70         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
     70        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
     71            $(LINK_OBJS) $(LINK_LIBS)
    7172        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    7273        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
  • make/custom/idp.cfg

    rd13b247 r98100d2  
    6565else
    6666define make-exe
    67         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
     67        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
     68            $(LINK_OBJS) $(LINK_LIBS)
    6869        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    6970        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
  • make/custom/mvme136.cfg

    rd13b247 r98100d2  
    6464else
    6565define make-exe
    66         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
     66        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
     67            $(LINK_OBJS) $(LINK_LIBS)
    6768        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    6869        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
  • make/custom/mvme147.cfg

    rd13b247 r98100d2  
    5858else
    5959define make-exe
    60         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
     60        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
     61            $(LINK_OBJS) $(LINK_LIBS)
    6162        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    6263        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
  • make/custom/mvme162.cfg

    rd13b247 r98100d2  
    2626# This is the actual bsp directory used during the build process.
    2727RTEMS_BSP_FAMILY=mvme162
    28 
    29 ## Target compiler config file, if any
    30 CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
    3128
    3229# We may install in a CPU model based directory but this is still
     
    9188define make-exe
    9289        $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
    93             $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
     90            $(START_FILE) $(LINK_OBJS) \
     91            --start-group $(LINK_LIBS) --end-group
    9492        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    9593        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
     
    10098else
    10199define make-exe
    102         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
     100        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS) \
     101            $(LINK_LIBS)
    103102        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
    104103        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
     
    109108endif
    110109# Miscellaneous additions go here
    111 
    112 
    113 
  • make/custom/no_bsp.cfg

    rd13b247 r98100d2  
    55#
    66
    7 # Specify here the host and target "architectures"
    8 HOST_ARCH=o-$(RTEMS_HOST)
    9 TARGET_ARCH=o-$(RTEMS_BSP)
     7include $(RTEMS_ROOT)/make/custom/default.cfg
    108
    119RTEMS_CPU=no_cpu
     
    1412# This is the actual bsp directory used during the build process.
    1513RTEMS_BSP_FAMILY=no_bsp
    16 
    17 # use the inline functions instead of the macros
    18 # ref: src/exec/generic/Makefile
    19 # Need INLINE_UPCASE set to uppercase value of INLINE variable
    20 #   ref: make/compilers/gcc-force386.cfg
    21 ifeq ($(RTEMS_USE_MACROS),yes)
    22 INLINE=macros
    23 INLINE_UPCASE=
    24 else
    25 INLINE=inline
    26 INLINE_UPCASE=INLINE
    27 endif
    28 
    29 # HOST Compiler config file
    30 # You may also want to specify where the compiler resides here.
    31 CC_$(HOST_ARCH)_DIR=$(RTEMS_GNUTOOLS_HOST)
    32 CONFIG.$(HOST_ARCH).CC   = $(RTEMS_ROOT)/make/compilers/gcc.cfg
    33 
    34 ## Target compiler config file, if any
    35 CC_$(TARGET_ARCH)_DIR=$(RTEMS_GNUTOOLS)
    36 CONFIG.$(TARGET_ARCH).CC         = $(RTEMS_ROOT)/make/compilers/gcc-$(RTEMS_BSP).cfg
    3714
    3815# Use the LIBC support for CYGNUS newlib
  • make/custom/ods68302.cfg

    rd13b247 r98100d2  
    4141ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
    4242HAS_CPLUSPLUS=yes
    43 # no standard C++ libs provided by default
    44 #LIBCC_INCLUDE=/usr/include/g++
    45 #CPLUS_LD_LIBS=-lstdc++ -lrtems++
    4643CPLUS_LD_LIBS=$(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
    47 else
    48 HAS_CPLUSPLUS=no
    4944endif
    5045
     
    9186        $(CC) $(CFLAGS) $(CFLAGS_LD) \
    9287            -Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \
    93             -o $(basename $@).exe $(LINK_OBJS)
     88            -o $(basename $@).exe \
     89            $(LINK_OBJS) $(LINK_LIBS)
    9490        $(NM) -g -n $(basename $@).exe > $(basename $@).num
    9591        $(SIZE) $(basename $@).exe
  • make/custom/p4000.cfg

    rd13b247 r98100d2  
    5555define make-exe
    5656        $(CC) $(LDFLAGS) -nostdlib -o $(basename $@).exe \
    57             -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) $(LD_PATHS:%=-L %)
     57            -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_OBJS) $(LINK_LIBS) $(LD_PATHS:%=-L %)
    5858        $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
    5959        $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
     
    6464else
    6565define make-exe
    66         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
     66        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
     67            $(LINK_OBJS) $(LINK_LIBS)
    6768        $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
    6869        $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
  • make/custom/p4600.cfg

    rd13b247 r98100d2  
    2525TARGET_ARCH=o-p4600
    2626RTEMS_BSP=p4000
    27 
    28 ## Target compiler config file, if any
    29 CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
    3027
    3128# This target does NOT support the KA9Q TCP/IP stack so ignore requests
     
    7572define make-exe
    7673        $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
    77             $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
     74            $(START_FILE) $(LINK_OBJS) \
     75            --start-group $(LINK_LIBS) --end-group
    7876        $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
    7977        $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
     
    8482else
    8583define make-exe
    86         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
     84        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS) \
     85            $(LINK_LIBS)
    8786        $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
    8887        $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
  • make/custom/p4650.cfg

    rd13b247 r98100d2  
    2424TARGET_ARCH=o-p4650
    2525RTEMS_BSP=p4000
    26 
    27 ## Target compiler config file, if any
    28 CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
    2926
    3027# This target does NOT support the KA9Q TCP/IP stack so ignore requests
     
    7471define make-exe
    7572        $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
    76             $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
     73            $(START_FILE) $(LINK_OBJS) \
     74            --start-group $(LINK_LIBS) --end-group $(LD_LIBS)
    7775        $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
    7876        $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
     
    8381else
    8482define make-exe
    85         $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
     83        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
     84            $(LINK_OBJS) $(LINK_LIBS) $(LD_LIBS)
    8685        $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
    8786        $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
     
    9392
    9493# Miscellaneous additions go here
    95 
    96 
    97 
    98 
    99 
  • make/custom/papyrus.cfg

    rd13b247 r98100d2  
    9393else
    9494define make-exe
    95         $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS)
     95        $(CC) $(CFLAGS) -o $(basename $@).exe \
     96            $(LINK_OBJS) $(LINK_LIBS)
    9697        $(NM) -g -n $@ > $(basename $@).num
    9798        $(SIZE) $@
  • make/custom/pc386.cfg

    rd13b247 r98100d2  
    9090define make-exe
    9191        $(CC) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
    92             -o $(basename $@).obj $(LINK_OBJS)
     92            -o $(basename $@).obj \
     93            $(LINK_OBJS) $(LINK_LIBS)
    9394        $(OBJCOPY) -O a.out-i386 \
    9495            --remove-section=.rodata \
  • make/custom/psim.cfg

    rd13b247 r98100d2  
    102102#            $(LD_LIBS) \
    103103#           -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
     104ifeq ($(RTEMS_USE_GCC272),yes)
    104105define make-exe
    105         $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS)
     106        $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
    106107        $(NM) -g -n $@ > $(basename $@).num
    107108        $(SIZE) $@
    108109endef
     110else
     111define make-exe
     112        $(CC) $(CFLAGS) -o $(basename $@).exe \
     113            $(LINK_OBJS) $(LINK_LIBS)
     114        $(NM) -g -n $@ > $(basename $@).num
     115        $(SIZE) $@
     116endef
     117endif
    109118
    110119# Miscellaneous additions go here
  • make/custom/simhppa.cfg

    rd13b247 r98100d2  
    126126define make-exe
    127127        $(CC) $(CFLAGS) $(CFLAGS_LD) $(GCC_LD_LOC_OPTIONS) \
    128             -o $(basename $@).exe $(LINK_OBJS)
     128            -o $(basename $@).exe \
     129            $(LINK_OBJS) $(LINK_LIBS)
    129130        $(NM) -g -n $@ > $(basename $@).num
    130131        $(SIZE) $@
  • make/host.cfg.in

    rd13b247 r98100d2  
    3838EGREP=@EGREP@
    3939
     40# FIXME: HACK for a bug in cygwin-hosted egcs which returns a mixture
     41#        of '\\' and '/' as path separators.
     42#        Should be removed as soon as this bug is fixed in egcs.
     43GCCSED = @GCCSED@
     44
    4045# ksh (or bash) is used by some shell scripts; ref build-tools/scripts/Makefile
    4146#
  • make/target.cfg.in

    rd13b247 r98100d2  
    1414CC_FOR_BUILD = @CC@
    1515
    16 CC_FOR_TARGET = @CC_FOR_TARGET@
    17 AS_FOR_TARGET = @AS_FOR_TARGET@
    18 AR_FOR_TARGET = @AR_FOR_TARGET@
    19 NM_FOR_TARGET = @NM_FOR_TARGET@
    20 LD_FOR_TARGET = @LD_FOR_TARGET@
    21 SIZE_FOR_TARGET = @SIZE_FOR_TARGET@
    22 OBJCOPY_FOR_TARGET = @OBJCOPY_FOR_TARGET@
     16CC = @CC_FOR_TARGET@
     17AS = @AS_FOR_TARGET@
     18AR = @AR_FOR_TARGET@
     19NM = @NM_FOR_TARGET@
     20LD = @LD_FOR_TARGET@
     21SIZE = @SIZE_FOR_TARGET@
     22OBJCOPY = @OBJCOPY_FOR_TARGET@
     23RANLIB = @RANLIB_FOR_TARGET@
    2324
    24 CC= $(CC_FOR_TARGET)
    25 AS= $(AS_FOR_TARGET)
    26 LD= $(LD_FOR_TARGET)
    27 NM= $(NM_FOR_TARGET)
    28 AR= $(AR_FOR_TARGET)
    29 SIZE= $(SIZE_FOR_TARGET)
    30 OBJCOPY= $(OBJCOPY_FOR_TARGET)
    31 
    32 CXX_FOR_TARGET = @CXX_FOR_TARGET@
    33 CXX=$(CXX_FOR_TARGET)
     25CXX = @CXX_FOR_TARGET@
    3426
    3527export CC
     
    4032export SIZE
    4133export OBJCOPY
     34
     35export CXX
    4236
    4337RTEMS_CROSS_TARGET=@rtems_cv_prog_cc_cross@
  • tools/build/scripts/Makefile.in

    rd13b247 r98100d2  
    1818DESTDIR=$(PROJECT_RELEASE)/build-tools
    1919
    20 PGMS=install-if-change rcs-clean lock-directory unlock-directory rtems-glom search-id.sh
    21 
     20PGMS=install-if-change rcs-clean lock-directory unlock-directory \
     21  search-id.sh
    2222
    2323INSTALLED=$(PGMS:%=$(DESTDIR)/%)
  • tools/build/src/Makefile.in

    rd13b247 r98100d2  
    1111manext = 1
    1212mandir = @mandir@/man$(manext)
     13
     14# FIXME: $EXEEXT should be set in a central cfg-file used for native
     15#        compiling (e.g. gcc.cfg) instead of setting EXEEXE here.
     16EXEEXT=@EXEEXT@
    1317
    1418VPATH = @srcdir@
     
    2933OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
    3034
    31 PGMS=$(ARCH)/cklength $(ARCH)/eolstrip $(ARCH)/packhex $(ARCH)/unhex
     35PGMS=$(ARCH)/cklength$(EXEEXT) $(ARCH)/eolstrip$(EXEEXT) \
     36        $(ARCH)/packhex$(EXEEXT) $(ARCH)/unhex$(EXEEXT)
    3237
    3338include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
  • tools/cpu/generic/size_rtems.in

    rd13b247 r98100d2  
    1 #!KSHELL -p
     1#!@KSH@ -p
    22#
    33#  size_rtems
Note: See TracChangeset for help on using the changeset viewer.