perl and compiling C code

Frank Schima macsforever2000 at
Wed Apr 24 13:48:03 PDT 2013


I'm attempting to make a port for p5-wx [1] and it needs to compile C code. I ran into a problem compiling it. It is using perl Makefile.PL to build. In IRC, jmr noticed that in line 177 of the file (/opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/ from the perl5.12 port has the following ccflags:

ccflags='-pipe -O2  -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp -fno-strict-aliasing -fstack-protector -I/opt/local/include'

The "-no-cpp-precomp" flag causes problems and is not needed anymore. I filed a ticket about this [2]. I actually had to remove it from the file above to get past that error. 

I also want to try to add "-std=gnu89" to get it to compile with clang.

I tried adding the following but it did not seem to have any effect:

   configure.cflags-append -std=gnu89

Is there a way in my p5-wx Portfile to modify the ccflags that perl recognizes when compiling with clang (or gcc or whatever)?


[1] <>
[2] <>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-dev mailing list