Skip to content

Commit

Permalink
configure: require __thread support
Browse files Browse the repository at this point in the history
The codebase doesn't build without __thread support.
Formalise this requirement by adding a check for it in the
configure script.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
cota authored and bonzini committed May 8, 2015
1 parent 41063e1 commit 768b785
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions configure
Expand Up @@ -1556,6 +1556,17 @@ if test "$static" = "yes" ; then
fi
fi

# Unconditional check for compiler __thread support
cat > $TMPC << EOF
static __thread int tls_var;
int main(void) { return tls_var; }
EOF

if ! compile_prog "-Werror" "" ; then
error_exit "Your compiler does not support the __thread specifier for " \
"Thread-Local Storage (TLS). Please upgrade to a version that does."
fi

if test "$pie" = ""; then
case "$cpu-$targetos" in
i386-Linux|x86_64-Linux|x32-Linux|i386-OpenBSD|x86_64-OpenBSD)
Expand Down

0 comments on commit 768b785

Please sign in to comment.