Subject: | Makefile.PL should not tweak CCLFAGS that way |
LDS,
I found this issue when trying to build GD.pm on Perl 5.10.1 on Mac OS X Leopard (v10.5.8)
with -Duse64bitall. Since perl is built as x86_64 while gcc defaults to i386, XS needs the
same CCFLAGS as perl is built. Otherwise you'd get
Show quoted text
> ld warning: in GD.o, file is not of required architecture
I don't know why you added -Wformat=0 to CCFLAGS but if you want to add that to
CCFLAGS, you should follow my patch below. That has solved my case and I believe it will
solve other tickets as well.
Dan the User Thereof
--- GD-2.44/Makefile.PL 2009-07-11 03:10:07.000000000 +0900
+++ GD-2.44_01/Makefile.PL 2009-10-02 05:57:54.000000000 +0900
@@ -225,6 +225,8 @@
print F $DEFINES,"\n";
close F;
+use Config;
+
WriteMakefile(
'NAME' => 'GD',
'VERSION_FROM' => 'GD.pm',
@@ -245,7 +247,7 @@
'PL_FILES' => {'bdf_scripts/bdf2gdfont.PLS' => 'bdf_scripts/bdf2gdfont.pl',
'GD/Image.pm.PLS' => 'GD/Image.pm',
},
- 'CCFLAGS' => '-Wformat=0',
+ 'CCFLAGS' => $Config{ccflags} . ' -Wformat=0',
'EXE_FILES' => ['bdf_scripts/bdf2gdfont.pl'],
'AUTHOR' => 'Lincoln Stein (lstein@cshl.org)',
'ABSTRACT' => 'Interface to Gd Graphics Library',