diff options
author | Koushik Dutta <koushd@gmail.com> | 2012-06-01 13:30:25 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-06 16:36:48 -0700 |
commit | 7183896361e77cec12942aec3f4e57ae5d03efcc (patch) | |
tree | f3c4bb56ae695ec7c734e45ddd7077f02f888721 /core/combo/HOST_darwin-x86.mk | |
parent | 031a0b63382fd20de97647f5f4da8ed4e7b52dc0 (diff) | |
download | build-7183896361e77cec12942aec3f4e57ae5d03efcc.zip build-7183896361e77cec12942aec3f4e57ae5d03efcc.tar.gz build-7183896361e77cec12942aec3f4e57ae5d03efcc.tar.bz2 |
Fix file-size stats on OSX
Kernel makefiles that the stat on the system is GNU stat. GNU stat uses the "-c" option to specify format.
Darwin stat uses the "-f" option to specify format. This discrepency will cause kernel build breaks.
On my system, I symlink stat to GNU stat. This causes the "get-file-size" define
to fail.
The fix for this is to detect "gstat", aka GNU stat, and use that appropriately.
Change-Id: I987c155b7dc3ff14ffe6da40edf834ca34b7df75
Fix up the get-file-size function that was broken due to the prior commit that made it utilize gnu stat (gstat)
Change-Id: I24bba2bfcb509ad1ad76d2260eedd685ba45c393
Diffstat (limited to 'core/combo/HOST_darwin-x86.mk')
-rw-r--r-- | core/combo/HOST_darwin-x86.mk | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk index e77fd21..26e2069 100644 --- a/core/combo/HOST_darwin-x86.mk +++ b/core/combo/HOST_darwin-x86.mk @@ -102,5 +102,10 @@ endef # $(1): The file to check define get-file-size -stat -f "%z" $(1) +GSTAT=$(which gstat) ; \ +if [ ! -z "$GSTAT" ]; then \ +gstat -c "%s" $(1) ; \ +else \ +stat -f "%z" $(1) ; \ +fi endef |