Changeset 04e4829 in rtems


Ignore:
Timestamp:
Jul 6, 2000, 2:04:29 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
42ed300
Parents:
c2f39fff
Message:

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.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • aclocal/check-newlib.m4

    rc2f39fff r04e4829  
    1313dnl some versions of newlib provide not_required_by_rtems
    1414    AC_TRY_LINK(
    15       [extern int not_required_by_rtems() ;],
     15      [extern void not_required_by_rtems() ;],
    1616      [not_required_by_rtems()],
    1717      rtems_cv_use_newlib="yes")
    1818
    19 dnl older versions of newlib provided rtems_provides_crt0
     19dnl some versions of newlib provide rtems_provides_crt0()
    2020    if test -z "$rtems_cv_use_newlib"; then
    2121      AC_TRY_LINK(
    22         [extern int rtems_provides_crt0 ;],
    23         [rtems_provides_crt0 = 0],
     22        [extern void rtems_provides_crt0() ;],
     23        [rtems_provides_crt0()],
    2424        rtems_cv_use_newlib="yes",
    25         rtems_cv_use_newlib="no")
     25        rtems_cv_use_newlib="no")
    2626    fi
    2727  CC=$rtems_save_CC])
  • c/src/lib/configure.in

    rc2f39fff r04e4829  
    2525RTEMS_PROG_CC_FOR_TARGET
    2626RTEMS_CANONICALIZE_TOOLS
    27 
     27RTEMS_CHECK_NEWLIB
    2828RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
    2929RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
    3030RTEMS_CHECK_NETWORKING(RTEMS_BSP)
    3131
    32 AM_CONDITIONAL(UNIX,test "$RTEMS_CPU" = "unix")
     32AM_CONDITIONAL(UNIX,test x"$RTEMS_CPU" = x"unix")
     33AM_CONDITIONAL(NEWLIB,test x"$RTEMS_USE_NEWLIB" = x"yes")
    3334
    3435# find all the CPU dependent library Makefiles
  • c/src/lib/include/sys/Makefile.am

    rc2f39fff r04e4829  
    1010endif
    1111
    12 if UNIX
    13 else
    14 NEWLIB_H_FILES += termios.h
     12if NEWLIB
     13NEWLIB_H_FILES += termios.h cdefs.h
    1514endif
    1615
    17 H_FILES = cdefs.h ioccom.h utime.h $(NEWLIB_H_FILES) $(NETWORKING_H_FILES)
     16H_FILES = ioccom.h utime.h $(NEWLIB_H_FILES) $(NETWORKING_H_FILES)
    1817
    1918noinst_HEADERS = utime.h termios.h ioctl.h ioccom.h
Note: See TracChangeset for help on using the changeset viewer.