Niko Tyni wrote:
> this is usually a result of compiling perl XS extensions without
> $Config{ccflags}, currently resulting in binary incompatibility on 32-bit
> architectures. See #628522.
> 
> I see bindings/perl/Makefile.am explicitly overrides CCFLAGS with
> something that includes $(PERL_CFLAGS), but I can't see any place where
> that's initialized. Possibly it would be enough to set PERL_CFLAGS to
> the contents of perl -V::ccflags: or something like that.

Thanks Niko!


David, could you try the attached patch? (I just checked it gets its
PERL_CFLAGS set from perl -V::ccflags:, didn't try building)

It's against the configure.ac of 2.4.0 but it should also apply just
fine on top of 2.3.6.


        Fred
>From b032ab5d664520933ed174da90e845063a8544f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpet...@entrouvert.com>
Date: Fri, 28 Mar 2014 16:45:00 +0100
Subject: [PATCH] perl: get required CFLAGS from $(perl -V::ccflags:)

---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index 674a615..0f32ad3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -531,12 +531,15 @@ AC_ARG_ENABLE(perl, [  --disable-perl          disable the Perl binding],,
 if test "X$PERL" != "X"; then
   PERLINSTALLSITEARCH=`$PERL -MConfig -e 'print $Config{installsitearch};'`
   PERLMAN3DIR=`$PERL -MConfig -e 'print $Config{man3dir};'`
+  PERL_CFLAGS=$($PERL -V::ccflags:)
 else
   PERLINSTALLSITEARCH=none
   PERLMAN3DIR=none
+  PERL_CFLAGS=
 fi
 AC_SUBST(PERLINSTALLSITEARCH)
 AC_SUBST(PERLMAN3DIR)
+AC_SUBST(PERL_CFLAGS)
 
 AC_MSG_CHECKING(for Perl API)
 if test "X$enable_perl" != "Xno" ; then
-- 
1.9.1

Reply via email to