diff options
author | Valentin Bartenev <vbart@nginx.com> | 2019-07-17 21:17:30 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2019-07-17 21:17:30 +0300 |
commit | 242dc363ced8d244ff296e1c3c8f802b4857fd35 (patch) | |
tree | 51fbf6e7096c63bca1634a25372ff4d6bec16f24 | |
parent | dbce694d5a9b43009fef894120edd44ad1e59c25 (diff) | |
download | unit-242dc363ced8d244ff296e1c3c8f802b4857fd35.tar.gz unit-242dc363ced8d244ff296e1c3c8f802b4857fd35.tar.bz2 |
Perl: propagated compile options from perl build.
Some Perl compile options affects ABI and not using them while compiling
our module resulted in non-working build.
Notably on 32-bit Debian 10, Perl is built with -D_FILE_OFFSET_BITS=64
and our module after being compiled without this option caused segmentation
faults in unexpected places.
Diffstat (limited to '')
-rw-r--r-- | auto/modules/perl | 3 | ||||
-rw-r--r-- | src/perl/nxt_perl_psgi_layer.h | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/auto/modules/perl b/auto/modules/perl index 904a5055..a4fd5437 100644 --- a/auto/modules/perl +++ b/auto/modules/perl @@ -57,6 +57,7 @@ nxt_found=no if /bin/sh -c "$NXT_PERL -MConfig -e 'print \"Perl version: \", \$Config{version}, \"\\n\"'" >> $NXT_AUTOCONF_ERR 2>&1; then + NXT_PERL_CFLAGS=`$NXT_PERL -MExtUtils::Embed -e ccflags | sed -e 's/^ //;s/ $//'` NXT_PERL_INCLUDE=`$NXT_PERL -MExtUtils::Embed -e perl_inc | sed -e 's/^ //;s/ $//'` NXT_PERL_LDOPTS=`$NXT_PERL -MExtUtils::Embed -e ldopts | sed -e 's/^ //;s/ $//'` @@ -165,7 +166,7 @@ for nxt_src in $NXT_PERL_MODULE_SRCS; do $NXT_BUILD_DIR/$nxt_obj: $nxt_src mkdir -p $NXT_BUILD_DIR/src/perl - \$(CC) -c \$(CFLAGS) \$(NXT_INCS) $NXT_PERL_INCLUDE \\ + \$(CC) -c \$(CFLAGS) $NXT_PERL_CFLAGS \$(NXT_INCS) $NXT_PERL_INCLUDE \\ $nxt_dep_flags \\ -o $NXT_BUILD_DIR/$nxt_obj $nxt_src $nxt_dep_post diff --git a/src/perl/nxt_perl_psgi_layer.h b/src/perl/nxt_perl_psgi_layer.h index 561d5153..3fa349c0 100644 --- a/src/perl/nxt_perl_psgi_layer.h +++ b/src/perl/nxt_perl_psgi_layer.h @@ -8,7 +8,6 @@ #define _NXT_PERL_PSGI_LAYER_H_INCLUDED_ -#define _GNU_SOURCE #include <EXTERN.h> #include <XSUB.h> #include <perl.h> |