Welcome! Log In Create A New Profile

Advanced

[PATCH] Configure: test --with-cc-opt options

Piotr Sikora via nginx-devel
May 02, 2024 05:34PM
# HG changeset patch
# User Piotr Sikora <piotr@aviatrix.com>
# Date 1714589524 0
# Wed May 01 18:52:04 2024 +0000
# Node ID 0d5498e86bf8a7f119ed83dbc0789be37d728334
# Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43
Configure: test --with-cc-opt options.

Previously, invalid C compiler options would fail with an
unrelated error much later in the ./configure tests.

This matches the existing test for --with-ld-opt options.

Signed-off-by: Piotr Sikora <piotr@aviatrix.com>

diff -r 49dce50fad40 -r 0d5498e86bf8 auto/cc/conf
--- a/auto/cc/conf Tue Apr 16 18:29:59 2024 +0400
+++ b/auto/cc/conf Wed May 01 18:52:04 2024 +0000
@@ -142,6 +142,29 @@
fi

CFLAGS="$CFLAGS $NGX_CC_OPT"
+
+if [ "$NGX_PLATFORM" != win32 ]; then
+
+ if test -n "$NGX_CC_OPT"; then
+ ngx_feature=--with-cc-opt=\"$NGX_CC_OPT\"
+ ngx_feature_name=
+ ngx_feature_run=no
+ ngx_feature_incs=
+ ngx_feature_path=
+ ngx_feature_libs=
+ ngx_feature_test=
+ . auto/feature
+
+ if [ $ngx_found = no ]; then
+ echo
+ echo $0: error: the invalid value in --with-cc-opt=\"$NGX_CC_OPT\"
+ echo
+ exit 1
+ fi
+ fi
+
+fi
+
NGX_TEST_LD_OPT="$NGX_LD_OPT"

if [ "$NGX_PLATFORM" != win32 ]; then
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Configure: test --with-cc-opt options

Piotr Sikora via nginx-devel 255 May 02, 2024 05:34PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 187
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready