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 RC(root cause).
diff --git a/winsup/cygwin/scripts/gentls_offsets b/winsup/cygwin/scripts/gentls_offsets index c375a6106..6a362751d 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 "Error: gawk has not been found. Please install gawk." >&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.