From 4a9d353b57e69f8ad30698a7a022a7ca7dfb0238 Mon Sep 17 00:00:00 2001 From: Joseph Howarth Date: Thu, 20 May 2021 23:33:48 -0500 Subject: [PATCH] Add endian option for configure. For the payload project, the endian check does not work(due to some problem with the hardfloating point settings for stm32f7). So now we can pass in the endianness as an option when needed. --- wscript | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index d5475bf83..144865c89 100644 --- a/wscript +++ b/wscript @@ -63,6 +63,7 @@ def options(ctx): # OS gr.add_option('--with-os', metavar='OS', default='posix', help='Set operating system. Must be either \'posix\', \'macosx\', \'windows\' or \'freertos\'') gr.add_option('--enable-init-shutdown', action='store_true', help='Use init system commands for shutdown/reboot') + gr.add_option('--endian', metavar='endianChoice', default='', help='Set endianess. Should be little or big') # Options gr.add_option('--with-rdp-max-window', metavar='SIZE', type=int, default=20, help='Set maximum window size for RDP') @@ -216,7 +217,11 @@ def configure(ctx): ctx.define_cond('CSP_LOG_LEVEL_ERROR', ctx.options.with_loglevel in ('debug', 'info', 'warn', 'error')) # Check compiler endianness - endianness = ctx.check_endianness() + if ctx.options.endian == '': + endianness = ctx.check_endianness() + else: + endianness = ctx.options.endian + ctx.define_cond('CSP_LITTLE_ENDIAN', endianness == 'little') ctx.define_cond('CSP_BIG_ENDIAN', endianness == 'big')