From: H. Peter Anvin on 14 Jul 2010 11:00 On 07/14/2010 07:01 AM, Alexander Shishkin wrote: > +size_append = $(PERL) -e 'print pack("V", (stat "$(lastword $1)")[7])' Why the "lastword"? -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Sam Ravnborg on 14 Jul 2010 11:30 On Wed, Jul 14, 2010 at 05:01:03PM +0300, Alexander Shishkin wrote: > The current implementation has been several times fixed to work around > different shells and build environments and it remains a somewhat tricky > shell script. This patch replaces all the dependencies by a single line > of perl. Build dependency on perl is not new, so that shouldn't be a > problem. > > The new implementation does exactly what it's supposed to: it outputs > a little-endian 32-bit unsigned integer of a file's length. > > This might simplify matters with different build environments and > different shells and is also considerably shorter and hopefully more > readable. Reminds me that I had a patch that moved this to mkpiggy.c. Goggle gave this hit: http://lists.openwall.net/linux-kernel/2009/12/20/92 I will try to update this to cover arm also and check if other archs needs this. In other word - move thes size stuff to mkpiggy so we skip this extra step. Sam -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Alexander Shishkin on 14 Jul 2010 12:20 On Wed, Jul 14, 2010 at 05:23:37 +0200, Sam Ravnborg wrote: > On Wed, Jul 14, 2010 at 05:01:03PM +0300, Alexander Shishkin wrote: > > The current implementation has been several times fixed to work around > > different shells and build environments and it remains a somewhat tricky > > shell script. This patch replaces all the dependencies by a single line > > of perl. Build dependency on perl is not new, so that shouldn't be a > > problem. > > > > The new implementation does exactly what it's supposed to: it outputs > > a little-endian 32-bit unsigned integer of a file's length. > > > > This might simplify matters with different build environments and > > different shells and is also considerably shorter and hopefully more > > readable. > > Reminds me that I had a patch that moved this to mkpiggy.c. > Goggle gave this hit: > > http://lists.openwall.net/linux-kernel/2009/12/20/92 Ok, thanks for the reference. > I will try to update this to cover arm also and check > if other archs needs this. > > In other word - move thes size stuff to mkpiggy so we > skip this extra step. Hm, maybe this mkpiggy can be made arch-independent and moved to scripts/ as well? Regards, -- Alex -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Alexander Shishkin on 14 Jul 2010 12:30 On Wed, Jul 14, 2010 at 07:54:43 -0700, H. Peter Anvin wrote: > On 07/14/2010 07:01 AM, Alexander Shishkin wrote: > > +size_append = $(PERL) -e 'print pack("V", (stat "$(lastword $1)")[7])' > > Why the "lastword"? There's a whitespace right after it due to it being part of the target spec "$(obj)/piggy.$(suffix_y) FORCE", where "FORCE" is being filtered out. Regards, -- Alex -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Michal Marek on 14 Jul 2010 12:40
On 07/14/2010 06:12 PM, Alexander Shishkin wrote: > On Wed, Jul 14, 2010 at 07:54:43 -0700, H. Peter Anvin wrote: >> On 07/14/2010 07:01 AM, Alexander Shishkin wrote: >>> +size_append = $(PERL) -e 'print pack("V", (stat "$(lastword $1)")[7])' >> >> Why the "lastword"? > > There's a whitespace right after it due to it being part of the target > spec "$(obj)/piggy.$(suffix_y) FORCE", where "FORCE" is being filtered > out. Then you should use $(strip $1), which is more obvious IMO. Michal -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |