patch-Configure_pl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. $OpenBSD: patch-Configure_pl,v 1.7 2017/03/07 21:21:20 pascal Exp $
  2. --- Configure.pl.orig Mon Feb 13 10:55:25 2017
  3. +++ Configure.pl Tue Mar 7 19:45:06 2017
  4. @@ -72,10 +72,6 @@ if (-d '.git') {
  5. else { softfail("git error: $msg") }
  6. }
  7. -# fiddle with flags
  8. -$args{optimize} = 3 if not defined $args{optimize} or $args{optimize} eq "";
  9. -$args{debug} = 3 if defined $args{debug} and $args{debug} eq "";
  10. -
  11. for (qw(instrument static big-endian has-libtommath has-sha has-libuv
  12. has-libatomic_ops has-dynasm asan ubsan valgrind)) {
  13. $args{$_} = 0 unless defined $args{$_};
  14. @@ -321,16 +317,13 @@ $config{ldlibs} = ' -lubsan ' . $config{ldlibs} if $ar
  15. # macro defs
  16. $config{ccdefflags} = join ' ', map { $config{ccdef} . $_ } @{$config{defs}};
  17. -$config{ccoptiflags} = sprintf $config{ccoptiflags}, defined_or $args{optimize}, 1 if $config{ccoptiflags} =~ /%s/;
  18. $config{ccdebugflags} = sprintf $config{ccdebugflags}, defined_or $args{debug}, 3 if $config{ccdebugflags} =~ /%s/;
  19. -$config{ldoptiflags} = sprintf $config{ldoptiflags}, defined_or $args{optimize}, 1 if $config{ldoptiflags} =~ /%s/;
  20. $config{lddebugflags} = sprintf $config{lddebugflags}, defined_or $args{debug}, 3 if $config{lddebugflags} =~ /%s/;
  21. # generate CFLAGS
  22. my @cflags;
  23. push @cflags, $config{ccmiscflags};
  24. -push @cflags, $config{ccoptiflags} if $args{optimize};
  25. push @cflags, $config{ccdebugflags} if $args{debug};
  26. push @cflags, $config{ccinstflags} if $args{instrument};
  27. push @cflags, $config{ccwarnflags};
  28. @@ -347,7 +340,6 @@ $config{cflags} = join ' ', @cflags;
  29. # generate LDFLAGS
  30. my @ldflags = ($config{ldmiscflags});
  31. -push @ldflags, $config{ldoptiflags} if $args{optimize};
  32. push @ldflags, $config{lddebugflags} if $args{debug};
  33. push @ldflags, $config{ldinstflags} if $args{instrument};
  34. push @ldflags, $config{ldrpath} unless $args{static};
  35. @@ -358,6 +350,10 @@ $config{ldflags} = join ' ', @ldflags;
  36. # setup library names
  37. $config{moarlib} = sprintf $config{lib}, $NAME;
  38. $config{moardll} = sprintf $config{dll}, $NAME;
  39. +
  40. +if (exists $ENV{'SO_VERSION'}) {
  41. + $config{moardll} = $config{moardll} . "." . $ENV{'SO_VERSION'};
  42. +}
  43. # setup flags for shared builds
  44. unless ($args{static}) {