Modify

Opened 3 years ago

Last modified 3 years ago

#18883 new defect

$(TARGET_CROSS)gdb install fail when compile openwrt with EXT toolchain.

Reported by: polejoe@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: toolchain Version: Barrier Breaker 14.07
Keywords: toolchain Cc: nbd@…

Description

This problem can be found in AA, BB and trunk.

###err log:
ln -fs mips-linux-uclibc-gdb /home/zhoushengyong/openwrt/staging_dir/toolchain-mips-linux-uclibc/bin/mips-linux-uclibc-gdb
strip /home/zhoushengyong/openwrt/staging_dir/toolchain-mips-linux-uclibc/bin/mips-linux-uclibc-gdb
strip: Warning: could not locate '/home/zhoushengyong/openwrt/staging_dir/toolchain-mips-linux-uclibc/bin/mips-linux-uclibc-gdb'. reason: Too many levels of symbolic links
make[3]: * /home/zhoushengyong/openwrt/staging_dir/toolchain-mips-linux-uclibc/stamp/.gdb_installed Error 1
make[3]: Leaving directory `/home/zhoushengyong/openwrt/toolchain/gdb'

###err reason:

In toolchain/gdb/Makefile, $(TARGET_CROSS)gdb install according to the define below.


define Host/Install

mkdir -p $(TOOLCHAIN_DIR)/bin
$(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb

endef


When use a EXT chain, $TARGET_CROSS may equal $GNU_TARGET_NAME.
In that situation, *gdb will be instead by a link point to itself,
which is a illegal para. for strip application!

###propose:

To solve it, the define should be modified to

define Host/Install

mkdir -p $(TOOLCHAIN_DIR)/bin
$(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb

ifneq ($(TARGET_CROSS), $(GNU_TARGET_NAME)-)

ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb

endif

strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb

endef

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by polejoe@…

###propose:

To solve it, the define should be modified to

define Host/Install

mkdir -p $(TOOLCHAIN_DIR)/bin
$(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb

ifneq ($(TARGET_CROSS), $(GNU_TARGET_NAME)-)

ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb

endif

strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb

endef

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.