summaryrefslogtreecommitdiffstats
path: root/make/custom/pc386.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'make/custom/pc386.cfg')
-rw-r--r--make/custom/pc386.cfg44
1 files changed, 5 insertions, 39 deletions
diff --git a/make/custom/pc386.cfg b/make/custom/pc386.cfg
index 48e9613ec3..c5836a6eea 100644
--- a/make/custom/pc386.cfg
+++ b/make/custom/pc386.cfg
@@ -23,7 +23,7 @@ RTEMS_BSP_FAMILY=pc386
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g
-# Here is the rule to actually build a $(ARCH)/foo.exe
+# Here is the rule to actually build a $(ARCH)/foo$(EXEEXT)
# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
# Usage ref: src/tests/sptest/sp1/Makefile
@@ -42,54 +42,20 @@ START16FILE=$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin
START16ADDR=0x00097C00
HEADERADDR=0x00097E00
-# The following are definitions of make-exe which will work using ld as
-# is currently required.
-
-define bsp-link-c
- $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
- -o $(basename $@)$(EXEEXT) \
- $(LINK_OBJS) $(LINK_LIBS)
-endef
-
-define bsp-link-cxx
- $(LINK.cc) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
- -o $(basename $@)$(EXEEXT) \
- $(LINK_OBJS) $(LINK_LIBS)
-endef
+AM_LDFLAGS+= -Wl,-Ttext,$(RELOCADDR)
define bsp-post-link
+ $(default-bsp-post-link)
$(OBJCOPY) -O elf32-i386 \
--remove-section=.rodata \
--remove-section=.comment \
--remove-section=.note \
--strip-unneeded $(basename $@)$(EXEEXT) $(basename $@).nxe
$(OBJCOPY) -O binary $(basename $@).nxe $(basename $@).bin
- $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
+ $(PROJECT_TOOLS)/bin2boot -v $(basename $@)$(DOWNEXT) $(HEADERADDR)\
$(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
- $(NM) -g -n $(basename $@)$(EXEEXT) > $(basename $@).num
- $(SIZE) $(basename $@)$(EXEEXT)
-# test -d ${PROJECT_RELEASE}/BootImgs \
-# || mkdir ${PROJECT_RELEASE}/BootImgs
-# f=`basename $@ .exe`; \
-# cp $(basename $@).bt \
-# ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
-# && chmod 755 \
-# ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
-# $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
-# -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ rm -f $(basename $@).nxe
endef
-define make-exe
- $(bsp-link-c)
- $(bsp-post-link)
-endef
-
-define make-cxx-exe
- $(bsp-link-cxx)
- $(bsp-post-link)
-endef
-
-# Miscellaneous additions go here
-
# BSP-specific tools
BIN2BOOT=$(PROJECT_TOOLS)/bin2boot