binutils-gdb/sim/igen
Tsukasa OI dd6c5a9217 sim, sim/{m32c,ppc,rl78}: Use getopt_long
Because of a Libiberty hack, getopt on GNU libc (2.25 or earlier) is
currently unusable on sim, causing a regression on CentOS 7.

This is caused as follows:

1.  If HAVE_DECL_GETOPT is defined (getopt declaration with known prototype
    is detected while configuration), a declaration of getopt in
    "include/getopt.h" is suppressed.
    The author started to define HAVE_DECL_GETOPT in sim with the commit
    340aa4f687 ("sim: Check known getopt definition existence").
2.  GNU libc (2.25 or earlier)'s <unistd.h> includes <getopt.h> with a
    special purpose macro defined to declare only getopt function but due
    to include path (not tested while configuration), it causes <unistd.h>
    to include Libiberty's "include/getopt.h".
3.  If both 1. and 2. are satisfied, despite that <unistd.h> tries to
    declare getopt by including <getopt.h>, "include/getopt.h" does not do
    so, causing getopt function undeclared.

Getting rid of "include/getopt.h" (e.g. renaming this header file) is the
best solution to avoid hacking but as a short-term solution, this commit
replaces getopt with getopt_long under sim/.
2022-10-29 05:39:52 +00:00
..
ChangeLog-2021 sim: rename ChangeLog files to ChangeLog-2021 2021-08-17 20:27:36 -04:00
compare_igen_models Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
filter_host.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
filter_host.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
filter.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
filter.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-engine.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-engine.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-icache.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-icache.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-idecode.c sim: igen: migrate to standard uintXX_t types 2022-01-06 01:17:38 -05:00
gen-idecode.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-itable.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-itable.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-model.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-model.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-semantics.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-semantics.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-support.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen-support.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
gen.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
igen.c sim, sim/{m32c,ppc,rl78}: Use getopt_long 2022-10-29 05:39:52 +00:00
igen.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
ld-cache.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
ld-cache.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
ld-decode.c sim: igen: migrate to standard uintXX_t types 2022-01-06 01:17:38 -05:00
ld-decode.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
ld-insn.c sim: igen: migrate to standard uintXX_t types 2022-01-06 01:17:38 -05:00
ld-insn.h sim: igen: migrate to standard uintXX_t types 2022-01-06 01:17:38 -05:00
lf.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
lf.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
local.mk Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
misc.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
misc.h sim: igen: migrate to standard uintXX_t types 2022-01-06 01:17:38 -05:00
table.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
table.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00