Commit 1abd783b authored by Marvin Scholz's avatar Marvin Scholz

Build: Fix configure fallback for stack alignment

This is a fix for

    ERROR:  Unknown variable "stackrealign_flag"

when configuring for x86 on compilers that do not support any of the
checked stackalign flags.
parent 7c43a766
......@@ -70,6 +70,9 @@ if not cc.check_header('stdatomic.h')
error('Atomics not supported')
endif
stackalign_flag = []
stackrealign_flag = []
if host_machine.cpu_family().startswith('x86')
if cc.has_argument('-mpreferred-stack-boundary=5')
stackalign_flag = ['-mpreferred-stack-boundary=5']
......@@ -95,9 +98,6 @@ if host_machine.cpu_family().startswith('x86')
cdata.set('STACK_ALIGNMENT', 4)
endif
endif
else
stackalign_flag = []
stackrealign_flag = []
endif
if host_machine.cpu_family().startswith('x86')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment