]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
xen: fix reloc.S generation for non-gnu toolchain
authorChristoph Egger <Christoph.Egger@amd.com>
Sat, 2 Apr 2011 14:53:35 +0000 (15:53 +0100)
committerChristoph Egger <Christoph.Egger@amd.com>
Sat, 2 Apr 2011 14:53:35 +0000 (15:53 +0100)
The output of AT&T UNIX and GNU od(1) are different.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
xen/arch/x86/boot/build32.mk

index 447033afd2b4acaa2b6cd2eebc89b4ba46b09476..185f9452d2635f19a58cb3316e73cc16b5d1c9b4 100644 (file)
@@ -9,8 +9,8 @@ CFLAGS := $(filter-out -flto,$(CFLAGS))
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
 %.S: %.bin
-       (od -v -t x $< | awk 'NR > 1 {print s} {s=$$0}' | \
-       sed 's/ /,0x/g' | sed 's/^[0-9]*,/ .long /') >$@
+       (od -v -t x $< | tr -s ' ' | awk 'NR > 1 {print s} {s=$$0}' | \
+       sed 's/ /,0x/g' | sed 's/,0x$$//' | sed 's/^[0-9]*,/ .long /') >$@
 
 %.bin: %.lnk
        $(OBJCOPY) -O binary $< $@