source: rtems/make/custom/pc386.cfg @ 6bdfa7a

4.104.114.84.9
Last change on this file since 6bdfa7a was 7d12e020, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jan 18, 2007 at 11:24:48 AM

Add -g to CFLAGS_OPTIMIZE_V.

  • Property mode set to 100644
File size: 3.1 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 -O2
24CFLAGS_OPTIMIZE_V = -O2 -g
25
26# Here is the rule to actually build a $(ARCH)/foo.exe
27# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
28# Usage ref: src/tests/sptest/sp1/Makefile
29
30#+--------------------------------------------------------------------------+
31#| Set the value of RELOCADDR to the address where you want your image to
32#| load. If you'll be using GRUB to load the images it will have to be >=
33#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
34#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
35#| top is of course another limit. Make sure there is enough space before the
36#| upper memory limits for the image and the memory allocated by it to fit.
37#| Make sure the value you choose is aligned to 4 bytes.
38#+--------------------------------------------------------------------------+
39  RELOCADDR=0x00100000
40
41START16FILE=$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin
42START16ADDR=0x00097C00
43HEADERADDR=0x00097E00
44
45# The following are definitions of make-exe which will work using ld as
46# is currently required.
47
48define make-exe
49        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
50            -o $(basename $@).elf \
51            $(LINK_OBJS) $(LINK_LIBS)
52        $(OBJCOPY) -O elf32-i386 \
53            --remove-section=.rodata \
54            --remove-section=.comment \
55            --remove-section=.note \
56            --strip-unneeded $(basename $@).elf $@
57        $(OBJCOPY) -O binary $(basename $@).elf $(basename $@).bin
58        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
59          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
60        $(NM) -g -n $(basename $@).elf > $(basename $@).num
61        $(SIZE) $(basename $@).elf
62#       test -d ${PROJECT_RELEASE}/BootImgs \
63#         || mkdir ${PROJECT_RELEASE}/BootImgs
64#       f=`basename $@ .exe`; \
65#        cp $(basename $@).bt \
66#           ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
67#       && chmod 755 \
68#         ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
69#       $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
70#           -o $@ $(LINK_OBJS) $(LINK_LIBS)
71endef
72define make-cxx-exe
73        $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \
74           -Wl,-Ttext,$(RELOCADDR) -o $(basename $@).elf \
75            $(LINK_OBJS) $(LINK_LIBS)
76        $(OBJCOPY) -O elf32-i386 \
77            --remove-section=.rodata \
78            --remove-section=.comment \
79            --remove-section=.note \
80            --strip-unneeded $(basename $@).elf $@
81        $(OBJCOPY) -O binary $(basename $@).elf $(basename $@).bin
82        $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
83          $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
84        $(NM) -g -n $(basename $@).elf > $(basename $@).num
85        $(SIZE) $(basename $@).elf
86endef
87
88# Miscellaneous additions go here
89
90# BSP-specific tools
91BIN2BOOT=$(PROJECT_TOOLS)/bin2boot
Note: See TracBrowser for help on using the repository browser.