53 lines
2.1 KiB
Plaintext
53 lines
2.1 KiB
Plaintext
$OpenBSD: patch-Configure_pl,v 1.9 2019/01/04 09:27:09 pascal Exp $
|
|
Index: Configure.pl
|
|
--- Configure.pl.orig
|
|
+++ Configure.pl
|
|
@@ -87,11 +87,6 @@ if (-d '.git') {
|
|
}
|
|
}
|
|
|
|
-# fiddle with flags
|
|
-$args{optimize} = 3 if not defined $args{optimize} or $args{optimize} eq "";
|
|
-$args{debug} = 3 if defined $args{debug} and $args{debug} eq "";
|
|
-
|
|
-
|
|
for (qw(coverage instrument static big-endian has-libtommath has-sha has-libuv
|
|
has-libatomic_ops asan ubsan valgrind show-vec)) {
|
|
$args{$_} = 0 unless defined $args{$_};
|
|
@@ -328,16 +323,13 @@ $config{ldlibs} = ' -lubsan ' . $config{ldlibs} if $ar
|
|
# macro defs
|
|
$config{ccdefflags} = join ' ', map { $config{ccdef} . $_ } @{$config{defs}};
|
|
|
|
-$config{ccoptiflags} = sprintf $config{ccoptiflags}, defined_or $args{optimize}, 1 if $config{ccoptiflags} =~ /%s/;
|
|
$config{ccdebugflags} = sprintf $config{ccdebugflags}, defined_or $args{debug}, 3 if $config{ccdebugflags} =~ /%s/;
|
|
-$config{ldoptiflags} = sprintf $config{ldoptiflags}, defined_or $args{optimize}, 1 if $config{ldoptiflags} =~ /%s/;
|
|
$config{lddebugflags} = sprintf $config{lddebugflags}, defined_or $args{debug}, 3 if $config{lddebugflags} =~ /%s/;
|
|
|
|
|
|
# generate CFLAGS
|
|
my @cflags;
|
|
push @cflags, $config{ccmiscflags};
|
|
-push @cflags, $config{ccoptiflags} if $args{optimize};
|
|
push @cflags, $config{ccdebugflags} if $args{debug};
|
|
push @cflags, $config{ccinstflags} if $args{instrument};
|
|
push @cflags, $config{ld_covflags} if $args{coverage};
|
|
@@ -375,7 +367,6 @@ $config{cflags} = join ' ', uniq(@cflags);
|
|
|
|
# generate LDFLAGS
|
|
my @ldflags = ($config{ldmiscflags});
|
|
-push @ldflags, $config{ldoptiflags} if $args{optimize};
|
|
push @ldflags, $config{lddebugflags} if $args{debug};
|
|
push @ldflags, $config{ldinstflags} if $args{instrument};
|
|
push @ldflags, $config{ld_covflags} if $args{coverage};
|
|
@@ -387,6 +378,10 @@ $config{ldflags} = join ' ', @ldflags;
|
|
# setup library names
|
|
$config{moarlib} = sprintf $config{lib}, $NAME;
|
|
$config{moardll} = sprintf $config{dll}, $NAME;
|
|
+
|
|
+if (exists $ENV{'SO_VERSION'}) {
|
|
+ $config{moardll} = $config{moardll} . "." . $ENV{'SO_VERSION'};
|
|
+}
|
|
|
|
# setup flags for shared builds
|
|
unless ($args{static}) {
|