Permalink
Browse files

Don't supply the DEBUGGING flag for >=5.12.1 under -DEBUG

  • Loading branch information...
1 parent 8e8540f commit 6029b855548757f179b54789adf0335a15e7ebef @stash committed Oct 6, 2010
Showing with 7 additions and 5 deletions.
  1. +7 −5 Makefile.PL
View
@@ -21,17 +21,19 @@ use EV::MakeMaker qw/ev_args/;
my $otherldflags = '';
if ($ARGV[0] =~ /^-DEBUG=?(\d*)$/) {
my $n = $1 || 1;
- shift @ARGV;
- unshift @ARGV, "OPTIMIZE=-DDEBUG=$n -DDEBUGGING -g";
+ my $opt = "OPTIMIZE=-DDEBUG=$n -g";
+ # with 5.12.1 and the -DDEBUGGING flag:
+ # dyld: Symbol not found: _Perl_pad_sv
+ $opt .= ($] >= 5.012_001) ? '' : ' -DDEBUGGING';
+ $ARGV[0] = $opt;
}
elsif ($ARGV[0] eq '-PROFILE') {
shift @ARGV;
- unshift @ARGV, "OPTIMIZE=-g -O3 -fprofile-arcs -ftest-coverage -fprofile-generate";
+ $ARGV[0] = "OPTIMIZE=-g -O3 -fprofile-arcs -ftest-coverage -fprofile-generate";
$otherldflags = '-lgcov -fprofile-generate';
}
elsif ($ARGV[0] eq '-PROFILEUSE') {
- shift @ARGV;
- unshift @ARGV, "OPTIMIZE=-g -O3 -fprofile-use";
+ $ARGV[0] = "OPTIMIZE=-g -O3 -fprofile-use";
$otherldflags = '-fprofile-use';
}

0 comments on commit 6029b85

Please sign in to comment.