45933e54d67ff3021b3df4348ff70d39558edd57
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / unixodbc / 0001-fix-nopthread.patch
1 Fix pthread detection
2
3 configure.in always calls AC_CHECK_COMP_OPT(pthread) which succeeds with the
4 toolchain used although it does not contain thread support:
5
6 checking for mutex_lock in -lthread ... no
7 checking for pthread_mutex_lock in -lpthread... no
8 checking for pthread_mutex_lock in -lc... no
9 checking if compiler accepts -pthread... yes
10 checking for pthread_mutex_lock in -lc... no
11 checking for pthread_mutex_lock in -lpthread... no
12
13 This positive configure check leads to
14
15     CFLAGS="$CFLAGS -pthread"
16
17 in ./configure, line 15757 which causes a compilation bug
18 /home/br/br4/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.8.3/../../../../arm-buildroot-linux-uclibcgnueab
19
20 using this defconfig
21 http://autobuild.buildroot.net/results/e86/e86e97ff7887f1bdc6bf913498392ff50f56ea88/defconfig
22
23 This patch disables the freebsd-only code path. Patching configure directly
24 prevents the need for autoreconf.
25
26 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
27
28 diff -uNr unixODBC-2.3.2.org/configure unixODBC-2.3.2/configure
29 --- unixODBC-2.3.2.org/configure        2013-10-08 10:56:03.000000000 +0200
30 +++ unixODBC-2.3.2/configure    2015-03-13 21:19:59.210429211 +0100
31 @@ -15746,7 +15746,7 @@
32  
33      fi
34  
35 -    if test "x$gotthread" = "xno"; then
36 +    if test "x$gotthread" = "xnot_needed_for_buildroot"; then
37        if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
38                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -pthread" >&5
39  $as_echo_n "checking if compiler accepts -pthread... " >&6; }