[Ilugc] C Compiler options for Perl pkgs

  • From: rajasuperman@xxxxxxxxx (Raja Subramanian)
  • Date: Sat, 19 Feb 2011 14:08:49 +0530

On Sat, Feb 19, 2011 at 4:05 AM, narendra babu <cnarendra_babu at yahoo.com> 
wrote:

I am downloading perl packages using cpan command , its taking default 
compiler cc as 32 bit /32 bit c libs for compiling c modules while installing 
.

Compiling through the CPAN module will use the same same compiler
and options which were used to compiler the perl binary itself.  Ie, if
your perl binary is 32bit CPAN modules must also be 32bit.

perl -V will tell you more details about how the perl binary was compiled.


i would like to know how should i change the compiler options to 64 bit and 
any optmization i would like to do by changing the compiler flags .

Set the CC and CFLAGS environment variables.  Eg in Bash:

export CC=gcc
export CFLAGS="-O0 -g"

and you can typically override Makefile values.  But be careful before you
change the defaults.


Should i look any perl related config files to change the compiler or flags 
befoe doing installation

There are ample CPAN tutorials and walk throughs online which will be useful.

- Raja

Other related posts: