Skip to content

Commit

Permalink
Add endian option for configure.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joehowarth17 committed May 21, 2021
1 parent 8faf353 commit 4a9d353
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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')

Expand Down

0 comments on commit 4a9d353

Please sign in to comment.