The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / postgresql / 0001-Compare-linker-compiler-output-with-their-default-ou.patch
1 From 58d05b2a57802345f43e628bc0807dbf0116cdcc Mon Sep 17 00:00:00 2001
2 From: Max Filippov <jcmvbkbc@gmail.com>
3 Date: Fri, 20 Mar 2015 16:37:51 +0300
4 Subject: [PATCH] Compare linker/compiler output with their default output
5
6 linker and compiler may have noisy output by default, making
7 acx_pthread.m4 believe that pthread options that it tries are ignored
8 as invalid.
9
10 Record default compiler and linker output and see if adding pthread
11 option changes that, instead of assuming that linker and compiler are
12 silent by default.
13
14 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
15 ---
16  config/acx_pthread.m4 | 18 +++++++++++++++++-
17  1 file changed, 17 insertions(+), 1 deletion(-)
18
19 diff --git a/config/acx_pthread.m4 b/config/acx_pthread.m4
20 index 581164b..d254612 100644
21 --- a/config/acx_pthread.m4
22 +++ b/config/acx_pthread.m4
23 @@ -80,6 +80,22 @@
24  esac
25  
26  if test x"$acx_pthread_ok" = xno; then
27 +
28 +cat >conftest.$ac_ext <<_ACEOF
29 +int
30 +main (int argc, char **argv)
31 +{
32 +  (void) argc;
33 +  (void) argv;
34 +  return 0;
35 +}
36 +_ACEOF
37 +rm -f conftest.$ac_objext conftest$ac_exeext
38 +
39 +# Record the default linker and compiler output
40 +ld_default_output="`(eval $ac_link 2>&1 1>&5)`"
41 +cc_default_output="`(eval $ac_compile 2>&1 1>&5)`"
42 +
43  for flag in $acx_pthread_flags; do
44  
45          tryPTHREAD_CFLAGS=""
46 @@ -143,7 +159,7 @@
47  _ACEOF
48              rm -f conftest.$ac_objext conftest$ac_exeext
49              # Check both linking and compiling, because they might tolerate different options.
50 -            if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
51 +            if test "`(eval $ac_link 2>&1 1>&5)`" = "$ld_default_output" && test "`(eval $ac_compile 2>&1 1>&5)`" = "$cc_default_output"; then
52                  # we continue with more flags because Linux needs -lpthread
53                  # for libpq builds on PostgreSQL.  The test above only
54                  # tests for building binaries, not shared libraries.
55 -- 
56 1.8.1.4