@matheusbsbs / matheus-bagliano / commits / cea13a8d68
Fork 0

Improve test for pthreads flag

When compiling with CC=clang using Clang 1.1 as shipped by Debian unstable (package version 2.7-3), the -mt flag is sufficient to compile during the `configure` test. However, building git would then fail at link time complaining about missing symbols such as `pthread_key_create' and `pthread_create'. Work around this issue by adding pthread key creation to the pthreads configure test source. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Giuseppe Bilotta committed Mar 28, 2011 at 09:39 UTC cea13a8d685802389fad5b1ffce3af38175a8a01
1 file changed +2
configure.ac
+2
@@ -895,7 +895,9 @@ AC_LANG_PROGRAM([[
895 #include <pthread.h>
896 ]], [[
897 pthread_mutex_t test_mutex;
898 + pthread_key_t test_key;
899 int retcode = 0;
900 + retcode |= pthread_key_create(&test_key, (void *)0);
901 retcode |= pthread_mutex_init(&test_mutex,(void *)0);
902 retcode |= pthread_mutex_lock(&test_mutex);
903 retcode |= pthread_mutex_unlock(&test_mutex);