Build lib /w -fPIC; prelink says lib is non-fPIC

Build lib /w -fPIC; prelink says lib is non-fPIC

When I build a shared library with ICC/Linux v10.0.23 (and v9.1 before that) I specify -fPIC as a compile option. The generated library compiles, links and runs without any problems. However prelink complains "cannot prelink non-fPIC library".

Prelink is a service, included with at least Red Hat's distributions, which attempts to reconcile symbols between executables and their dependent libraries. The service typically runs as a cron job. The idea is to avoid the runtime expense of symbol reconciliation.

When building the shared libraries, the only difference between an ICC and a GCC built is that I use "-static-intel -shared" in the 1st case and just "-shared" in the 2nd.

Apparently the GCC and Intel linkers are generating the relocation info (?) in different ways. Is there something I can do with/to my ICC-built shared library to allow prelinking of them?


1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.