lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 29 Oct 2019 07:31:24 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Ethan Sommer <e5ten.arch@...il.com>
Cc:     Michal Marek <michal.lkml@...kovi.net>,
        Nathan Chancellor <natechancellor@...il.com>,
        Sedat Dilek <sedat.dilek@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kbuild: support byacc as alternative YACC to bison

On Tue, Oct 29, 2019 at 1:02 AM Ethan Sommer <e5ten.arch@...il.com> wrote:
>
> Switches to a more portable set of flags for generating the same file
> names instead of the bison-specific --defines, uses the more portable -V
> instead of --version, and explicitly defines YYSTYPE in lex.l, which
> bison implicitly defines if not present but byacc does not.
>
> Signed-off-by: Ethan Sommer <e5ten.arch@...il.com>
> ---


I applied this patch, and tried the latest byacc,
but I still cannot build kconfig probably because
%destructor is not supported.
byacc does not seem to work anyway.



$ /home/masahiro/bin/yacc  -V
/home/masahiro/bin/yacc - 1.9 20190617
masahiro@...ver:~/ref/linux$ make YACC=/home/masahiro/bin/yacc  defconfig
  YACC    scripts/kconfig/parser.tab.[ch]
/home/masahiro/bin/yacc: e - line 104 of "scripts/kconfig/parser.y",
syntax error
%destructor {
^
make[1]: *** [scripts/Makefile.host;17: scripts/kconfig/parser.tab.h] Error 1
make[1]: *** Deleting file 'scripts/kconfig/parser.tab.h'
make[1]: *** [scripts/kconfig/parser.tab.h] Deleting file
'scripts/kconfig/parser.tab.c'
make: *** [Makefile;567: defconfig] Error 2


>  scripts/Makefile.host     | 2 +-
>  scripts/genksyms/Makefile | 2 +-
>  scripts/genksyms/lex.l    | 2 ++
>  3 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/Makefile.host b/scripts/Makefile.host
> index 4c51c95d40f4..64e98e1d4825 100644
> --- a/scripts/Makefile.host
> +++ b/scripts/Makefile.host
> @@ -11,7 +11,7 @@ $(obj)/%.lex.c: $(src)/%.l FORCE
>  # YACC
>  # ---------------------------------------------------------------------------
>  quiet_cmd_bison = YACC    $(basename $@).[ch]
> -      cmd_bison = $(YACC) -o $(basename $@).c --defines=$(basename $@).h -t -l $<
> +      cmd_bison = $(YACC) -b $(basename $(basename $@)) -d -t -l $<
>
>  $(obj)/%.tab.c $(obj)/%.tab.h: $(src)/%.y FORCE
>         $(call if_changed,bison)
> diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile
> index 78629f515e78..397c2dc8182b 100644
> --- a/scripts/genksyms/Makefile
> +++ b/scripts/genksyms/Makefile
> @@ -15,7 +15,7 @@ genksyms-objs := genksyms.o parse.tab.o lex.lex.o
>  ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
>
>  quiet_cmd_bison_no_warn = $(quiet_cmd_bison)
> -      cmd_bison_no_warn = $(YACC) --version >/dev/null; \
> +      cmd_bison_no_warn = $(YACC) -V >/dev/null; \
>                           $(cmd_bison) 2>/dev/null
>
>  $(obj)/pars%.tab.c $(obj)/pars%.tab.h: $(src)/pars%.y FORCE
> diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
> index e265c5d96861..0580c088527f 100644
> --- a/scripts/genksyms/lex.l
> +++ b/scripts/genksyms/lex.l
> @@ -19,6 +19,8 @@
>  #include "genksyms.h"
>  #include "parse.tab.h"
>
> +extern YYSTYPE yylval;
> +
>  /* We've got a two-level lexer here.  We let flex do basic tokenization
>     and then we categorize those basic tokens in the second stage.  */
>  #define YY_DECL                static int yylex1(void)
> --
> 2.23.0
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ