objdump output parsing expects C locale strings and formatting. Make sure it gets what it requires.
Signed-off-by: Patrick Georgi pgeorgi@google.com --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile index eecb8a1..9191509 100644 --- a/Makefile +++ b/Makefile @@ -158,9 +158,9 @@ $(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)ccode16.o $(O $(Q)$(CC) $(CFLAGS32FLAT) -c $(OUT)version.c -o $(OUT)version.o $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o - $(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump - $(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump - $(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump + $(Q)LC_ALL=C $(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump + $(Q)LC_ALL=C $(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump + $(Q)LC_ALL=C $(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump $(Q)$(PYTHON) ./scripts/layoutrom.py $(OUT)code16.o.objdump $(OUT)code32seg.o.objdump $(OUT)code32flat.o.objdump $(OUT)$(KCONFIG_AUTOHEADER) $(OUT)romlayout16.lds $(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds
# These are actually built by scripts/layoutrom.py above, but by pulling them
On Mon, Dec 01, 2014 at 10:56:09PM +0100, Patrick Georgi wrote:
objdump output parsing expects C locale strings and formatting. Make sure it gets what it requires.
Signed-off-by: Patrick Georgi pgeorgi@google.com
Thanks.
Your patch misses the call to OBJDUMP in bios.bin.prep though. Does the alternate patch below work?
-Kevin
--- a/Makefile +++ b/Makefile @@ -158,6 +158,7 @@ $(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)ccode16.o $(O $(Q)$(CC) $(CFLAGS32FLAT) -c $(OUT)version.c -o $(OUT)version.o $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o + $(Q)export LC_ALL=C $(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump $(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump $(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump @@ -182,6 +183,7 @@ $(OUT)rom.o: $(OUT)rom16.strip.o $(OUT)rom32seg.strip.o $(OUT)code32flat.o $(OUT $(OUT)bios.bin.prep: $(OUT)rom.o scripts/checkrom.py @echo " Prepping $@" $(Q)rm -f $(OUT)bios.bin $(OUT)Csm16.bin $(OUT)bios.bin.elf + $(Q)export LC_ALL=C $(Q)$(OBJDUMP) -thr $< > $<.objdump $(Q)$(OBJCOPY) -O binary $< $(OUT)bios.bin.raw $(Q)$(PYTHON) ./scripts/checkrom.py $<.objdump $(CONFIG_ROM_SIZE) $(OUT)bios.bin.raw $(OUT)bios.bin.prep
On Di, 2014-12-02 at 10:40 -0500, Kevin O'Connor wrote:
On Mon, Dec 01, 2014 at 10:56:09PM +0100, Patrick Georgi wrote:
objdump output parsing expects C locale strings and formatting. Make sure it gets what it requires.
Signed-off-by: Patrick Georgi pgeorgi@google.com
Thanks.
Your patch misses the call to OBJDUMP in bios.bin.prep though. Does the alternate patch below work?
-Kevin
--- a/Makefile +++ b/Makefile @@ -158,6 +158,7 @@ $(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)ccode16.o $(O $(Q)$(CC) $(CFLAGS32FLAT) -c $(OUT)version.c -o $(OUT)version.o $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o
$(Q)export LC_ALL=C $(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump $(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump $(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump
I suspect this isn't going to fly as each makefile line is run separately.
How about this:
diff --git a/Makefile b/Makefile index 7c2b33c..f2f80e2 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ export HOSTCC := $(CC) export CONFIG_SHELL := sh export KCONFIG_AUTOHEADER := autoconf.h export KCONFIG_CONFIG := $(CURDIR)/.config +export LC_ALL := C CROSS_PREFIX= ifneq ($(CROSS_PREFIX),) CC=$(CROSS_PREFIX)gcc
cheers, Gerd
On Wed, Dec 03, 2014 at 11:16:39AM +0100, Gerd Hoffmann wrote:
On Di, 2014-12-02 at 10:40 -0500, Kevin O'Connor wrote:
On Mon, Dec 01, 2014 at 10:56:09PM +0100, Patrick Georgi wrote:
objdump output parsing expects C locale strings and formatting. Make sure it gets what it requires.
Signed-off-by: Patrick Georgi pgeorgi@google.com
Thanks.
Your patch misses the call to OBJDUMP in bios.bin.prep though. Does the alternate patch below work?
I suspect this isn't going to fly as each makefile line is run separately.
Yeah - Patrick pointed that out to me separately.
How about this:
diff --git a/Makefile b/Makefile index 7c2b33c..f2f80e2 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ export HOSTCC := $(CC) export CONFIG_SHELL := sh export KCONFIG_AUTOHEADER := autoconf.h export KCONFIG_CONFIG := $(CURDIR)/.config +export LC_ALL := C
Does that impact kconfig?
-Kevin