Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
On branch karl-f77-fixes to improve compile and test of these F77 mo…
…dules on OS X (i.e. don't build i386 versions)

 Changes to be committed:
	modified:   Lib/Minuit/Makefile.PL
	modified:   Lib/Slatec/Makefile.PL
  • Loading branch information
karlglazebrook committed Nov 1, 2015
1 parent a6d59a7 commit 53c4485
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Lib/Minuit/Makefile.PL
Expand Up @@ -135,13 +135,12 @@ undef &MY::postamble; # suppress warning
my $mycompiler = $f77->compiler();
my $mycflags = $f77->cflags();
my $orig = pdlpp_postamble_int(@pack);
my $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 -o minuitlib/$_\$(OBJ_EXT) $mycflags minuitlib/$_.f
" )} @minuitfiles;

if (!defined($PDL::Config{MINUIT_LIB})){
Expand All @@ -167,7 +166,16 @@ minuitlib/libminuit\$(LIB_EXT): minuitlib/minuit\$(OBJ_EXT) minuitlib/intracfals
return $orig;
};

# Remove i386 option for OS X recent versions for better build, dual arch does not work anyway. KG 25/Oct/2015
my %items;
if ($Config{osname} =~ /darwin/ && $Config{osvers} >=14) { # OS X Mavericks+
print "Forcing single arch build for MINUIT\n";
$items{LDDLFLAGS} = $Config{lddlflags};
$items{LDDLFLAGS} =~ s/-arch i386/ /g;
}

WriteMakefile(
%hash,
VERSION => "0.1", # This is overridden by VERSION_FROM in %hash
%items
);
10 changes: 10 additions & 0 deletions Lib/Slatec/Makefile.PL
Expand Up @@ -136,7 +136,17 @@ slatec/$_\$(OBJ_EXT): slatec/$_.f

};

# Remove i386 option for OS X recent versions for better build, dual arch does not work anyway
my %items;
if ($Config{osname} =~ /darwin/ && $Config{osvers} >=14) { # OS X Mavericks+
print "Forcing single arch build for SLATEC\n";
$items{LDDLFLAGS} = $Config{lddlflags};
$items{LDDLFLAGS} =~ s/-arch i386/ /g;
}


WriteMakefile(
%hash,
VERSION => "0.12", # This is overridden by VERSION_FROM in %hash
%items
);

0 comments on commit 53c4485

Please sign in to comment.