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

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

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.3 KB
Line 
1#
2#  Config file for the force386 BSP
3#
4#  $Id$
5#
6
7include $(RTEMS_ROOT)/make/custom/default.cfg
8
9RTEMS_CPU=i386
10RTEMS_CPU_MODEL=i386_fp
11
12# This is the actual bsp directory used during the build process.
13RTEMS_BSP_FAMILY=force386
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 target does NOT support the TCP/IP stack so ignore requests
25# to enable it.
26HAS_NETWORKING=no
27
28# This BSP does not support librdbg
29HAS_RDBG=no
30
31#  This section makes the target dependent options file.
32
33#  NDEBUG (C library)
34#     if defined asserts do not generate code.  This is commonly used
35#     as a command line option.
36#
37#  RTEMS_TEST_NO_PAUSE (RTEMS tests)
38#     do not pause between screens of output in the rtems tests
39#
40#  RTEMS_DEBUG (RTEMS)
41#     If defined, debug checks in RTEMS and support library code are enabled.
42
43define make-target-options
44        @echo "/* #define NDEBUG 1 */ "                     >>$@
45        @echo "#define RTEMS_TEST_NO_PAUSE 1"               >>$@
46        @echo "/* #define RTEMS_DEBUG  1 */"                >>$@
47endef
48
49# Here is the rule to actually build a $(ARCH)/foo.exe
50# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
51# Usage ref: src/tests/sptest/sp1/Makefile
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 $@).nxe \
60            $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
61        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
62        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
63            $(PACKHEX) > $(basename $@).exe
64        $(NM) -g -n $(basename $@).nxe > $(basename $@).num
65        $(SIZE) $(basename $@).nxe
66endef
67else
68define make-exe
69        $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
70            $(LINK_OBJS) $(LINK_LIBS)
71        $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
72        $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
73            $(PACKHEX) > $(basename $@).exe
74        $(NM) -g -n $(basename $@).nxe > $(basename $@).num
75        $(SIZE) $(basename $@).nxe
76endef
77endif
78
79# Miscellaneous additions go here
80
Note: See TracBrowser for help on using the repository browser.