File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ NEWLIB_CC_FOR_TARGET ?= $(NEWLIB_TUPLE)-gcc
9494NEWLIB_CXX_FOR_TARGET ?= $(NEWLIB_TUPLE ) -g++
9595NEWLIB_TARGET_BOARDS ?= $(shell echo "$(NEWLIB_MULTILIB_NAMES ) " | sed 's!\([_a-z0-9]* \) -\([_a-z0-9]*\)!riscv-sim/-march=\1/-mabi=\2/@cmodel@!g')
9696NEWLIB_NANO_TARGET_BOARDS ?= $(shell echo "$(NEWLIB_MULTILIB_NAMES ) " | sed 's!\([_a-z0-9]* \) -\([_a-z0-9]*\)!riscv-sim-nano/-march=\1/-mabi=\2/@cmodel@!g')
97+ NEWLIB_CC_FOR_MULTILIB_INFO := $(NEWLIB_CC_FOR_TARGET )
9798
9899MUSL_TARGET_FLAGS := $(MUSL_TARGET_FLAGS_EXTRA )
99100MUSL_CC_FOR_TARGET ?= $(MUSL_TUPLE ) -gcc
@@ -640,8 +641,13 @@ stamps/build-newlib-nano: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-ne
640641
641642stamps/merge-newlib-nano : stamps/build-newlib-nano stamps/build-newlib
642643# Copy nano library files into newlib install dir.
644+ if [ -f $(INSTALL_DIR)/bin/$(NEWLIB_TUPLE)-gcc ] ; then \
645+ export NEWLIB_CC_FOR_MULTILIB_INFO="$(INSTALL_DIR)/bin/$(NEWLIB_TUPLE)-gcc"; \
646+ else \
647+ export NEWLIB_CC_FOR_MULTILIB_INFO="$(NEWLIB_CC_FOR_TARGET)"; \
648+ fi
643649 set -e; \
644- for ml in `$(INSTALL_DIR)/bin/$(NEWLIB_TUPLE)-gcc --print-multi-lib`; \
650+ for ml in `${NEWLIB_CC_FOR_MULTILIB_INFO} --print-multi-lib`; \
645651 do \
646652 mld=`echo $${ml} | sed -e 's/;.*$$//'`; \
647653 cp $(builddir)/install-newlib-nano/$(NEWLIB_TUPLE)/lib/$${mld}/libc.a \
You can’t perform that action at this time.
0 commit comments