Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:

After upgrading my linux box to the brand new SuSE 6.2 release, which is
    glibc-2.1 based, I came across a bug in RTEMS - IIRC, I even warned you
    about it about 1/2 a year ago, but nothing has been done since then :-.

    The *.m4 macros to check for SYSV/IPC are broken for linux/glibc2.1,
    because they assume that linux always defines union semun, which isn't
    true anymore for glibc2.1 (the manpage for semctl states _X_OPEN
    specifies it this way). Therefore I have tried to implement a more
    general approach for handling SYSV for unix/posix which checks for
    presence of struct semun, instead of trying  to evaluate OS specific
    preprocessor symbols.

    This approach is a bit adventureous, because I only tested it with
    linux/glibc2.1 and linux/libc5, but not under other Unix variants RTEMS
    supports. I am quite confident it will work on other hosts, too, but who
    knows :-.

    [FYI: I think this might also is the cause of some problems with RedHat
    6.X / Mandrake linux recently reported on the rtems list -- rtems-4.0.0
    can not be build for posix on any glibc2.1 based host]

    Furthermore the patch below contains a couple of minor fixes and
    configuration cleanups, which IMO should be applied before releasing a
    new snapshot.

    To apply this patch:

        cd <source-tree>
        patch -p1 < rtems-rc-19990709-8.diff
        ./autogen
This commit is contained in:
Joel Sherrill
1999-08-12 18:22:17 +00:00
parent 8aefe83224
commit ea562ee977
16 changed files with 254 additions and 766 deletions

View File

@@ -101,12 +101,12 @@ CFLAGS_OPTIMIZE_V=-O2 -fno-keep-inline-functions -fvolatile-global -fvolatile -m
# $(LD_LIBS) \
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
define make-exe
$(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS)
$(CC) $(CPPFLAGS) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
$(CP) $(basename $@).exe $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/mcp750/bootloader/$(ARCH); \
cd $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/mcp750/bootloader; \
make bootloader BINARY_LOADED=$(basename $@).exe; \
$(MAKE) bootloader BINARY_LOADED=$(basename $@).exe; \
COMPLETE_FILE_NAME=$(basename $@).exe ;\
echo $${COMPLETE_FILE_NAME} ;\
FILE_NAME=`basename $${COMPLETE_FILE_NAME}` ;\

View File

@@ -4,7 +4,7 @@
# $Id$
#
include $(RTEMS_ROOT)/make/target.cfg
# include $(RTEMS_ROOT)/make/target.cfg
include $(RTEMS_ROOT)/make/host.cfg
# Set them here, otherwise gcc-target-default.cfg will set them to values