mirror of
https://github.com/nginx/nginx.git
synced 2026-05-13 09:36:42 +00:00
Configure: fix gcc version detection in some corner cases
If the "gcc version ... " string appeared within "Configured with:", it was picked up rather than the real gcc version string. This might then break the configure scripts due to a malformed NGX_COMPILER macro. The simple fix is to look for "gcc version ... " at the start of the line, rather than anywhere within. Suggested-by: Aleksei Bavshin <a.bavshin@nginx.com> Closes: https://github.com/nginx/nginx/issues/1278
This commit is contained in:
parent
6eb7dcdd98
commit
35510ddc94
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
|
|||
NGX_CC_NAME=gcc
|
||||
echo " + using GNU C compiler"
|
||||
|
||||
NGX_CC_VER=`$CC -v 2>&1 | sed -n -e 's/^.*gcc version \(.*\)/\1/p'`
|
||||
NGX_CC_VER=`$CC -v 2>&1 | sed -n -e 's/^gcc version \(.*\)/\1/p'`
|
||||
echo " + gcc version: $NGX_CC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"gcc $NGX_CC_VER\"" . auto/define
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue