perf tools: Add "reject" option for parse-events.l

Arnaldo reported broken builds in some distros using a newer flex
release, 2.6.4, found in Alpine Linux 3.6 and Edge, with flex not
spotting the REJECT macro:

  CC       /tmp/build/perf/util/parse-events-flex.o
  util/parse-events.l: In function 'parse_events_lex':
  /tmp/build/perf/util/parse-events-flex.c:4734:16: error: \
  'reject_used_but_not_detected' undeclared (first use in this function)

It's happening because we put the REJECT under another USER_REJECT macro
in following commit:

  9445464bb831 perf tools: Unwind properly location after REJECT

Fortunately flex provides option for force it to use REJECT, adding it
to parse-events.l.

Reported-by: Arnaldo Carvalho de Melo <>
Reported-by: Markus Trippelsdorf <>
Signed-off-by: Jiri Olsa <>
Reviewed-by: Andi Kleen <>
Tested-by: Arnaldo Carvalho de Melo <>
Cc: Namhyung Kim <>
Fixes: 9445464bb831 ("perf tools: Unwind properly location after REJECT")
Signed-off-by: Arnaldo Carvalho de Melo <>
1 file changed