From dad6c0f877be9ce653e998e7d2c9a095816f879e Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Sep 26 2011 18:55:27 +0000 Subject: Add upstream patch to fix Perl CCFLAGS for Perl 5.14 on i686. (cherry picked from commit b2ed1b67df7935039f873895ead0db4e0387bf65) --- diff --git a/0001-perl-Fix-CCFLAGS-on-Perl-5.14.patch b/0001-perl-Fix-CCFLAGS-on-Perl-5.14.patch new file mode 100644 index 0000000..acf9c6a --- /dev/null +++ b/0001-perl-Fix-CCFLAGS-on-Perl-5.14.patch @@ -0,0 +1,49 @@ +From ee947dd4e44bb407a8b9e4cd33a0a2e25077fa6b Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 22 Jul 2011 10:39:37 +0100 +Subject: [PATCH] perl: Fix CCFLAGS on Perl 5.14. + +A change to ExtUtils::CBuilder in Perl 5.14 causes CCFLAGS to +completely replace, rather than appending, the C flags. + +The unfortunate consequence of this is that vital flags such as +-D_FILE_OFFSET_BITS=64 are missing. For 32 bit code, this means you +get binary-incompatible code that completely fails to load. + +For further analysis see: + +http://www.nntp.perl.org/group/perl.perl5.porters/2011/04/msg171535.html + +This commit changes CCFLAGS so that it appends to the existing +$Config{ccflags} instead of replacing it. On earlier versions of Perl +this means we get two copies of the flags, which is unfortunate but +should be safe. + +Also, ignore MYMETA.yml file produced by Perl 5.14. +--- + .gitignore | 1 + + perl/Makefile.PL.in | 3 ++- + 2 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/perl/Makefile.PL.in b/perl/Makefile.PL.in +index e6e3d72..77b4a0e 100644 +--- a/perl/Makefile.PL.in ++++ b/perl/Makefile.PL.in +@@ -15,6 +15,7 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + ++use Config; + use ExtUtils::MakeMaker; + + WriteMakefile ( +@@ -26,5 +27,5 @@ WriteMakefile ( + LIBS => '-L@top_builddir@/lib/.libs -lhivex', + INC => '-I@top_builddir@/lib -I@top_srcdir@/lib', + TYPEMAPS => [ '@srcdir@/typemap' ], +- CCFLAGS => '@CFLAGS@', ++ CCFLAGS => $Config{ccflags} . ' @CFLAGS@', + ); +-- +1.7.5.2 + diff --git a/hivex.spec b/hivex.spec index 7b0ab79..1b5150a 100644 --- a/hivex.spec +++ b/hivex.spec @@ -7,7 +7,7 @@ Name: hivex Version: 1.2.7 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Read and write Windows Registry binary hive files Group: Development/Libraries @@ -43,6 +43,9 @@ Patch1: 0001-ocaml-Set-package-name-when-installing-native-bindin.patch Patch2: 0002-ocaml-Really-fix-make-install-rule.patch Patch3: ocaml-Fix-autotools.patch +# Upstream patch to fix Perl CCFLAGS for Perl 5.14 on i686. +Patch4: 0001-perl-Fix-CCFLAGS-on-Perl-5.14.patch + %description Hive files are the undocumented binary blobs that Windows uses to @@ -152,6 +155,7 @@ python-%{name} contains Python bindings for %{name}. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build @@ -260,6 +264,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jul 21 2011 Richard W.M. Jones - 1.2.7-7 +- Add upstream patch to fix Perl CCFLAGS for Perl 5.14 on i686. + * Thu Jul 21 2011 Richard W.M. Jones - 1.2.7-6 - i686 package is broken, experimentally rebuild it.