Message ID | yddsjugg0e0.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On 03/21/2011 12:48 PM, Rainer Orth wrote: > As reported in the PR, the toplevel configure test for libpwl doesn't > work since it fails to link with libstdc++. The following patch > corrects this. > > There were a couple of issues: > > * One cannot use LDFLAGS here since that is passed to $CC before -lpwl, > which of course fails with a static libpwl. I'm using LIBS instead. > It's better anyway. Patch is okay. Paolo
Paolo Bonzini <bonzini@gnu.org> writes: > On 03/21/2011 12:48 PM, Rainer Orth wrote: >> As reported in the PR, the toplevel configure test for libpwl doesn't >> work since it fails to link with libstdc++. The following patch >> corrects this. >> >> There were a couple of issues: >> >> * One cannot use LDFLAGS here since that is passed to $CC before -lpwl, >> which of course fails with a static libpwl. I'm using LIBS instead. >> > > It's better anyway. > > Patch is okay. Thanks, applied. Should I sync to src, too? Rainer
On 03/21/2011 01:40 PM, Rainer Orth wrote: > Paolo Bonzini<bonzini@gnu.org> writes: > >> On 03/21/2011 12:48 PM, Rainer Orth wrote: >>> As reported in the PR, the toplevel configure test for libpwl doesn't >>> work since it fails to link with libstdc++. The following patch >>> corrects this. >>> >>> There were a couple of issues: >>> >>> * One cannot use LDFLAGS here since that is passed to $CC before -lpwl, >>> which of course fails with a static libpwl. I'm using LIBS instead. >>> >> >> It's better anyway. >> >> Patch is okay. > > Thanks, applied. Should I sync to src, too? Yes, always (except for libiberty/ and include/). Paolo
diff -r 3786717045e5 configure.ac --- a/configure.ac Sat Mar 19 10:35:20 2011 +0100 +++ b/configure.ac Sat Mar 19 21:57:26 2011 +0100 @@ -1677,10 +1677,10 @@ if test "x$with_ppl" != xno; then if test "x$pwllib" = x; then - saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $ppllibs" - AC_CHECK_LIB(pwl,PWL_handle_timeout,[pwllib="-lpwl"]) - LDFLAGS="$saved_LDFLAGS" + saved_LIBS="$LIBS" + LIBS="$LIBS $ppllibs -lstdc++ -lm" + AC_CHECK_LIB(pwl, PWL_handle_timeout, [pwllib="-lpwl"]) + LIBS="$saved_LIBS" fi ppllibs="$ppllibs -lppl_c -lppl $pwllib -lgmpxx"