BIN_TO_OBJ: Switch egrep and cut to $(GREP). Use posix format and decimal radix with $(NM).

This commit is contained in:
Michal Ulianko 2015-03-20 23:22:42 +01:00
parent c5ae02deda
commit 354809bff4
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ define BIN_TO_OBJ
$(Q) $(ECHO) > $2.c
$(call COMPILE,$2.c,$2.c.o)
$(Q) $(LD) -r -o $2.bin.o $2.c.o -b binary $1
$(Q) $(ECHO) "const unsigned int $3_len = 0x`$(NM) $2.bin.o | egrep $(call BIN_SYM_PREFIX,$1)_size$$ | cut -d' ' -f1`;" > $2.c
$(Q) $(ECHO) "const unsigned int $3_len = `$(NM) -p --radix=d $2.bin.o | $(GREP) $(call BIN_SYM_PREFIX,$1)_size$$ | $(GREP) -o ^[0-9]*`;" > $2.c
$(call COMPILE,$2.c,$2.c.o)
$(Q) $(LD) -r -o $2 $2.c.o $2.bin.o
$(Q) $(OBJCOPY) $2 \