Jack Howarth wrote:
...to work around the fact that common symbols exist in liblammpio.a
because it is built as non-PIC code which is silently linked into
gromacs-mpi's shared libraries by mpicc. The hack to work around this
has been described at...

http://gcc.gnu.org/ml/gcc/2005-06/msg00186.html

My understanding is that the presence of non-PIC code in a static
lib which is linked into a shared lib still makes these shared libs
broken and subject to strange crashes.

http://people.redhat.com/drepper/dsohowto.pdf

My inclination is to patch the Makefilei.in for liblammpio.a to have
all of its objects compiled with -fno-common to make them PIC code.
This would allow me to set a Depends on lammpi-7.1.1-1 for
gromacs-mpi 3.3-1 and drop the -Wl,-single_module hack in gromacs-mpi.
What is your view on this? While I can't demonstrate actual breakage in
lammpi without hack to build liblammpio.a as PIC code, it seems
obviously wrong not to do so.

While gnu libtool does call the -fno-common flag a PIC flag, it really has nothing to do with pic code. Before the whole -single_module flag was invented Apple did not allow shared libraries to have common symbols (symbols which were uninitialized at declaration time), so it was necessary for someone to add -fno-common to libtool for darwin when building objects which would be used to create a shared library.

The code remains position independent with or without this flag, using -single_module is okay, but in my opinion, it would be better if the .a's did not contain common symbols, simply because it would eliminate the need for a special flag when linking them into a shared library.

This is not the same thing at all as building objects with, say, -mdynamic-no-pic and then using those objects to create a shared library, which is one of the topics covered in Drepper's article.

Peter


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to