Skip to content

Commit 4a9d353

Browse files
committed
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.
1 parent 8faf353 commit 4a9d353

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: wscript

+6-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def options(ctx):
6363
# OS
6464
gr.add_option('--with-os', metavar='OS', default='posix', help='Set operating system. Must be either \'posix\', \'macosx\', \'windows\' or \'freertos\'')
6565
gr.add_option('--enable-init-shutdown', action='store_true', help='Use init system commands for shutdown/reboot')
66+
gr.add_option('--endian', metavar='endianChoice', default='', help='Set endianess. Should be little or big')
6667

6768
# Options
6869
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):
216217
ctx.define_cond('CSP_LOG_LEVEL_ERROR', ctx.options.with_loglevel in ('debug', 'info', 'warn', 'error'))
217218

218219
# Check compiler endianness
219-
endianness = ctx.check_endianness()
220+
if ctx.options.endian == '':
221+
endianness = ctx.check_endianness()
222+
else:
223+
endianness = ctx.options.endian
224+
220225
ctx.define_cond('CSP_LITTLE_ENDIAN', endianness == 'little')
221226
ctx.define_cond('CSP_BIG_ENDIAN', endianness == 'big')
222227

0 commit comments

Comments
 (0)