[OpenAFS-devel] Re: shlib on s390x

Derrick J Brashear shadow@dementia.org
Wed, 29 Jun 2005 09:03:00 -0400 (EDT)


On Wed, 29 Jun 2005, Peter Somogyi wrote:

> Hi,
>
> I'm fixing the jafs (JAVA API for OpenAFS, located under src/JAVA) to make it work on s390x (with the latest openafs version).
> (We have our own version of jafs, and so far most of the functions are tested and work under 386 and on ppc 32-bit version.)
> The compilation output is libjafs.so and libjafsadm.so.
>
> Now I've run into a serious problem under s390x: -fPIC flag is required to the compilation of *EVERY* c source code which take part in an shlib.
> It affects mainly the libjafsadm.so, which includes libadmin libs (libbosadmin.a, libvosadmin.a, ...) and
> some others (libafsauthent.a, libafsrpc.a, libcmd.a, util.a).

Set CCOBJ to cc -fPIC in src/cf/osconf.m4 for your platform, only.

CCOBJ exists precisely for this reason on platforms where PIC is safe for 
archive libraries. I believe this is one.