Skip to content

Commit 8b8bee2

Browse files
committed
Revert "Add -O0 -g to host GCC and Binutils and add extra build step for Newlib"
This reverts commit a64859e.
1 parent a64859e commit 8b8bee2

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

Makefile.in

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,7 @@ stamps/build-binutils-newlib: $(BINUTILS_SRCDIR) $(BINUTILS_SRC_GIT) $(PREPARATI
661661
--disable-sim \
662662
--disable-libdecnumber \
663663
--disable-readline \
664-
$(WITH_ISA_SPEC) \
665-
CFLAGS="-O0 -g" \
666-
CXXFLAGS="-O0 -g"
664+
$(WITH_ISA_SPEC)
667665
$(MAKE) -C $(notdir $@)
668666
$(MAKE) -C $(notdir $@) install
669667
mkdir -p $(dir $@) && touch $@
@@ -684,9 +682,7 @@ stamps/build-gdb-newlib: $(GDB_SRCDIR) $(GDB_SRC_GIT) $(PREPARATION_STAMP)
684682
--disable-binutils \
685683
--disable-ld \
686684
--disable-gold \
687-
--disable-gprof \
688-
CFLAGS="-O0 -g" \
689-
CXXFLAGS="-O0 -g"
685+
--disable-gprof
690686
$(MAKE) -C $(notdir $@)
691687
$(MAKE) -C $(notdir $@) install
692688
mkdir -p $(dir $@) && touch $@
@@ -720,18 +716,16 @@ stamps/build-gcc-newlib-stage1: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-binuti
720716
$(WITH_TUNE) \
721717
$(WITH_ISA_SPEC) \
722718
$(GCC_EXTRA_CONFIGURE_FLAGS) \
723-
CFLAGS="-O0 -g" \
724-
CXXFLAGS="-O0 -g" \
725719
CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" \
726720
CXXFLAGS_FOR_TARGET="-Os $(CXXFLAGS_FOR_TARGET)"
727721
$(MAKE) -C $(notdir $@) all-gcc
728722
$(MAKE) -C $(notdir $@) install-gcc
729723
mkdir -p $(dir $@) && touch $@
730724

731-
stamps/configure-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-stage1
732-
rm -rf $@ stamps/build-newlib build-newlib
733-
mkdir build-newlib
734-
cd build-newlib && $</configure \
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 \
735729
--target=$(NEWLIB_TUPLE) \
736730
$(CONFIGURE_HOST) \
737731
--prefix=$(INSTALL_DIR) \
@@ -742,17 +736,14 @@ stamps/configure-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-new
742736
CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -ffunction-sections -fdata-sections $(CFLAGS_FOR_TARGET)" \
743737
CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -ffunction-sections -fdata-sections $(CXXFLAGS_FOR_TARGET)" \
744738
$(NEWLIB_TARGET_FLAGS)
745-
mkdir -p $(dir $@) && touch $@
746-
747-
stamps/build-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/configure-newlib
748739
$(MAKE) -C $(notdir $@)
749740
$(MAKE) -C $(notdir $@) install
750741
mkdir -p $(dir $@) && touch $@
751742

752-
stamps/configure-newlib-nano: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-stage1
753-
rm -rf $@ stamps/build-newlib-nano build-newlib-nano
754-
mkdir build-newlib-nano
755-
cd build-newlib-nano && $</configure \
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 \
756747
--target=$(NEWLIB_TUPLE) \
757748
$(CONFIGURE_HOST) \
758749
--prefix=$(builddir)/install-newlib-nano \
@@ -770,9 +761,6 @@ stamps/configure-newlib-nano: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gc
770761
CFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections $(CFLAGS_FOR_TARGET)" \
771762
CXXFLAGS_FOR_TARGET="-Os -ffunction-sections -fdata-sections $(CXXFLAGS_FOR_TARGET)" \
772763
$(NEWLIB_TARGET_FLAGS)
773-
mkdir -p $(dir $@) && touch $@
774-
775-
stamps/build-newlib-nano: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/configure-newlib-nano
776764
$(MAKE) -C $(notdir $@)
777765
$(MAKE) -C $(notdir $@) install
778766
mkdir -p $(dir $@) && touch $@
@@ -836,8 +824,6 @@ stamps/build-gcc-newlib-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-newlib
836824
$(WITH_TUNE) \
837825
$(WITH_ISA_SPEC) \
838826
$(GCC_EXTRA_CONFIGURE_FLAGS) \
839-
CFLAGS="-O0 -g" \
840-
CXXFLAGS="-O0 -g" \
841827
CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" \
842828
CXXFLAGS_FOR_TARGET="-Os $(CXXFLAGS_FOR_TARGET)"
843829
$(MAKE) -C $(notdir $@)

0 commit comments

Comments
 (0)