source: rtems/make/custom/pc386.cfg @ b8a30d07

4.104.114.84.95
Last change on this file since b8a30d07 was b8a30d07, checked in by Joel Sherrill <joel.sherrill@…>, on 07/13/00 at 15:05:38

Patch rtems-rc-20000713-1-cvs.diff from Ralf Corsepius <corsepiu@…>
that is yet another multilib-related structual cleanup patch:

Changes:

  • Make RTEMS_TEST_NO_PAUSE a tests/ subpackage specific option.
    • Remove RTEMS_TEST_NO_PAUSE from custom/*.cfg, targopts.h and cpuopts.h.
    • Add autoconf macros RTEMS_*_RTEMS_TEST_NO_PAUSE (aclocal/rtems-test-no-pause.m4).
    • Add RTEMS_*_RTEMS_TEST_NO_PAUSE support to sptests/configure.ins and tmtests/configure.in. These are the only subdirectories which currently apply RTEMS_TEST_NO_PAUSE.
    • Add autoconf-DEFS support to all test subpackages' configure.ins below tests/. I.e. AC_DEFINES now get explicitly propagated as preprocessor defines into Makefiles, cf. AM_CPPFLAGS in tests/*/*.am, instead of using a global config-files.
    • Remove NDEBUG from custom/*.cfg.
  • AC_DEFINE POSIX_API, ITRON_API and MULTIPROCESSING in exec/configure.in, only.
    • All other sources now should relay on the values from cpuopts.h and should not define them themselves.
    • Several related changes to many configure.ins
  • Bug-fixes to RTEMS_*_RTEMS_DEBUG macros (Actually workarounds to quoting bugs in autoconf).

Notes:

  • This patch is rather immature and only tested for a small subset of BSPs (requires the tests to be enabled and therefore takes an tremendous amount of disc space and time.)
  • The patches to *cfg were generated by a script. Expect file formating changes :)
  • Property mode set to 100644
File size: 4.7 KB
Line 
1#
2#  Config file for the PC 386 BSP
3#
4#  $Id$
5#
6
7include $(RTEMS_ROOT)/make/custom/default.cfg
8
9RTEMS_CPU=i386
10ifeq ($(RTEMS_CPU_MODEL),)
11RTEMS_CPU_MODEL=i386_fp
12endif
13
14# This is the actual bsp directory used during the build process.
15RTEMS_BSP_FAMILY=pc386
16
17#  This contains the compiler options necessary to select the CPU model
18#  and (hopefully) optimize for it.
19#
20# NOTE: CPU_CFLAGS is set by pc386 variants.
21# CPU_CFLAGS =
22
23# optimize flag: typically -0, could use -O4 or -fast
24# -O4 is ok for RTEMS
25# -fomit-frame-pointer breaks debugging and C++ exceptions
26CFLAGS_OPTIMIZE_V=-O4
27
28#  This section makes the target dependent options file.
29
30define make-target-options
31endef
32
33# Here is the rule to actually build a $(ARCH)/foo.exe
34# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
35# Usage ref: src/tests/sptest/sp1/Makefile
36
37#+--------------------------------------------------------------------------+
38#| Set the value of RELOCADDR to the address where you want your image to
39#| load. If you'll be using GRUB to load the images it will have to be >=
40#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
41#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
42#| top is of course another limit. Make sure there is enough space before the
43#| upper memory limits for the image and the memory allocated by it to fit.
44#| Make sure the value you choose is aligned to 4 bytes.
45#+--------------------------------------------------------------------------+
46  RELOCADDR=0x00100000
47
48START16FILE=$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin
49START16ADDR=0x00097C00
50HEADERADDR=0x00097E00
51
52# The following are definitions of make-exe which will work using ld as
53# is currently required.  It is expected that as of gcc 2.8, the end user
54# will be able to override parts of the compilers specs and link using gcc.
55
56ifeq ($(RTEMS_USE_GCC272),yes)
57define make-exe
58        $(LD) -N -T $(LINKCMDS) -Ttext $(RELOCADDR) -e start -nostdlib \
59           -o $(basename $@).obj \
60           $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
61        $(OBJCOPY) -O a.out-i386 \
62            --remove-section=.rodata \
63            --remove-section=.comment \
64            --remove-section=.note \
65            --strip-unneeded $(basename $@).obj $@
66        $(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
67        $(BIN2BOOT) -v $(basename $@).bt $(HEADERADDR)\
68          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
69        $(NM) -g -n $(basename $@).obj > $(basename $@).num
70        $(SIZE) $(basename $@).obj
71        test -d ${PROJECT_RELEASE}/BootImgs \
72          || mkdir ${PROJECT_RELEASE}/BootImgs
73        cp $(basename $@).bt \
74            ${PROJECT_RELEASE}/BootImgs/$(basename $@)$(LIB_VARIANT).bt
75        chmod 755 \
76          ${PROJECT_RELEASE}/BootImgs/$(basename $@)$(LIB_VARIANT).bt
77endef
78else
79define make-exe
80        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
81            -o $(basename $@).obj \
82            $(LINK_OBJS) $(LINK_LIBS)
83        $(OBJCOPY) -O elf32-i386 \
84            --remove-section=.rodata \
85            --remove-section=.comment \
86            --remove-section=.note \
87            --strip-unneeded $(basename $@).obj $@
88        $(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
89        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
90          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
91        $(NM) -g -n $(basename $@).obj > $(basename $@).num
92        $(SIZE) $(basename $@).obj
93        test -d ${PROJECT_RELEASE}/BootImgs \
94          || mkdir ${PROJECT_RELEASE}/BootImgs
95        f=`basename $@ .exe`; \
96        cp $(basename $@).bt \
97            ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
98        && chmod 755 \
99          ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
100        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
101            -o $@ $(LINK_OBJS) $(LINK_LIBS)
102endef
103define make-cxx-exe
104        $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \
105           -Wl,-Ttext,$(RELOCADDR) -o $(basename $@).obj \
106            $(LINK_OBJS) $(LINK_LIBS)
107        $(OBJCOPY) -O elf32-i386 \
108            --remove-section=.rodata \
109            --remove-section=.comment \
110            --remove-section=.note \
111            --strip-unneeded $(basename $@).obj $@
112        $(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
113        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
114          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
115        $(NM) -g -n $(basename $@).obj > $(basename $@).num
116        $(SIZE) $(basename $@).obj
117        test -d ${PROJECT_RELEASE}/BootImgs \
118          || mkdir ${PROJECT_RELEASE}/BootImgs
119        f=`basename $@ .exe`; \
120        cp $(basename $@).bt \
121            ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
122        && chmod 755 \
123          ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
124        $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \
125            -Wl,-Ttext,$(RELOCADDR) \
126            -o $(basename $@).coff $(LINK_OBJS) $(LINK_LIBS)
127endef
128endif
129
130# Miscellaneous additions go here
131
132# BSP-specific tools
133BIN2BOOT=$(PROJECT_TOOLS)/bin2boot
Note: See TracBrowser for help on using the repository browser.