configure: add flags to support SafeStack
commit1e4f6065da160977f212270893372436b8f13336
authorDaniele Buono <dbuono@linux.vnet.ibm.com>
Fri, 29 May 2020 20:51:21 +0000 (29 16:51 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 23 Jun 2020 14:46:05 +0000 (23 15:46 +0100)
treea04b26db387e1f59c707066d30a39e4f49680971
parentff76097ad8f7fdc9d1d707bed85c146fdbb5a16d
configure: add flags to support SafeStack

This patch adds a flag to enable/disable the SafeStack instrumentation
provided by LLVM.

On enable, make sure that the compiler supports the flags, and that we
are using the proper coroutine implementation (coroutine-ucontext).
On disable, explicitly disable the option if it was enabled by default.

While SafeStack is supported only on Linux, NetBSD, FreeBSD and macOS,
we are not checking for the O.S. since this is already done by LLVM.

Signed-off-by: Daniele Buono <dbuono@linux.vnet.ibm.com>
Message-id: 20200529205122.714-4-dbuono@linux.vnet.ibm.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
configure