From: Alan Modra Date: Mon, 18 Jan 2016 05:36:49 +0000 (+1030) Subject: Provide AC_PROG_LEX that copes with LEX=missing from top-level X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d961d0d3a797b4d463024a11131e96c213dee27;p=binutils-gdb.git Provide AC_PROG_LEX that copes with LEX=missing from top-level config/ PR binutils/19481 * override.m4 (AC_PROG_LEX): Define. binutils/ * configure: Regenerate. gas/ * configure: Regenerate. ld/ * configure: Regenerate. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 97dc3613a26..c5b52f4b9b2 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2016-01-18 Alan Modra + + * configure: Regenerate. + 2016-01-17 Alan Modra * configure: Regenerate. diff --git a/binutils/configure b/binutils/configure index e1452e33298..dc735dcc9d8 100755 --- a/binutils/configure +++ b/binutils/configure @@ -12112,8 +12112,9 @@ fi done test -n "$LEX" || LEX=":" -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF +case "$LEX" in + :|*"missing "*) ;; + *) cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } @@ -12224,8 +12225,8 @@ $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi + ;; +esac if test "$LEX" = :; then LEX=${am_missing_run}flex fi diff --git a/config/ChangeLog b/config/ChangeLog index d115579a39a..bb77be0e15c 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2016-01-18 Alan Modra + + PR binutils/19481 + * override.m4 (AC_PROG_LEX): Define. + 2015-10-21 Maxim Ostapenko * bootstrap-asan.mk: Replace ASAN_OPTIONS=detect_leaks with diff --git a/config/override.m4 b/config/override.m4 index 52bd1c3d1b8..b5ce6545ab6 100644 --- a/config/override.m4 +++ b/config/override.m4 @@ -101,4 +101,16 @@ m4_define([_AC_CHECK_DECLS], ]) +dnl If flex/lex are not found, the top level configure sets LEX to +dnl "/path_to/missing flex". When AC_PROG_LEX tries to find the flex +dnl output file, it calls $LEX to do so, but the current lightweight +dnl "missing" won't create a file. This results in an error. +dnl Avoid calling the bulk of AC_PROG_LEX when $LEX is "missing". +AC_DEFUN_ONCE([AC_PROG_LEX], +[AC_CHECK_PROGS(LEX, flex lex, :) +case "$LEX" in + :|*"missing "*) ;; + *) _AC_PROG_LEX_YYTEXT_DECL ;; +esac]) + ]) diff --git a/gas/ChangeLog b/gas/ChangeLog index 38ccec5eb7c..1c0e2248c58 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2016-01-18 Alan Modra + + * configure: Regenerate. + 2016-01-17 Alan Modra * configure: Regenerate. diff --git a/gas/configure b/gas/configure index ceb99f5ab13..c69edf58038 100755 --- a/gas/configure +++ b/gas/configure @@ -12862,8 +12862,9 @@ fi done test -n "$LEX" || LEX=":" -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF +case "$LEX" in + :|*"missing "*) ;; + *) cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } @@ -12974,8 +12975,8 @@ $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi + ;; +esac if test "$LEX" = :; then LEX=${am_missing_run}flex fi diff --git a/ld/ChangeLog b/ld/ChangeLog index ba6c46347aa..b99b17080e0 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2016-01-18 Alan Modra + + * configure: Regenerate. + 2016-01-18 Nick Clifton * testsuite/ld-plugin/plugin.exp: Skip plugin tests if the linker diff --git a/ld/configure b/ld/configure index 65b280cc9d7..2141ee7cb09 100755 --- a/ld/configure +++ b/ld/configure @@ -16130,8 +16130,9 @@ fi done test -n "$LEX" || LEX=":" -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF +case "$LEX" in + :|*"missing "*) ;; + *) cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } @@ -16242,8 +16243,8 @@ $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi + ;; +esac if test "$LEX" = :; then LEX=${am_missing_run}flex fi