Compiling with Sun compilers from SC5.0 onward.

Alexandre Oliva oliva at lsd.ic.unicamp.br
Wed Apr 11 01:28:12 GMT 2001


On Apr 10, 2001, Jeremy Allison <jeremy at valinux.com> wrote:

> Would it work to change the order of the pic tests to
> -KPIC then -Kpic?

Most likely.

> What effect would this have on other platforms ?

It would prevent the few optimizations that can be obtained with -Kpic
over -KPIC.  Basically, lower-case pic often means ``assume the
library fits into some platform-specific size limitations.''  Such
limitations are often related with the number of entries in the Global
Offset Table.  Using lower-case PIC often tells the compiler it's safe
to assume an offset within the GOT fits in the immediate operand of a
move instruction, or in the displacement of a register+offset
addressing mode.  If such assumptions can't be made, the compiler must
assume the offset may not fit, and generate larger instruction
sequences.

So, using upper-case -[fK]PIC is always safe, but it will often
generate bigger and less efficient code.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me




More information about the samba-technical mailing list