diabelek has asked for the wisdom of the Perl Monks concerning the following question:

I want to compile dynamic modules using a statically compiled libperl.a. Problem that I have is when I compile libperl.a, it compiles without the -fPIC option. Is there a way to set this option for all .o files during the build process?

Replies are listed 'Best First'.
Re: compile libperl.a with -fPIC
by syphilis (Archbishop) on Jun 24, 2008 at 23:30 UTC
    Hi,
    I guess you could modify the ccflags setting in Config.pm to include -fPIC. I think that would ensure that the -fPIC option is included in the compilation ... though I don't know if that's going to be the solution. (That is, you may find that the solution is not so simple as just compiling with -fPIC ... but it's worth a try.)

    Cheers,
    Rob