Allow user to override endian check for cross-compilation
This commit is contained in:
parent
76f25e8d7c
commit
1b69757872
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue