Patch rtems-rc-20000626-1.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>.

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.
This commit is contained in:
Joel Sherrill
2000-07-06 14:04:29 +00:00
parent c2f39fff1f
commit 04e4829d46
3 changed files with 11 additions and 11 deletions

View File

@@ -12,17 +12,17 @@ AC_CACHE_CHECK([for newlib],
dnl some versions of newlib provide not_required_by_rtems
AC_TRY_LINK(
[extern int not_required_by_rtems() ;],
[extern void not_required_by_rtems() ;],
[not_required_by_rtems()],
rtems_cv_use_newlib="yes")
dnl older versions of newlib provided rtems_provides_crt0
dnl some versions of newlib provide rtems_provides_crt0()
if test -z "$rtems_cv_use_newlib"; then
AC_TRY_LINK(
[extern int rtems_provides_crt0 ;],
[rtems_provides_crt0 = 0],
[extern void rtems_provides_crt0() ;],
[rtems_provides_crt0()],
rtems_cv_use_newlib="yes",
rtems_cv_use_newlib="no")
rtems_cv_use_newlib="no")
fi
CC=$rtems_save_CC])
RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"

View File

@@ -24,12 +24,13 @@ RTEMS_PROJECT_ROOT
RTEMS_PROG_CC_FOR_TARGET
RTEMS_CANONICALIZE_TOOLS
RTEMS_CHECK_NEWLIB
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
RTEMS_CHECK_NETWORKING(RTEMS_BSP)
AM_CONDITIONAL(UNIX,test "$RTEMS_CPU" = "unix")
AM_CONDITIONAL(UNIX,test x"$RTEMS_CPU" = x"unix")
AM_CONDITIONAL(NEWLIB,test x"$RTEMS_USE_NEWLIB" = x"yes")
# find all the CPU dependent library Makefiles
AC_CONFIG_SUBDIRS(libcpu)

View File

@@ -9,12 +9,11 @@ else
NETWORKING_H_FILES += ioctl.h
endif
if UNIX
else
NEWLIB_H_FILES += termios.h
if NEWLIB
NEWLIB_H_FILES += termios.h cdefs.h
endif
H_FILES = cdefs.h ioccom.h utime.h $(NEWLIB_H_FILES) $(NETWORKING_H_FILES)
H_FILES = ioccom.h utime.h $(NEWLIB_H_FILES) $(NETWORKING_H_FILES)
noinst_HEADERS = utime.h termios.h ioctl.h ioccom.h