From 5184413e566a3c105aaa6516dfb8979691891c05 Mon Sep 17 00:00:00 2001 From: Bin XIE Date: Tue, 22 Oct 2024 15:33:00 +0800 Subject: [PATCH] fix NEWLIB_MULTILIB_NAMES in Makefile see https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1513 The NEWLIB_MULTILIB_NAMES generated in makefile for MULTILIB_GEN may contain space at the end, which cause the generate_target_board script to crash Signed-off-by: Bin XIE --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index e3d51dce35e..4449aa00d58 100644 --- a/Makefile.in +++ b/Makefile.in @@ -74,7 +74,7 @@ ifeq ($(MULTILIB_GEN),) NEWLIB_MULTILIB_NAMES := @newlib_multilib_names@ GCC_MULTILIB_FLAGS := $(MULTILIB_FLAGS) else -NEWLIB_MULTILIB_NAMES := $(shell echo "$(MULTILIB_GEN)" | $(SED) 's/;/\n/g' | $(SED) '/^$$/d' | $(AWK) '{split($$0,a,"-"); printf "%s-%s ", a[1],a[2]}') +NEWLIB_MULTILIB_NAMES := $(shell echo "$(MULTILIB_GEN)" | $(SED) 's/;/\n/g' | $(SED) '/^$$/d' | $(AWK) '{split($$0,a,"-"); printf "%s-%s", (NR==1?a[1]:" "a[1]),a[2]}') GCC_MULTILIB_FLAGS := $(MULTILIB_FLAGS) --with-multilib-generator="$(MULTILIB_GEN)" endif GLIBC_MULTILIB_NAMES := @glibc_multilib_names@