Allow user to override endian check for cross-compilation

This commit is contained in:
Kp 2013-03-23 02:46:45 +00:00
parent 76f25e8d7c
commit 1b69757872

View file

@ -14,6 +14,11 @@ class argumentIndirection:
# endianess-checker
def checkEndian():
if ARGUMENTS.has_key('endian'):
r = ARGUMENTS['endian']
if r == "little" or r == "big":
return r
raise SCons.Errors.UserError("Unknown endian value: %s" % r)
import struct
array = struct.pack('cccc', '\x01', '\x02', '\x03', '\x04')
i = struct.unpack('i', array)