]> git.kaiwu.me - nginx.git/commit
Configure: ensure we get the "built by ..." line in nginx -V.
authorAndrew Clayton <a.clayton@nginx.com>
Tue, 23 Sep 2025 02:46:43 +0000 (03:46 +0100)
committerAndrew Clayton <a.clayton@nginx.com>
Tue, 4 Nov 2025 16:11:53 +0000 (16:11 +0000)
commit99312be10c0edd554a40df03591ed2d905f8bd10
tree9ad2c0bbad00b6e5b737e4c0ba10132bdd4e4034
parentfd0848bdd3f7ed50a3a2cd5abe6bf4ae186927c6
Configure: ensure we get the "built by ..." line in nginx -V.

For certain compilers we embed the compiler version used to build nginx
in the binary, retrievable via 'nginx -V', e.g.

  $ ./objs/nginx -V
  ...
  built by gcc 15.2.1 20250808 (Red Hat 15.2.1-1) (GCC)
  ...

However if the CFLAGS environment variable is set this would be omitted.

This is due to the compiler specific auto/cc files not being run when
the CFLAGS environment variable is set, this is so entities can set
their own compiler flags, and thus the NGX_COMPILER variable isn't set.

Nonetheless it is a useful thing to have so re-work the auto scripts to
move the version gathering out of the individual auto/cc/$NGX_CC_NAME
files and merge them into auto/cc/name.

Link: <https://github.com/nginx/nginx/issues/878>
auto/cc/clang
auto/cc/gcc
auto/cc/icc
auto/cc/msvc
auto/cc/name
auto/cc/sunc