Hi Craig,

"info gcc" describes this better. It states that FPIC only makes a difference on
the m68k, m88k and the Sparc. N.b. use info! It is kept up to date, while the
man page (sometimes) isn't.

There was some discussion of how shared libraries work without pic, but I remain
bemused that they do. (I discovered that one of mine picks up non-pic code from
a .a archive, on both linux & Solaris. I wouldn't recommend the practice, all
the same).

Cheers ... Duncan.

On Tue, May 26, 1998 at 04:50:21PM +0200, B. Craig Taverner wrote:
> >    in ".o".  Example:    gcc -fPIC -c -I<java-header-path> file1.c -o
>
> Based solely on looking at other peoples makefiles and code, I've been
> using -fpic under linux and -fPIC under solaris.
>
> The gcc man pages say the following:
>
>        -fpic  If supported for the target machines, generate  po
>               sition-independent  code,  suitable  for  use  in a
>               shared library.
>
>        -fPIC  If supported for the target machine, emit position-
>               independent  code,  suitable  for  dynamic linking,
>               even if branches need large displacements.
>
> I'm not completely sure I understand the differences here.  Does anyone
> know what the effect of interchanging -fpic and -fPIC really is?

Reply via email to