From 04e4829d46887039be024e83dc1951256e672ec1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 6 Jul 2000 14:04:29 +0000 Subject: Patch rtems-rc-20000626-1.diff from Ralf Corsepius . 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. --- aclocal/check-newlib.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'aclocal/check-newlib.m4') diff --git a/aclocal/check-newlib.m4 b/aclocal/check-newlib.m4 index f417c65726..b8bdaa19b7 100644 --- a/aclocal/check-newlib.m4 +++ b/aclocal/check-newlib.m4 @@ -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" -- cgit v1.2.3