Is there a particular reason --with-compat isn't enabled by default?

Maxim Dounin mdounin at
Wed May 16 16:24:15 UTC 2018


On Wed, May 16, 2018 at 12:03:51PM -0400, Thomas Ward wrote:

> On 05/10/2018 08:47 AM, Maxim Dounin wrote:
> > More importantly, "--with-compat" provides compatibility between 
> > builds with different configure options.  
> >
> > Without the "--with-compat" argument, one have to use exactly the 
> > same  "./configure" line to build both nginx and a module.  The 
> > "--with-compat" option relaxes this restriction, and it is more or 
> > less enough to build both nginx and a module with "--with-compat".
> >
> > This generally simplifies building dynamic modules, and also 
> > allows one to load the same module into different nginx variants 
> > built with different flags.
> Is there a reason, then, that `--with-compat` is not a default build
> option?  Is there a particular specific reason it was *not* set as a
> default compile-time option?

The main reasons are that "--with-compat" is not needed when not 
using dynamic modules built separately, and compiling nginx with 
"--with-compat" results in slightly less optimal binaries (with 
various otherwise unneeded placeholder fields added to 

We've considered making it the default when it was introduced, but 
decided to keep it as an explicit option then.  This might worth 

Maxim Dounin

More information about the nginx-devel mailing list