source: rtems/aclocal/check-newlib.m4 @ 04e4829

4.104.114.84.9
Last change on this file since 04e4829 was 04e4829, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 6, 2000 at 2:04:29 PM

Patch rtems-rc-20000626-1.diff from Ralf Corsepius <corsepiu@…>.
Comments follow:

Building linux/posix fails due to including lib/include/sys/cdefs.h
instead of linux's sys/cdefs.h.
AFAIS, this sys/cdefs.h is specific to newlib and should probably
not be used on any unix host.

Therefore, I changed the relevant Makefile.am/configure.in to
condionally install sys/cdefs.h only if newlib is present.

This triggered another bug inside of the newlib-check for one of
RTEMS target's (Unfortunately I can't remember which - mips/i960 ?
... one of the more exotic ...), for which int func() isn't
identical to void func().

Note: This patch needs to be tested under Cygwin and Solaris. I am
particularily unsure about Cygwin/posix, as it applies a different
version newlib which must not trigger RTEMS newlib check (it is
supposed to fail) and if it may need RTEMS's sys/cdefs.h.

  • Property mode set to 100644
File size: 788 bytes
Line 
1dnl $Id$
2
3AC_DEFUN(RTEMS_CHECK_NEWLIB,
4[dnl
5AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl
6AC_REQUIRE([RTEMS_CANONICALIZE_TOOLS])dnl
7AC_CACHE_CHECK([for newlib],
8  rtems_cv_use_newlib,
9  [
10    rtems_save_CC=$CC
11    CC=$CC_FOR_TARGET
12
13dnl some versions of newlib provide not_required_by_rtems
14    AC_TRY_LINK(
15      [extern void not_required_by_rtems() ;],
16      [not_required_by_rtems()],
17      rtems_cv_use_newlib="yes")
18
19dnl some versions of newlib provide rtems_provides_crt0()
20    if test -z "$rtems_cv_use_newlib"; then
21      AC_TRY_LINK(
22        [extern void rtems_provides_crt0() ;],
23        [rtems_provides_crt0()],
24        rtems_cv_use_newlib="yes",
25        rtems_cv_use_newlib="no")
26    fi
27  CC=$rtems_save_CC])
28RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
29AC_SUBST(RTEMS_USE_NEWLIB)
30])
31
Note: See TracBrowser for help on using the repository browser.