[newlib-cygwin/main] Cygwin: Check if gawk is available in gentls_offsets script
Jon Turney
jturney@sourceware.org
Sat Oct 25 15:04:09 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=bec497da78bf1609f967b3339a7378e1de0ebe55
commit bec497da78bf1609f967b3339a7378e1de0ebe55
Author: Evgeny Karpov <evgeny@kmaps.co>
Date: Mon Sep 22 12:08:39 2025 -0500
Cygwin: Check if gawk is available in gentls_offsets script
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.
Diff:
---
winsup/cygwin/scripts/gentls_offsets | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/winsup/cygwin/scripts/gentls_offsets b/winsup/cygwin/scripts/gentls_offsets
index c375a6106..bf84dd0cb 100755
--- a/winsup/cygwin/scripts/gentls_offsets
+++ b/winsup/cygwin/scripts/gentls_offsets
@@ -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.
More information about the Cygwin-cvs
mailing list