Skip to content

Commit 1cef9ad

Browse files
committed
newlib: Add extra build step for configuring
Signed-off-by: Yuriy Kolerov <[email protected]>
1 parent 8b8bee2 commit 1cef9ad

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

Makefile.in

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,10 @@ stamps/build-gcc-newlib-stage1: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-binuti
722722
$(MAKE) -C $(notdir $@) install-gcc
723723
mkdir -p $(dir $@) && touch $@
724724

725-
stamps/build-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-stage1
726-
rm -rf $@ $(notdir $@)
727-
mkdir $(notdir $@)
728-
cd $(notdir $@) && $</configure \
725+
stamps/configure-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-stage1
726+
rm -rf $@ stamps/build-newlib build-newlib
727+
mkdir build-newlib
728+
cd build-newlib && $</configure \
729729
--target=$(NEWLIB_TUPLE) \
730730
$(CONFIGURE_HOST) \
731731
--prefix=$(INSTALL_DIR) \
@@ -736,14 +736,17 @@ stamps/build-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-
736736
CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -ffunction-sections -fdata-sections $(CFLAGS_FOR_TARGET)" \
737737
CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -ffunction-sections -fdata-sections $(CXXFLAGS_FOR_TARGET)" \
738738
$(NEWLIB_TARGET_FLAGS)
739+
mkdir -p $(dir $@) && touch $@
740+
741+
stamps/build-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/configure-newlib
739742
$(MAKE) -C $(notdir $@)
740743
$(MAKE) -C $(notdir $@) install
741744
mkdir -p $(dir $@) && touch $@
742745

743-
stamps/build-newlib-nano: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-stage1
744-
rm -rf $@ $(notdir $@)
745-
mkdir $(notdir $@)
746-
cd $(notdir $@) && $</configure \
746+
stamps/configure-newlib-nano: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-stage1
747+
rm -rf $@ stamps/build-newlib-nano build-newlib-nano
748+
mkdir build-newlib-nano
749+
cd build-newlib-nano && $</configure \
747750
--target=$(NEWLIB_TUPLE) \
748751
$(CONFIGURE_HOST) \
749752
--prefix=$(builddir)/install-newlib-nano \
@@ -761,6 +764,9 @@ stamps/build-newlib-nano: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-ne
761764
CFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections $(CFLAGS_FOR_TARGET)" \
762765
CXXFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections $(CXXFLAGS_FOR_TARGET)" \
763766
$(NEWLIB_TARGET_FLAGS)
767+
mkdir -p $(dir $@) && touch $@
768+
769+
stamps/build-newlib-nano: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/configure-newlib-nano
764770
$(MAKE) -C $(notdir $@)
765771
$(MAKE) -C $(notdir $@) install
766772
mkdir -p $(dir $@) && touch $@

0 commit comments

Comments
 (0)