perl and compiling C code

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


Hello,


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 Config_heavy.pl (/opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/Config_heavy.pl) 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)?


Cheers!
Frank

[1] <http://search.cpan.org/dist/Wx/docs/INSTALL.pod>
[2] <https://trac.macports.org/ticket/38913>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130424/db2a9e0e/attachment.html>


More information about the macports-dev mailing list