X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fpostgresql%2F0001-Compare-linker-compiler-output-with-their-default-ou.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fpostgresql%2F0001-Compare-linker-compiler-output-with-their-default-ou.patch;h=3eca82ff74acbd393ec768c7305c9e4b8ab6d0fd;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/postgresql/0001-Compare-linker-compiler-output-with-their-default-ou.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/postgresql/0001-Compare-linker-compiler-output-with-their-default-ou.patch new file mode 100644 index 0000000..3eca82f --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/postgresql/0001-Compare-linker-compiler-output-with-their-default-ou.patch @@ -0,0 +1,56 @@ +From 58d05b2a57802345f43e628bc0807dbf0116cdcc Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 20 Mar 2015 16:37:51 +0300 +Subject: [PATCH] Compare linker/compiler output with their default output + +linker and compiler may have noisy output by default, making +acx_pthread.m4 believe that pthread options that it tries are ignored +as invalid. + +Record default compiler and linker output and see if adding pthread +option changes that, instead of assuming that linker and compiler are +silent by default. + +Signed-off-by: Max Filippov +--- + config/acx_pthread.m4 | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/config/acx_pthread.m4 b/config/acx_pthread.m4 +index 581164b..d254612 100644 +--- a/config/acx_pthread.m4 ++++ b/config/acx_pthread.m4 +@@ -80,6 +80,22 @@ + esac + + if test x"$acx_pthread_ok" = xno; then ++ ++cat >conftest.$ac_ext <<_ACEOF ++int ++main (int argc, char **argv) ++{ ++ (void) argc; ++ (void) argv; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++ ++# Record the default linker and compiler output ++ld_default_output="`(eval $ac_link 2>&1 1>&5)`" ++cc_default_output="`(eval $ac_compile 2>&1 1>&5)`" ++ + for flag in $acx_pthread_flags; do + + tryPTHREAD_CFLAGS="" +@@ -143,7 +159,7 @@ + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + # Check both linking and compiling, because they might tolerate different options. +- if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then ++ if test "`(eval $ac_link 2>&1 1>&5)`" = "$ld_default_output" && test "`(eval $ac_compile 2>&1 1>&5)`" = "$cc_default_output"; then + # we continue with more flags because Linux needs -lpthread + # for libpq builds on PostgreSQL. The test above only + # tests for building binaries, not shared libraries. +-- +1.8.1.4