On Sun, 16 Aug 2009, Tamas TEVESZ wrote:

Hi,

>  > I've partially moved some former logic in make_gnu.sh
>  > to linux/global.cf with notes left in ChangeLog and the
>  > file. Logic should be completed (I didn't have enough
>  > information to implement it in the more limited GNU Make
>  > syntax), maybe this effect is caused by it being broken
>  > for now.
> point is, why not -fPIC unconditionally?

Because it causes on some platforms huge speed overhead,
i.e. su...@x86 builds with SunPRO C and tests/speedtst.prg.
Default optimization settings with -KPIC:

   [ total application time: ]....................................29.46
   [ total real time: ]...........................................29.53

and without -KPIC:

   [ total application time: ]....................................23.46
   [ total real time: ]...........................................23.53

As you can see Harbour libraries compiled unconditionally as position
independent code are over 25% slower. Of course it depends on used
hardware. Some processors can use only PIC so such switches has no
effect.
We need PIC to create harbour shared library. Some platforms like
x...@32 for most of code (with some few seldom exceptions) can accept
code compiled without PIC switches to create shared libraries.
You can remove it from sunpro.cf if base platform is x...@32 and
the final binaries will be much faster. Anyhow such tricks works
only on few number of platform and always have to be tested.
It's possible that we add some new code which will block such
hidden conversion. The ideal solution is introducing to our GNU
make system two phase compilation. One for static libraries
without any switches to force PIC and second for harbour shared
library which will use -fPIC/-KPIC or any other platform dependent
switch used to force position independent code.

best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to