feature: passed C compiler option -g by default for statically linked openssl, pcre, and zlib libraries to enable debuginfo.

pull/628/head
lijunlong 2 years ago committed by Yichun Zhang (agentzh)
parent fc17ac5bc2
commit 61f6ecb419
  1. 24
      t/000-sanity.t
  2. 15
      util/configure

@ -1407,8 +1407,8 @@ install: all
clean:
rm -rf build *.exe *.dll openresty-*
--- err
Can't exec "gcc-4.2": No such file or directory at ./configure line 710.
Can't exec "gcc-4.2": No such file or directory at ./configure line 755.
Can't exec "gcc-4.2": No such file or directory at ./configure line 725.
Can't exec "gcc-4.2": No such file or directory at ./configure line 770.
@ -1588,8 +1588,8 @@ install: all
clean:
rm -rf build *.exe *.dll openresty-*
--- err
Can't exec "cl": No such file or directory at ./configure line 710.
Can't exec "cl": No such file or directory at ./configure line 755.
Can't exec "cl": No such file or directory at ./configure line 725.
Can't exec "cl": No such file or directory at ./configure line 770.
@ -2432,8 +2432,8 @@ install: all
clean:
rm -rf build *.exe *.dll openresty-*
--- err
Can't exec "sw_vers": No such file or directory at ./configure line 829.
Use of uninitialized value $v in scalar chomp at ./configure line 830.
Can't exec "sw_vers": No such file or directory at ./configure line 844.
Use of uninitialized value $v in scalar chomp at ./configure line 845.
@ -2523,8 +2523,8 @@ install: all
clean:
rm -rf build *.exe *.dll openresty-*
--- err
Can't exec "sw_vers": No such file or directory at ./configure line 829.
Use of uninitialized value $v in scalar chomp at ./configure line 830.
Can't exec "sw_vers": No such file or directory at ./configure line 844.
Use of uninitialized value $v in scalar chomp at ./configure line 845.
@ -3523,7 +3523,7 @@ sh ./configure --prefix=/usr/local/openresty/nginx \
--add-module=../rds-csv-nginx-module-0.09 \
--add-module=../ngx_stream_lua-0.0.8rc3 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
--with-openssl=$OPENRESTY_DIR/../some/module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
--with-openssl=$OPENRESTY_DIR/../some/module --with-openssl-opt=-g --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
cd ../..
Type the following commands to build and install:
gmake
@ -3962,7 +3962,7 @@ sh ./configure --prefix=/usr/local/openresty/nginx \
--add-module=../rds-csv-nginx-module-0.09 \
--add-module=../ngx_stream_lua-0.0.8rc3 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
--with-pcre=$OPENRESTY_DIR/../some/module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
--with-pcre=$OPENRESTY_DIR/../some/module --with-pcre-opt=-g --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
cd ../..
Type the following commands to build and install:
gmake
@ -4050,7 +4050,7 @@ sh ./configure --prefix=/usr/local/openresty/nginx \
--add-module=../rds-csv-nginx-module-0.09 \
--add-module=../ngx_stream_lua-0.0.8rc3 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
--with-zlib=$OPENRESTY_DIR/../some/module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
--with-zlib=$OPENRESTY_DIR/../some/module --with-zlib-opt=-g --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
cd ../..
Type the following commands to build and install:
gmake
@ -4847,7 +4847,7 @@ sh ./configure --prefix=/usr/local/openresty/nginx \
--add-module=../rds-csv-nginx-module-0.09 \
--add-module=../ngx_stream_lua-0.0.8rc3 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
'--with-pcre-opt=-foo -bar' $'--with-zlib-opt=hello, \'\\world' --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
'--with-pcre-opt=-g -foo -bar' $'--with-zlib-opt=-g hello, \'\\world' --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
cd ../..
Type the following commands to build and install:
gmake

15
util/configure vendored

@ -25,6 +25,9 @@ my $OS = $^O;
my ($ngx_dir, $lualib_prefix);
my %with_ext_lib;
my %with_ext_lib_opts;
for my $opt (@ARGV) {
if ($opt =~ /^--platform=(.*)/) {
$OS = $1;
@ -346,6 +349,12 @@ for my $opt (@ARGV) {
}
$path = File::Spec->rel2abs($path);
push @ngx_opts, "--with-$lib=$path";
$with_ext_lib{$lib} = 1;
} elsif ($opt =~ /^--with-(openssl|pcre|zlib)-opt=(.*)/) {
my ($lib, $opt) = ($1, $2);
push @ngx_opts, "--with-$lib-opt=-g $opt";
$with_ext_lib_opts{$lib} = 1;
} elsif ($opt =~ /^--sbin-path=(.*)/) {
$ngx_sbin = $1;
@ -359,6 +368,12 @@ for my $opt (@ARGV) {
}
}
for my $lib (qw/openssl pcre zlib/) {
if ($with_ext_lib{$lib} && !$with_ext_lib_opts{$lib}) {
push @ngx_opts, "--with-$lib-opt=-g";
}
}
if ($platform eq 'msys') {
$resty_opts{no_lua_resty_signal} = 1;
$resty_opts{no_lua_resty_shell} = 1;

Loading…
Cancel
Save