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.
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.