On 08/15/2011 10:53 AM, Rainer Orth wrote:
* The general approach between libtool and libiberty differs.  Unless
   otherwise specified (PIC is the default or doesn't work for some
   reason), libtool defaults to -fPIC, while libiberty has a strange
   mixture of -fPIC/-fpic and nothing, without explanation and without a
   default.

I guess it's kind of historic, probably to produce smaller/faster code on PPC and SPARC which differentiate between -fPIC/-fpic.

In general I trust libtool more, but -fPIC/-fpic differences should be more or less harmless, and this:

* For SPARC, libiberty/configure.ac has

        case "${CFLAGS}" in
            *-fpic*)
                PICFLAG=-fpic
                ;;
            *)
                PICFLAG=-fPIC
                ;;
        esac ;;

actually makes some sense---so the general approach in your patch is good. The patch is okay.

Yes, that needs to be done of course.  I'm not sure if we still support
gnatlib_and_tools to build libada/gnattools.  If so, we would need the
PICFLAG to be available somehow in the gcc Makefile (perhaps by providing
GCC_TARGET_PICFLAG in addition to GCC_PICFLAG in picflag.m4).

The only trace I could find is in a install.texi reference to historical
practice.

Yes, but it also matters whether AdaCore is using it. If so, I'd like also to understand why.

Paolo

Reply via email to