Files
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
    340aa4f6872c ("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
..
2022-05-13 14:32:54 +09:30
2022-08-06 08:03:16 +09:30
2022-10-11 15:18:14 +01:00
2022-08-06 08:03:16 +09:30
2022-05-13 14:32:54 +09:30
2022-10-24 17:23:47 +01:00
2022-09-27 11:42:32 -07:00
2022-05-13 14:32:54 +09:30
2022-10-11 15:18:14 +01:00
2022-08-06 08:03:16 +09:30
2022-10-24 17:00:49 +01:00
2022-04-06 11:10:40 -04:00
2022-09-27 11:42:32 -07:00
2022-09-01 10:15:09 -04:00