From 20d34593f94df0d34d2617dee28f2525a1f8a42a Mon Sep 17 00:00:00 2001 From: ff520git Date: Wed, 27 Mar 2024 11:15:06 +0800 Subject: [PATCH] Update generate_target_board RISCV: Add target_board generation for multiple arch_abi parameters Currently this script just can handle one parameter for arch_abi,but there is more than one arch_abi in "newlib_multilib_names" which comes from the configure. Execute the following command: generate_target_board --sim-name riscv-sim --cmodel medany --build-arch-abi "rv32imafc-ilp32f rv64imafdc-lp64d" Before this patch the result is: riscv-sim/-march=rv32imafc/-mabi=ilp32f rv64imafdc/-mcmodel=medany After this patch,the result is: riscv-sim/-march=rv32imafc/-mabi=ilp32f/-mcmodel=medany riscv-sim/-march=rv64imafdc/-mabi=lp64d/-mcmodel=medany At the same time,there is small modification for Makefile.in,the parameters of build-arch-abi should be enclosed in double quotation marks. --build-arch-abi "$(NEWLIB_MULTILIB_NAMES)" Signed-off-by: ff520git --- scripts/generate_target_board | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/generate_target_board b/scripts/generate_target_board index c4d91eebc9f..ab936e40777 100755 --- a/scripts/generate_target_board +++ b/scripts/generate_target_board @@ -50,9 +50,14 @@ def main(argv): print ("The --sim-name and/or --build-arch-abi cannot be empty or null.") return - target_board_list = [ - generate_one_target_board(options.build_arch_abi, "", options) - ] + target_board_list = [] + arch_abi_list = [options.build_arch_abi] + if ' ' in options.build_arch_abi: + arch_abi_list = options.build_arch_abi.split (" ") + + for one_arch_abi in arch_abi_list: + target_board = generate_one_target_board(one_arch_abi, "", options) + target_board_list.append(target_board) if options.extra_test_arch_abi_flags_list: extra_test_list = options.extra_test_arch_abi_flags_list.split (";")