build system: improve portability

There are too many differences, and calculating relatively
large integer using floats might not be the brightest idea

Also avoid relying on ls(1) output format to determine file sizes.

Change-Id: I5f96c036737b74e20f525c3dc9edc011ad403662
Signed-off-by: Patrick Georgi <>
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <>
Reviewed-by: Paul Menzel <>
3 files changed