Skip to content

Commit bec497d

Browse files
eukarpovjon-turney
authored andcommitted
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.
1 parent 29b8692 commit bec497d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

winsup/cygwin/scripts/gentls_offsets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ tmp_file=/tmp/${output_file}.$$
66

77
trap "rm -f ${tmp_file}" 0 1 2 15
88

9+
# Check if gawk is available
10+
if ! command -v gawk &> /dev/null; then
11+
echo "$0: gawk not found." >&2
12+
exit 1
13+
fi
14+
915
# Preprocess cygtls.h and filter out only the member lines from
1016
# class _cygtls to generate an input file for the cross compiler
1117
# to generate the member offsets for tlsoffsets-$(target_cpu).h.

0 commit comments

Comments
 (0)