summaryrefslogtreecommitdiff
path: root/target/linux/patches/2.6.39.4/arm-statcmd.patch
blob: 3aed60cbc5e69525680da51044c1fbc37c14dfc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
diff -Nur linux-2.6.39-rc6.orig/arch/arm/boot/compressed/Makefile linux-2.6.39-rc6/arch/arm/boot/compressed/Makefile
--- linux-2.6.39-rc6.orig/arch/arm/boot/compressed/Makefile	2011-05-04 04:59:13.000000000 +0200
+++ linux-2.6.39-rc6/arch/arm/boot/compressed/Makefile	2011-05-10 10:35:34.000000000 +0200
@@ -99,7 +99,7 @@
 asflags-y := -Wa,-march=all
 
 # Provide size of uncompressed kernel to the decompressor via a linker symbol.
-LDFLAGS_vmlinux = --defsym _image_size=$(shell stat -c "%s" $(obj)/../Image)
+LDFLAGS_vmlinux = --defsym _image_size=$(shell if stat -qs .>/dev/null 2>&1;then statcmd='stat -f %z';else statcmd='stat -c %s';fi; $$statcmd "%s" $(obj)/../Image)
 # Supply ZRELADDR to the decompressor via a linker symbol.
 ifneq ($(CONFIG_AUTO_ZRELADDR),y)
 LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR)