Welcome! Log In Create A New Profile

Advanced

[PATCH] Configure: postpone running the test binary

Piotr Sikora via nginx-devel
May 02, 2024 05:36PM
# HG changeset patch
# User Piotr Sikora <piotr@aviatrix.com>
# Date 1714589827 0
# Wed May 01 18:57:07 2024 +0000
# Node ID 2d5e754e3a4e7a59eaf7f653ad4fd5346f53eab4
# Parent 49dce50fad40bf09db81ca2a35983ecd7b740e43
Configure: postpone running the test binary.

Previously, the ./configure script would attempt to execute the test
binary during the C compiler check, and it would abort with an error
saying that the compiler doesn't work if there was any issue running
the test binary (e.g. due to missing compiler and/or linker flags).

This change delays that check and runs the test binary compiled with
all provided compiler and linker flags.

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

diff -r 49dce50fad40 -r 2d5e754e3a4e auto/cc/conf
--- a/auto/cc/conf Tue Apr 16 18:29:59 2024 +0400
+++ b/auto/cc/conf Wed May 01 18:57:07 2024 +0000
@@ -164,6 +164,23 @@
fi


+ ngx_feature="working test binary"
+ ngx_feature_name=
+ ngx_feature_run=yes
+ ngx_feature_incs=
+ ngx_feature_path=
+ ngx_feature_libs=
+ ngx_feature_test=
+ . auto/feature
+
+ if [ $ngx_found = no ]; then
+ echo
+ echo $0: error: cannot execute test binary
+ echo
+ exit 1
+ fi
+
+
ngx_feature="-Wl,-E switch"
ngx_feature_name=
ngx_feature_run=no
diff -r 49dce50fad40 -r 2d5e754e3a4e auto/cc/name
--- a/auto/cc/name Tue Apr 16 18:29:59 2024 +0400
+++ b/auto/cc/name Wed May 01 18:57:07 2024 +0000
@@ -7,7 +7,7 @@

ngx_feature="C compiler"
ngx_feature_name=
- ngx_feature_run=yes
+ ngx_feature_run=no
ngx_feature_incs=
ngx_feature_path=
ngx_feature_libs=
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Configure: postpone running the test binary

Piotr Sikora via nginx-devel 283 May 02, 2024 05:36PM



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

Online Users

Guests: 239
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