Skip to content

Commit

Permalink
fix(sys): drop unnecessary flags from vendored build on Linux
Browse files Browse the repository at this point in the history
 - `-fPIC` is not propagated to PCRE2, causing a linker error on Fedora
 - `-Wp,-D_FORTIFY_SOURCE=2` conflicts with the compiler builtin default
   value on Ubuntu 24.04
 - The remaining flags are also not necessary for testing the modules,
   and the binary produced by nginx-sys/vendored is not meant to be used
   in production.

Fixes #80
  • Loading branch information
bavshin-f5 committed Jun 19, 2024
1 parent 8adf6d8 commit a1a0dd7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nginx-sys/build/vendored.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@ const NGX_BASE_MODULES: [&str; 20] = [
"--with-threads",
];
/// Additional configuration flags to use when building on Linux.
const NGX_LINUX_ADDITIONAL_OPTS: [&str; 3] = [
const NGX_LINUX_ADDITIONAL_OPTS: [&str; 1] = [
"--with-file-aio",
"--with-cc-opt=-g -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC",
"--with-ld-opt=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie",
];
const ENV_VARS_TRIGGERING_RECOMPILE: [&str; 12] = [
"DEBUG",
Expand Down

0 comments on commit a1a0dd7

Please sign in to comment.