Message ID | 20150428210457.GA12653@flamenco |
---|---|
State | New |
Headers | show |
On 28/04/2015 23:04, Emilio G. Cota wrote: > > commit ad45e590025c1197a7aef5164e1ae174894b0969 > Author: Emilio G. Cota <cota@braap.org> > Date: Tue Apr 28 16:54:44 2015 -0400 > > configure: require __thread support > > 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> > > diff --git a/configure b/configure > index 6969f6f..3d6591f 100755 > --- a/configure > +++ b/configure > @@ -1549,6 +1549,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) Yes, thanks. I'll include the patch in my next pull request. Paolo
diff --git a/configure b/configure index 6969f6f..3d6591f 100755 --- a/configure +++ b/configure @@ -1549,6 +1549,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)