Thanks for the reply.
I now use MSYS2 with mingw64 to build the riscv gnu toolchain. Now the make errors are gone. But i now got below errors.
plural.c:184:5: error: conflicting types for ‘libintl_gettextparse’
int __gettextparse (void);
^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural.y:40:25: note: expanded from macro ‘__gettextparse’
define __gettextparse PLURAL_PARSE
^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural-exp.h:102:23: note: expanded from macro ‘PLURAL_PARSE’
define PLURAL_PARSE libintl_gettextparse
^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural-exp.h:114:12: note: previous declaration is here
extern int PLURAL_PARSE PARAMS ((void *arg));
^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural-exp.h:102:23: note: expanded from macro ‘PLURAL_PARSE’
define PLURAL_PARSE libintl_gettextparse
^
plural.c:1129:1: error: conflicting types for ‘libintl_gettextparse’
yyparse (void)
^
plural.c:63:25: note: expanded from macro ‘yyparse’
#define yyparse __gettextparse
^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural.y:40:25: note: expanded from macro ‘__gettextparse’
define __gettextparse PLURAL_PARSE
^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural-exp.h:102:23: note: expanded from macro ‘PLURAL_PARSE’
define PLURAL_PARSE libintl_gettextparse
^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural-exp.h:114:12: note: previous declaration is here
extern int PLURAL_PARSE PARAMS ((void *arg));
^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural-exp.h:102:23: note: expanded from macro ‘PLURAL_PARSE’
define PLURAL_PARSE libintl_gettextparse
^
plural.c:1298:30: error: too few arguments to function call, expected 2, have 1
yychar = yylex (&yylval);
~~~~~ ^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural.y:69:1: note: ‘__gettextlex’ declared here
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
^
/usr/home/hegdemur/riscv/_riscv-gnu-toolchain/riscv-binutils-gdb/intl/plural.y:178:29: error: use of undeclared identifier ‘arg’
((struct parse_args *) arg)->res = (yyvsp[0].exp);
should i use specific version of bison and gcc here ? my current bison version in msys2 is
bison (GNU Bison) 3.6.4
Written by Robert Corbett and Richard Stallman.
Copyright © 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and GCC version is
gcc.exe (Rev1, Built by MSYS2 project) 10.2.0
Copyright © 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE