[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Portability problem in rtems custom cfg's
- Date: Mon, 9 Aug 1999 17:38:53 -0400
- From: sotko at isr.com (David Sotkowitz)
- Subject: Portability problem in rtems custom cfg's
In the cfg sources, SED is used to remove CR-LF,and leave a LF on Unix.
The problem is, on NT, where the removal is unnecessary, a nibble is
removed from the checksum at the end of the srecord when generating the exe.
The bug is in RTEMS 4.0.0
The following diff provides a modification that will work. Alternately,
one could conditionalize on ostype.
--- rtems-current/make/custom/rwi5307.cfg.orig Mon Aug 09 12:55:00 1999
+++ rtems-current/make/custom/rwi5307.cfg Mon Aug 09 12:38:05 1999
@@ -71,7 +71,7 @@
$(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
$(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
- $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(SED) -e 's/\r$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
$(NM) -g -n $(basename $@).nxe > $(basename $@).num
$(SIZE) $(basename $@).nxe
@@ -81,7 +81,7 @@
$(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
- $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(SED) -e 's/\r$$//' -e '/^S0/d' $(basename $@).i | \
$(PROJECT_TOOLS)/packhex > $(basename $@).exe
$(NM) -g -n $(basename $@).nxe > $(basename $@).num
$(SIZE) $(basename $@).nxe
Other affected files with the same problem (all in make/custom):
dmv152.cfg
efi332.cfg
efi68k.cfg
force386.cfg
i386ex.cfg
idp.cfg
mvme136.cfg
mvme147.cfg
memv162.cfg
rwi5307.cfg (above)
sbc5206.cfg
sbc5307.cfg