uboot-mvebu: backport patch for Turris Omnia to enable LTO
[openwrt/openwrt.git] / scripts / ipkg-build
index 122cca2cb4c98cd8370ad1a9a824fcdf8e45d27b..6abcc588322dca15ad4070af1aea7b4a4e022c42 100755 (executable)
@@ -181,7 +181,7 @@ for file_mode in $file_modes; do
 done
 $TAR -X "$tmp_dir"/tarX --format=gnu --numeric-owner --sort=name -cpf - --mtime="$TIMESTAMP" . | gzip -n - > "$tmp_dir"/data.tar.gz
 
-installed_size=$(stat -c "%s" "$tmp_dir"/data.tar.gz)
+installed_size=$(zcat < "$tmp_dir"/data.tar.gz | wc -c)
 sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
        "$pkg_dir"/$CONTROL/control