d15570c093102d943f704597d5258f1a8c28b8d2
[openwrt.git] / package / busybox / patches / 904-build.patch
1 --- a/applets/usage_compressed
2 +++ b/applets/usage_compressed
3 @@ -14,14 +14,21 @@
4  
5  echo 'static const char packed_usage[] ALIGN1 = {'
6  
7 -# Extra effort to avoid using "od -t x1": -t is not available
8 -# in non-CONFIG_DESKTOPed busybox od
9 +## Breaks on big-endian systems!
10 +## # Extra effort to avoid using "od -t x1": -t is not available
11 +## # in non-CONFIG_DESKTOPed busybox od
12 +## 
13 +## "$loc/usage" | bzip2 -1 | od -v -x \
14 +## | $SED -e 's/^[^ ]*//' \
15 +## | $SED -e 's/ //g' \
16 +## | grep -v '^$' \
17 +## | $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
18  
19 -"$loc/usage" | bzip2 -1 | od -v -x \
20 +"$loc/usage" | bzip2 -1 | od -v -t x1 \
21  | $SED -e 's/^[^ ]*//' \
22  | $SED -e 's/ //g' \
23  | grep -v '^$' \
24 -| $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
25 +| $SED -e 's/\(..\)/0x\1,/g'
26  
27  echo '};'
28  echo '#define SIZEOF_usage_messages' `expr 0 + $sz`