[PATCH][PPL]: Fix static PPL 0.11 case

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Fri Jan 28 10:42:00 GMT 2011


John Tytgat <John.Tytgat@aaug.net> writes:

> The reason is that PPL (and other libs like CLooG, GMP) are configured
> with --disable-shared and that we need libpwl.a in our link line.
>
> Attached patch addresses this problem.  Please commit after review.
>
> John Tytgat  <John.Tytgat@aaug.net>
>
> 	* configure.ac (ppllibs): Add -lpwl.
>
> Index: configure.ac
> ===================================================================
> --- configure.ac	(revision 169306)
> +++ configure.ac	(working copy)
> @@ -1621,7 +1621,7 @@
>  AC_SUBST(poststage1_ldflags)
>  
>  # Check for PPL
> -ppllibs=" -lppl_c -lppl -lgmpxx"
> +ppllibs=" -lppl_c -lppl -lpwl -lgmpxx"
>  pplinc=
>  
>  AC_ARG_WITH(ppl,
> @@ -1643,7 +1643,7 @@
>    "" | yes)
>      ;;
>    *)
> -    ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
> +    ppllibs="-L$with_ppl/lib -lppl_c -lppl -lpwl -lgmpxx"
>      pplinc="-I$with_ppl/include $pplinc"
>      ;;
>  esac
> @@ -1651,10 +1651,10 @@
>    pplinc="-I$with_ppl_include $pplinc"
>  fi
>  if test "x$with_ppl_lib" != x; then
> -  ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx"
> +  ppllibs="-L$with_ppl_lib -lppl_c -lppl -lpwl -lgmpxx"
>  fi
>  if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then
> -  ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"' -lppl_c -lppl -lgmpxx '
> +  ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"' -lppl_c -lppl -lpwl -lgmpxx '
>    pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C '
>    enable_ppl_version_check=no
>  fi

I had the same issue on Solaris recently (apart from others; this stuff
is a nightmare).  Unfortunately, your patch is incomplete: libppl.a uses
sqrt, which only lives in libm on some (most?) platforms.  While I've
simply been adding -lm above, a correct version needs to check if libm
is needed for sqrt and only add it if necessary.

Apart from that (and not your fault): please avoid duplicating the list
of libraries 4 times!  This is guaranteed to get inconsistent.

	Rainer

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



More information about the Gcc-patches mailing list