Cygwin: Check if gawk is available in gentls_offsets script
authorEvgeny Karpov <evgeny@kmaps.co>
Mon, 22 Sep 2025 17:08:39 +0000 (12:08 -0500)
committerJon Turney <jon.turney@dronecode.org.uk>
Sat, 25 Oct 2025 15:03:09 +0000 (16:03 +0100)
The patch extends the gentls_offsets script with a validation that gawk
is available. Otherwise, the script does not generate tlsoffsets and
does not fail. The issue appears later during sigfe.s compilation and it
takes longer to understand the root cause.

winsup/cygwin/scripts/gentls_offsets

index c375a6106feb1b9d6f580059dbf2e7393ffad4d4..bf84dd0cb4daf4fe1dedfbe8723ae1dd702c7759 100755 (executable)
@@ -6,6 +6,12 @@ tmp_file=/tmp/${output_file}.$$
 
 trap "rm -f ${tmp_file}" 0 1 2 15
 
+# Check if gawk is available
+if ! command -v gawk &> /dev/null; then
+    echo "$0: gawk not found." >&2
+    exit 1
+fi
+
 # Preprocess cygtls.h and filter out only the member lines from
 # class _cygtls to generate an input file for the cross compiler
 # to generate the member offsets for tlsoffsets-$(target_cpu).h.
This page took 0.034381 seconds and 5 git commands to generate.