Skip to content

Commit 94757d9

Browse files
zqb-allcmuellner
authored andcommitted
musl: support build gdb
1 parent 5aec7d7 commit 94757d9

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Makefile.in

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ endif
141141
ifeq (@enable_gdb@,--enable-gdb)
142142
newlib: stamps/build-gdb-newlib
143143
linux: stamps/build-gdb-linux
144+
musl: stamps/build-gdb-musl
144145
endif
145146
linux-native: stamps/build-gcc-linux-native
146147
ifeq (@enable_llvm@,--enable-llvm)
@@ -794,6 +795,30 @@ stamps/build-binutils-musl: $(BINUTILS_SRCDIR) $(BINUTILS_SRC_GIT) $(PREPARATION
794795
$(MAKE) -C $(notdir $@) install
795796
mkdir -p $(dir $@) && touch $@
796797

798+
stamps/build-gdb-musl: $(GDB_SRCDIR) $(GDB_SRC_GIT) $(PREPARATION_STAMP)
799+
rm -rf $@ $(notdir $@)
800+
mkdir $(notdir $@)
801+
# CC_FOR_TARGET is required for the ld testsuite.
802+
cd $(notdir $@) && CC_FOR_TARGET=$(MUSL_CC_FOR_TARGET) $</configure \
803+
--target=$(MUSL_TUPLE) \
804+
$(CONFIGURE_HOST) \
805+
--prefix=$(INSTALL_DIR) \
806+
--with-sysroot=$(SYSROOT) \
807+
$(MULTILIB_FLAGS) \
808+
@with_guile@ \
809+
--disable-werror \
810+
--disable-nls \
811+
$(GDB_TARGET_FLAGS) \
812+
--enable-gdb \
813+
--disable-gas \
814+
--disable-binutils \
815+
--disable-ld \
816+
--disable-gold \
817+
--disable-gprof
818+
$(MAKE) -C $(notdir $@)
819+
$(MAKE) -C $(notdir $@) install
820+
mkdir -p $(dir $@) && touch $@
821+
797822
stamps/build-gcc-musl-stage1: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-binutils-musl \
798823
stamps/build-linux-headers
799824
if test -f $</contrib/download_prerequisites && test "@NEED_GCC_EXTERNAL_LIBRARIES@" = "true"; then cd $< && ./contrib/download_prerequisites; fi

0 commit comments

Comments
 (0)