HP-UX and Shared libraries
Jeffrey A Law
law@cygnus.com
Fri Apr 10 22:58:00 GMT 1998
In message < 199804102112.FAA14282@hydro.right.here >you write:
> I had a failure with shared libs as well. I didn't havve time to
> chase it down then, and have been waiting for .3 ;)
>
> The build was done in a host specific directory;
> ../configure --host=hppa1.1-hp-hpux9.01 --with-gnu-as --enable-shared \
> --norecursion
Actually, I remember a problem of this nature relating to performing
the build in a subdir of the source too. Build it totally out of the
source tree. Really, you might be suprised.
Just so you know, I've built 1.0.2 & the latest code on HPs with
--enable-shared. In fact it's worth noting HP's are my primary
development platform :-0
> First is that it is giving the '...-g disabled..." as if it was
> not using gas.
You have to configure gcc to use gas. Otherwise it assumes the
HP assembler by default and disables -g support.
> Everything in libiberty is compiled -fPIC ( seems
> a bit over the top, -fpic should be fine here ) There is no
> attempt to link a shared version, only the ar'ed libiberty.a.
No, -fpic is not safe here. -fpic should only be used by user
built libraries -- never by compiler runtime support libraries
or libraries shipped to customers.
Trust me on this.. In fact, I just spent quite a bit of time
analyzing a problem for a Cygnus customer where they could not
link their application because a vendor which shipped them libraries
compiled them with -fpic instead of -fPIC.
jeff
More information about the Gcc-bugs
mailing list