target-gcc: remove useless copies of gcc
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 27 Jul 2010 16:21:44 +0000 (18:21 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 27 Jul 2010 16:23:32 +0000 (18:23 +0200)
When doing the "make install" of target, three identical copies of gcc
are installed in $(TARGET_DIR)/usr/bin:

  039adcc582c365f12ba6fc5f96098128  arm-unknown-linux-uclibcgnueabi-gcc
  039adcc582c365f12ba6fc5f96098128  arm-unknown-linux-uclibcgnueabi-gcc-4.3.5
  039adcc582c365f12ba6fc5f96098128  gcc

This patch removes the first two copies and keeps only the common "gcc" one.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
toolchain/gcc/gcc-uclibc-4.x.mk

index 5dec86c87e7ad195d52989096d1c801b5d7bca55..9720ed39b4bcf0be3d298a56de077d48f4c3cf08 100644 (file)
@@ -445,6 +445,9 @@ $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
        # Remove broken specs file (cross compile flag is set).
        rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs
 
+       # Remove useless copies of gcc
+       rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc*
+
        # Work around problem of missing syslimits.h
        if [ ! -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/$(GCC_INCLUDE_DIR)/syslimits.h ]; then \
                echo "warning: working around missing syslimits.h"; \