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 was suggested to add $stage1_libs to LIBS, but I go for -lstdc++
  -lm instead.  I seriously doubt we can make bootstrap work with a
  non-g++ C++ compiler here, especially with Go included which is
  written in C++ itself.  This would mean linking both the foreign C++
  runtime libraries and libstdc++ into the executables, which seems to
  be a recipe for disaster.

This patch allowed a i386-pc-solaris2.11 with ppl/cloog to finish and
all graphite tests passed.

Ok for mainline?

        Rainer


2011-03-19  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        PR bootstrap/48120:
        * configure.ac (pwllib): Use LIBS instead of LDFLAGS.
        Add -lstdc++ -lm to LIBS.
        * configure: Regenerate.

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"

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to