提交 21d4a791 编写于 作者: A Avi Kivity 提交者: Anthony Liguori

configure: tighten pie toolchain support test for tls variables

Some toolchains don't support pie properly when tls variables are
in use.  Disallow pie when such toolchains are detected.
Signed-off-by: NAvi Kivity <avi@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 c1b71a1d
......@@ -1120,7 +1120,17 @@ fi
if test "$pie" != "no" ; then
cat > $TMPC << EOF
int main(void) { return 0; }
#ifdef __linux__
# define THREAD __thread
#else
# define THREAD
#endif
static THREAD int tls_var;
int main(void) { return tls_var; }
EOF
if compile_prog "-fPIE -DPIE" "-pie"; then
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册