commit 92b8f59332041c4d4e6416093bdfaddd16c50262 Author: Petr Písař <ppisar@xxxxxxxxxx> Date: Mon Oct 14 12:46:14 2013 +0200 Fix building on ARM PDL-2.6.0.90-Compile-Slatec-code-as-PIC.patch | 59 +++++++++++++++++++++++++ perl-PDL.spec | 3 + 2 files changed, 62 insertions(+), 0 deletions(-) --- diff --git a/PDL-2.6.0.90-Compile-Slatec-code-as-PIC.patch b/PDL-2.6.0.90-Compile-Slatec-code-as-PIC.patch new file mode 100644 index 0000000..7d5a80b --- /dev/null +++ b/PDL-2.6.0.90-Compile-Slatec-code-as-PIC.patch @@ -0,0 +1,59 @@ +From ab4b5fcf70149ce6e3f7fb01e6d2e91d8db37acc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx> +Date: Mon, 14 Oct 2013 11:04:02 +0200 +Subject: [PATCH] Compile Slatec code as PIC +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This code fails to build on armv7. There was a hack for amd64 to use -fPIC. +The objects are used to produce DSO, so they should be PIC always. See +Debian commit cbca21383acb3e2769da7f886f2aec44d3613675. + +Signed-off-by: Petr Písař <ppisar@xxxxxxxxxx> +--- + Lib/Minuit/Makefile.PL | 3 +-- + Lib/Slatec/Makefile.PL | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/Lib/Minuit/Makefile.PL b/Lib/Minuit/Makefile.PL +index 35dcc44..e59ab9b 100644 +--- a/Lib/Minuit/Makefile.PL ++++ b/Lib/Minuit/Makefile.PL +@@ -146,13 +146,12 @@ sub MY::postamble { + $mycompiler = $f77->compiler(); + $mycflags = $f77->cflags(); + my $orig = pdlpp_postamble_int(@::pack); +- $hack_64bit = ($Config{archname}=~m/x86_64/ ?" -fPIC " : ""); + $orig =~ s/:\s*minuit\.pd/: minuit.pd/; + $orig .= join "\n",map { + (" + + minuitlib/$_\$(OBJ_EXT): minuitlib/$_.f +- $mycompiler -c $hack_64bit -o minuitlib/$_\$(OBJ_EXT) $mycflags minuitlib/$_.f ++ $mycompiler -c -fPIC -o minuitlib/$_\$(OBJ_EXT) $mycflags minuitlib/$_.f + " )} @minuitfiles; + + if (!defined($PDL::Config{MINUIT_LIB})){ +diff --git a/Lib/Slatec/Makefile.PL b/Lib/Slatec/Makefile.PL +index 86ad3be..9e716db 100644 +--- a/Lib/Slatec/Makefile.PL ++++ b/Lib/Slatec/Makefile.PL +@@ -136,13 +136,12 @@ sub MY::postamble { + $mycompiler = $f77->compiler(); + $mycflags = $f77->cflags(); + my $orig = pdlpp_postamble_int(@::pack); +- $hack_64bit = ($Config{archname}=~m/x86_64/ ?" -fPIC " : ""); + $orig =~ s/:\s*slatec\.pd/: slatec.pd/; + $orig .join "\n",map { + (" + + slatec/$_\$(OBJ_EXT): slatec/$_.f +- $mycompiler -c $hack_64bit -o slatec/$_\$(OBJ_EXT) $mycflags slatec/$_.f ++ $mycompiler -c -fPIC -o slatec/$_\$(OBJ_EXT) $mycflags slatec/$_.f + " )} @slatecfiles; + + } +-- +1.8.3.1 + diff --git a/perl-PDL.spec b/perl-PDL.spec index bbcd5e5..ecc35ec 100644 --- a/perl-PDL.spec +++ b/perl-PDL.spec @@ -15,6 +15,8 @@ Source0: http://search.cpan.org/CPAN/authors/id/C/CH/CHM/PDL-%{cpan_versi Patch1: perl-PDL-2.4.7-hdf.patch # Disable Proj support when it's not compatible, bug #839651 Patch2: PDL-2.4.10-Disable-PDL-GIS-Proj.patch +# Compile Slatec as PIC, needed for ARM +Patch3: PDL-2.6.0.90-Compile-Slatec-code-as-PIC.patch BuildRequires: fftw2-devel BuildRequires: freeglut-devel BuildRequires: gcc-gfortran @@ -137,6 +139,7 @@ such commercial packages as IDL and MatLab. %if %{without proj} %patch2 -p1 -b .proj %endif +%patch3 -p1 -b .slatecpic # Fix shebang sed -e 's,^#!/usr/bin/env perl,#!/usr/bin/perl,' -i Perldl2/pdl2 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel