source: rtems/make/custom/i386ex.cfg @ 9572c41

4.104.114.84.95
Last change on this file since 9572c41 was 9572c41, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 19, 1999 at 1:11:13 PM

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.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1#
2#  Config file for the i386ex BSP
3#
4#  $Id$
5#
6
7include $(RTEMS_ROOT)/make/custom/default.cfg
8
9RTEMS_CPU=i386
10RTEMS_CPU_MODEL=i386_nofp
11
12# This is the actual bsp directory used during the build process.
13RTEMS_BSP_FAMILY=i386ex
14
15#  This contains the compiler options necessary to select the CPU model
16#  and (hopefully) optimize for it.
17#
18CPU_CFLAGS =
19
20# optimize flag: typically -0, could use -O4 or -fast
21# -O4 is ok for RTEMS
22CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
23
24# This BSP does not support librdbg
25HAS_RDBG=no
26
27#  This section makes the target dependent options file.
28
29#  NDEBUG (C library)
30#     if defined asserts do not generate code.  This is commonly used
31#     as a command line option.
32#
33#  RTEMS_TEST_NO_PAUSE (RTEMS tests)
34#     do not pause between screens of output in the rtems tests
35#
36#  RTEMS_DEBUG (RTEMS)
37#     If defined, debug checks in RTEMS and support library code are enabled.
38
39define make-target-options
40        @echo "/* #define NDEBUG 1 */ "                     >>$@
41        @echo "#define RTEMS_TEST_NO_PAUSE 1"               >>$@
42        @echo "/* #define RTEMS_DEBUG  1 */"                >>$@
43endef
44
45#  Something like this should produce a map file but this does not work.
46
47#     -Xlinker "-Map $(basename $@).map" $(LINK_OBJS)
48#
49#  This is a good way to get debug information.  The rdmp file is large
50#  though (1.9 Mb for hello) and greatly slows the build process.
51# $(OBJDUMP) -x -m i386 -d $(basename $@).coff > $(basename $@).rdmp
52
53# The following are definitions of make-exe which will work using ld as
54# is currently required.  It is expected that as of gcc 2.8, the end user
55# will be able to override parts of the compilers specs and link using gcc.
56
57ifeq ($(RTEMS_USE_GCC272),yes)
58define make-exe
59        $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).coff \
60            -noinhibit-exec -Map $(basename $@).map \
61            $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
62        $(OBJCOPY) -O srec $(basename $@).coff $(basename $@).i
63        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
64                  $(PACKHEX) > $(basename $@).exe
65        $(NM) -g -n $(basename $@).coff > $(basename $@).num
66        $(SIZE) $(basename $@).coff
67endef
68else
69define make-exe
70        $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).coff \
71            $(LINK_OBJS) $(LINK_LIBS)
72        $(OBJCOPY) -O srec $(basename $@).coff $(basename $@).i
73        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
74                  $(PACKHEX) > $(basename $@).exe
75        $(NM) -g -n $(basename $@).coff > $(basename $@).num
76        $(SIZE) $(basename $@).coff
77endef
78endif
79
80# Miscellaneous additions go here
81
Note: See TracBrowser for help on using the repository browser.