1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-24 21:33:51 +03:00

build: Remove compiler TLS warning

This commit is contained in:
Nick Wellnhofer 2024-06-15 20:17:18 +02:00
parent e714f506e4
commit 898e5a1442
2 changed files with 1 additions and 20 deletions

View File

@ -411,7 +411,7 @@ if test "$with_tls" = "yes"; then
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_SOURCE([__declspec(thread) int v;]) ], [ AC_LANG_SOURCE([__declspec(thread) int v;]) ], [
AC_DEFINE([XML_THREAD_LOCAL], [__declspec(thread)], [TLS specifier]) ], [ AC_DEFINE([XML_THREAD_LOCAL], [__declspec(thread)], [TLS specifier]) ], [
WARN_NO_TLS=1 ])])]) ])])])
fi fi
dnl Checking whether __attribute__((destructor)) is accepted by the compiler dnl Checking whether __attribute__((destructor)) is accepted by the compiler
@ -1137,11 +1137,3 @@ AC_CONFIG_FILES([Makefile include/Makefile include/libxml/Makefile include/priva
AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py]) AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py])
AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config]) AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config])
AC_OUTPUT AC_OUTPUT
if test "$WARN_NO_TLS" != ""; then
echo "================================================================"
echo "WARNING: Your C compiler appears to not support thread-local"
echo "storage. Future versions of libxml2 will require this feature"
echo "for multi-threading."
echo "================================================================"
fi

View File

@ -331,7 +331,6 @@ if sys_windows == false
endif endif
### thread local storage ### thread local storage
support_tls = true
if want_tls == true if want_tls == true
tls_src = ''' tls_src = '''
#include <threads.h> #include <threads.h>
@ -368,7 +367,6 @@ int main()
config_h.set('XML_THREAD_LOCAL', '__declspec(thread)') config_h.set('XML_THREAD_LOCAL', '__declspec(thread)')
else else
want_tls = false want_tls = false
support_tls = false
endif endif
endif endif
endif endif
@ -776,15 +774,6 @@ configure_file(
install_dir: dir_lib / 'cmake' / 'libxml2', install_dir: dir_lib / 'cmake' / 'libxml2',
) )
if support_tls == false
message('===============================================================')
message('WARNING: Your C compiler appears to not support thread-local')
message('storage. Future versions of libxml2 will require this feature')
message('for multi-threading.')
message('===============================================================\n',
)
endif
# summary # summary
summary( summary(