1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-08-15 19:40:19 +02:00

cli_classic: include a fallback inplementation of getopt

Some systems, DJGPP/DOS for now, may not provide getopt and their gnu
extensions. So provide a fallback implementation.
The code is based on musl libc.

Change-Id: I6ebbde075014e3b45b0f9e04b34b72aa969e1197
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/73102
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Thomas Heijligen
2023-02-20 13:18:50 +01:00
committed by Anastasia Klimchuk
parent 7348eb3320
commit ba6acffc69
4 changed files with 319 additions and 6 deletions

View File

@@ -633,13 +633,20 @@ pkgg.generate(
)
if get_option('classic_cli').enabled() or get_option('classic_cli').auto() and not get_option('default_library') == 'shared'
cli_srcs = files(
'cli_classic.c',
'cli_common.c',
'cli_output.c'
)
if not cc.has_function('getopt_long')
cli_srcs += files('cli_getopt.c')
endif
classic_cli = executable(
'flashrom',
files(
'cli_classic.c',
'cli_common.c',
'cli_output.c',
),
cli_srcs,
c_args : cargs,
include_directories : include_dir,
install : true,