Changeset 9572c41 in rtems


Ignore:
Timestamp:
04/19/99 13:11:13 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
196094eb
Parents:
4ad3d37
Message:

Patch from Ralf Corsepius <corsepiu@…>:

This is an attempt to work-around a couple of nasty bugs in librdbg's
Makefiles and configuration:

Configure and build RTEMS as below:

configure --enable-networking --enable-rdbg --target=i386-rtems
make RTEMS_BSP=i386ex

After a few minutes you will notice that building aborts in librdbg ....

Analysis:

1) librdbg is tried to be built, though librdbg is not supported and the

required directory hierarchy librdbg/i386/i386ex/ is not existant.

The cause for this is incorrect setting of HAS_RDBG in most
make/custom/*.cfg files (except pc386.cfg). At the moment all
custom/*.cfg files (except pc386.cfg) in general are required to contain
HAS_RDBG=no. However, having HAS_NETWORKING=no in most custom/*.cfg
files and the toplevel configure script suppress building librdbg for
all CPUs except of i386.

=> The i386ex BSP falls though this scheme and librdbg is tried to be

build (CPU=i386 and HAS_NETWORKING=yes).

2) The Makefile.ins below lib/librdbg in general support i386/pc386 only

and are not capable to be used for multiple CPUs or BSPs (RPCGEN
generates it's target and bsp-specific files into librdbg/, therefore no
other CPU or BSP can ever be built afterwards). This problem is hidden
until now, because only a single CPU/BSP pair (i386/pc386) is really
supported.

3) The Makefile.ins below lib/librdbg can delete source files due to

improper handling of source files (make clean removes the *.x files in
the source-tree when configuring inside of the source-tree).

The patch below tries to work-around these problems for the i386ex and
the pc386 BSPs. This work-around is rather fragile (it applies rpcgen
-D, I don't know how portable this is) and incomplete (all custom/*.cfg
except of pc386.cfg should contain HAS_RDBG=no), nevertheless it should
work.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/Makefile.in

    r4ad3d37 r9572c41  
    9393                DIR=`dirname $$i`; \
    9494                cd $$DIR; \
    95                 $(MAKE) preinstall; \
     95                $(MAKE) RTEMS_BSP=${RTEMS_BSP} preinstall; \
    9696                cd $$CURRDIR; \
    9797        done
  • c/src/lib/librdbg/Makefile.in

    r4ad3d37 r9572c41  
    1414PROJECT_ROOT = @PROJECT_ROOT@
    1515
    16 VPATH = @srcdir@:@srcdir@/$(RTEMS_CPU)
     16VPATH = @srcdir@
    1717
    18 LIBNAME=librdbg.a
    19 LIB=${ARCH}/${LIBNAME}
     18include $(RTEMS_ROOT)/make/custom/${RTEMS_BSP}.cfg
     19include $(RTEMS_ROOT)/make/directory.cfg
    2020
    21 # C and C++ source names, if any, go here -- minus the .c or .cc
    22 C_PIECES= rdbg servcon servbkpt servrpc excep \
    23           servtgt servtsp servutil _servtgt rdbg_f \
    24           ptrace
    25 C_FILES=$(C_PIECES:%=%.c)
    26 C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
    27 
    28 # Asm source names, if any, go here -- minus the .s
    29 ASM_PIECES= rdbg_cpu_asm
    30 ASM_FILES=$(ASM_PIECES:%=%.s)
    31 ASM_O_FILES=$(ASM_PIECES:%=${ARCH}/%.o)
    32 
    33 # Generated C source names, if any, go here -- minus the .c
    34 C_GEN_PIECES= remdeb_xdr remdeb_svc
    35 C_GEN_FILES=$(C_GEN_PIECES:%=%.c)
    36 C_GEN_O_FILES=$(C_GEN_PIECES:%=${ARCH}/%.o)
    37 
    38 # H source names, if any, go here -- minus the .h
    39 H_PIECES=remdeb
    40 H_FILES=$(H_PIECES:%=%.h)
    41 
    42 # X source names, if any, go here -- minus the .x
    43 X_FILE1=remdeb.x
    44 X_FILE2=remdeb_f.x
    45 X_FILES=$(X_FILE1) $(X_FILE2)
    46 
    47 SRCS=$(C_FILES) $(ASM_FILES) $(C_GEN_FILES) $(H_FILES)
    48 OBJS=$(C_GEN_O_FILES) $(C_O_FILES) $(ASM_O_FILES)
    49 
    50 RPCGEN=@RPCGEN@
    51 AWK=@AWK@
    52 
    53 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    54 include $(RTEMS_ROOT)/make/lib.cfg
    55 
    56 #
    57 # Add local stuff here using +=
    58 #
    59 
    60 DEFINES  +=
    61 CPPFLAGS +=
    62 CFLAGS   +=
    63 
    64 #
    65 # Add your list of files to delete here.  The config files
    66 #  already know how to delete some stuff, so you may want
    67 #  to just run 'make clean' first to see what gets missed.
    68 #  'make clobber' already includes 'make clean'
    69 #
    70 
    71 CLEAN_ADDITIONS += $(LIB) $(H_FILES) $(X_FILES) $(C_GEN_FILES)
    72 CLOBBER_ADDITIONS +=
    73 
    74 all:    ${ARCH} $(LIB)
    75         $(INSTALL_VARIANT) -m 644 $(LIB) ${PROJECT_RELEASE}/lib
    76 
    77 $(LIB): $(SRCS) ${OBJS}
    78         $(make-library)
    79 
    80 remdeb.h: $(X_FILES)
    81         @rm -f $@
    82         $(RPCGEN) -h remdeb.x -o $@
    83         @rm -f $(PROJECT_INCLUDE)/rdbg/$@
    84         $(INSTALL_CHANGE) -m 444 $@ $(PROJECT_INCLUDE)/rdbg
    85 
    86 remdeb_xdr.c: $(X_FILES)
    87         @rm -f $@
    88         $(RPCGEN) -c remdeb.x -o $@
    89 
    90 remdeb_svc.c: $(X_FILES)
    91         @rm -f $@ tmpSvc.c
    92         $(RPCGEN) -s udp remdeb.x -o tmpSvc.c
    93         $(AWK) -f @srcdir@/awk.svc THEPROG="remdeb.h" tmpSvc.c >$@
    94         @rm -f tmpSvc.c
    95 
    96 preinstall:
    97         @rm -f $(X_FILES)
    98         @cp @srcdir@/$(X_FILE1) .
    99         @cp @srcdir@/$(RTEMS_CPU)/$(RTEMS_BSP)/$(X_FILE2) .
     21SUB_DIRS=$(RTEMS_CPU)
    10022
    10123Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • c/src/lib/librdbg/remdeb.x

    r4ad3d37 r9572c41  
    108108};
    109109
    110 #include "remdeb_f.x"
     110#include FRONTEND
    111111
    112112const MAXDEBUGGEE= 150;
  • c/src/librdbg/src/Makefile.in

    r4ad3d37 r9572c41  
    1414PROJECT_ROOT = @PROJECT_ROOT@
    1515
    16 VPATH = @srcdir@:@srcdir@/$(RTEMS_CPU)
     16VPATH = @srcdir@
    1717
    18 LIBNAME=librdbg.a
    19 LIB=${ARCH}/${LIBNAME}
     18include $(RTEMS_ROOT)/make/custom/${RTEMS_BSP}.cfg
     19include $(RTEMS_ROOT)/make/directory.cfg
    2020
    21 # C and C++ source names, if any, go here -- minus the .c or .cc
    22 C_PIECES= rdbg servcon servbkpt servrpc excep \
    23           servtgt servtsp servutil _servtgt rdbg_f \
    24           ptrace
    25 C_FILES=$(C_PIECES:%=%.c)
    26 C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
    27 
    28 # Asm source names, if any, go here -- minus the .s
    29 ASM_PIECES= rdbg_cpu_asm
    30 ASM_FILES=$(ASM_PIECES:%=%.s)
    31 ASM_O_FILES=$(ASM_PIECES:%=${ARCH}/%.o)
    32 
    33 # Generated C source names, if any, go here -- minus the .c
    34 C_GEN_PIECES= remdeb_xdr remdeb_svc
    35 C_GEN_FILES=$(C_GEN_PIECES:%=%.c)
    36 C_GEN_O_FILES=$(C_GEN_PIECES:%=${ARCH}/%.o)
    37 
    38 # H source names, if any, go here -- minus the .h
    39 H_PIECES=remdeb
    40 H_FILES=$(H_PIECES:%=%.h)
    41 
    42 # X source names, if any, go here -- minus the .x
    43 X_FILE1=remdeb.x
    44 X_FILE2=remdeb_f.x
    45 X_FILES=$(X_FILE1) $(X_FILE2)
    46 
    47 SRCS=$(C_FILES) $(ASM_FILES) $(C_GEN_FILES) $(H_FILES)
    48 OBJS=$(C_GEN_O_FILES) $(C_O_FILES) $(ASM_O_FILES)
    49 
    50 RPCGEN=@RPCGEN@
    51 AWK=@AWK@
    52 
    53 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    54 include $(RTEMS_ROOT)/make/lib.cfg
    55 
    56 #
    57 # Add local stuff here using +=
    58 #
    59 
    60 DEFINES  +=
    61 CPPFLAGS +=
    62 CFLAGS   +=
    63 
    64 #
    65 # Add your list of files to delete here.  The config files
    66 #  already know how to delete some stuff, so you may want
    67 #  to just run 'make clean' first to see what gets missed.
    68 #  'make clobber' already includes 'make clean'
    69 #
    70 
    71 CLEAN_ADDITIONS += $(LIB) $(H_FILES) $(X_FILES) $(C_GEN_FILES)
    72 CLOBBER_ADDITIONS +=
    73 
    74 all:    ${ARCH} $(LIB)
    75         $(INSTALL_VARIANT) -m 644 $(LIB) ${PROJECT_RELEASE}/lib
    76 
    77 $(LIB): $(SRCS) ${OBJS}
    78         $(make-library)
    79 
    80 remdeb.h: $(X_FILES)
    81         @rm -f $@
    82         $(RPCGEN) -h remdeb.x -o $@
    83         @rm -f $(PROJECT_INCLUDE)/rdbg/$@
    84         $(INSTALL_CHANGE) -m 444 $@ $(PROJECT_INCLUDE)/rdbg
    85 
    86 remdeb_xdr.c: $(X_FILES)
    87         @rm -f $@
    88         $(RPCGEN) -c remdeb.x -o $@
    89 
    90 remdeb_svc.c: $(X_FILES)
    91         @rm -f $@ tmpSvc.c
    92         $(RPCGEN) -s udp remdeb.x -o tmpSvc.c
    93         $(AWK) -f @srcdir@/awk.svc THEPROG="remdeb.h" tmpSvc.c >$@
    94         @rm -f tmpSvc.c
    95 
    96 preinstall:
    97         @rm -f $(X_FILES)
    98         @cp @srcdir@/$(X_FILE1) .
    99         @cp @srcdir@/$(RTEMS_CPU)/$(RTEMS_BSP)/$(X_FILE2) .
     21SUB_DIRS=$(RTEMS_CPU)
    10022
    10123Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • c/src/librdbg/src/remdeb.x

    r4ad3d37 r9572c41  
    108108};
    109109
    110 #include "remdeb_f.x"
     110#include FRONTEND
    111111
    112112const MAXDEBUGGEE= 150;
  • make/custom/force386.cfg

    r4ad3d37 r9572c41  
    2525# to enable it.
    2626HAS_NETWORKING=no
     27
     28# This BSP does not support librdbg
     29HAS_RDBG=no
    2730
    2831#  This section makes the target dependent options file.
  • make/custom/i386ex.cfg

    r4ad3d37 r9572c41  
    2121# -O4 is ok for RTEMS
    2222CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
     23
     24# This BSP does not support librdbg
     25HAS_RDBG=no
    2326
    2427#  This section makes the target dependent options file.
Note: See TracChangeset for help on using the changeset viewer.