summaryrefslogtreecommitdiffstats
path: root/make/custom/pc386.cfg
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-05-14 16:26:47 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-05-14 16:26:47 +0000
commit9e7d42dd149f3c3ea8dada1b1a85799a694c1ff6 (patch)
treee20bb81bcec2213483def63be6c452a99af90644 /make/custom/pc386.cfg
parentAdded testing for C++ exceptions from Rosimildo DaSilva (diff)
downloadrtems-9e7d42dd149f3c3ea8dada1b1a85799a694c1ff6.tar.bz2
Added C++ linking rule from Rosimildo DaSilva <rdasilva@connecttel.com>.
Diffstat (limited to '')
-rw-r--r--make/custom/pc386.cfg21
1 files changed, 20 insertions, 1 deletions
diff --git a/make/custom/pc386.cfg b/make/custom/pc386.cfg
index a80abe2d2e..6fb2dcc338 100644
--- a/make/custom/pc386.cfg
+++ b/make/custom/pc386.cfg
@@ -89,7 +89,7 @@ define make-exe
-Wl,--oformat,elf32-i386 -o $(basename $@).obj \
-o $(basename $@).obj \
$(LINK_OBJS) $(LINK_LIBS)
- $(OBJCOPY) -O a.out-i386 \
+ $(OBJCOPY) -O elf32-i386 \
--remove-section=.rodata \
--remove-section=.comment \
--remove-section=.note \
@@ -103,6 +103,25 @@ define make-exe
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
-o $(basename $@).coff $(LINK_OBJS) $(LINK_LIBS)
endef
+define make-cxx-exe
+ $(CXX) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
+ -Wl,--oformat,elf32-i386 -o $(basename $@).obj \
+ -o $(basename $@).obj \
+ $(LINK_OBJS) $(LINK_LIBS)
+ $(OBJCOPY) -O elf32-i386 \
+ --remove-section=.rodata \
+ --remove-section=.comment \
+ --remove-section=.note \
+ --strip-unneeded $(basename $@).obj $@
+ $(OBJCOPY) -O binary $(basename $@).obj $(basename $@).bin
+ $(PROJECT_TOOLS)/bin2boot -v $(basename $@).bt $(HEADERADDR)\
+ $(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
+ $(NM) -g -n $(basename $@).obj > $(basename $@).num
+ $(SIZE) $(basename $@).obj
+ $(INSTALL_VARIANT) -m 555 $(basename $@).bt ${PROJECT_RELEASE}/BootImgs
+ $(CXX) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
+ -o $(basename $@).coff $(LINK_OBJS) $(LINK_LIBS)
+endef
endif
# Miscellaneous additions go here