Submitter | Patrick Georgi |
---|---|
Date | 2010-02-10 12:24:03 |
Message ID | <4B72A563.2000308@georgi-clan.de> |
Download | mbox | patch |
Permalink | /patch/897/ |
State | Accepted |
Headers | show |
Comments
On 2/10/10 1:24 PM, Patrick Georgi wrote: > Hi, > > attached patch replaces two perl calls with sed, and adds an alternative > for another two (using GNU date, and with limited impact if both > alternatives fail) > > Those were the remaining perl calls in our build tree, so remove perl > from our dependency list in README. > > > Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> > Acked-by: Stefan Reinauer <stepan@coresystems.de>
On Wed, Feb 10, 2010 at 01:24:03PM +0100, Patrick Georgi wrote: > Hi, > > attached patch replaces two perl calls with sed, and adds an alternative > for another two (using GNU date, and with limited impact if both > alternatives fail) Looks great, but why not remove the perl line completely and use date only? I think there's no benefit of keeping the perl alternative, correct? Uwe.
Am 10.02.2010 19:06, schrieb Uwe Hermann: > Looks great, but why not remove the perl line completely and use date only? > I think there's no benefit of keeping the perl alternative, correct? This way, it still works with non-GNU date, if perl is installed. My main point of removing perl is to support windows better (smaller toolchain required), and there, date is GNU. On most unix-alikes, either GNU date or perl are around. Patrick
Patch
Index: src/arch/i386/Makefile.inc =================================================================== --- src/arch/i386/Makefile.inc (revision 5104) +++ src/arch/i386/Makefile.inc (working copy) @@ -83,9 +83,8 @@ else $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h - $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $< -o $@ - perl -e 's/\.rodata/.rom.data/g' -pi $@ - perl -e 's/\.text/.section .rom.text/g' -pi $@ + $(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(src) -I. -c -S $< -o - | sed -e 's/\.rodata/.rom.data/g' -e 's/\.text/.section .rom.text/g' > $@.tmp + mv $@.tmp $@ endif endif Index: util/abuild/abuild =================================================================== --- util/abuild/abuild (revision 5104) +++ util/abuild/abuild (working copy) @@ -217,7 +217,7 @@ test 0$cpus -gt 1 && printf "on %d cpus in parallel .. " $cpus CURR=$( pwd ) - stime=`perl -e 'print time();'` + stime=`perl -e 'print time();' 2>/dev/null || date +%s` build_dir=$TARGET/${VENDOR}_${MAINBOARD} eval $MAKE $silent -j $cpus obj=${build_dir} \ &> ${build_dir}/make.log @@ -226,7 +226,7 @@ mv .xcompile ${build_dir}/xcompile.build mv ..config.tmp ${build_dir}/config.deps cd $TARGET/${VENDOR}_${MAINBOARD} - etime=`perl -e 'print time();'` + etime=`perl -e 'print time();' 2>/dev/null || date +%s` duration=$(( $etime - $stime )) if [ $ret -eq 0 ]; then xml " <compile>ok</compile>" Index: README =================================================================== --- README (revision 5104) +++ README (working copy) @@ -35,7 +35,6 @@ * gcc / g++ * make * python - * perl Optional:
Hi, attached patch replaces two perl calls with sed, and adds an alternative for another two (using GNU date, and with limited impact if both alternatives fail) Those were the remaining perl calls in our build tree, so remove perl from our dependency list in README. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>