#18883: $(TARGET_CROSS)gdb install fail when compile openwrt with EXT toolchain.
-----------------------+-----------------------------------
 Reporter:  polejoe@…  |      Owner:  developers
     Type:  defect     |     Status:  new
 Priority:  normal     |  Milestone:  Barrier Breaker 14.07
Component:  toolchain  |    Version:  Barrier Breaker 14.07
 Keywords:  toolchain  |
-----------------------+-----------------------------------
 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

--
Ticket URL: <https://dev.openwrt.org/ticket/18883>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to