[backfire] toolchain: relocate gcc, binutils and tools from /usr/ prefix to / - fixes...
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 28 Jan 2012 04:46:41 +0000 (04:46 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 28 Jan 2012 04:46:41 +0000 (04:46 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@29933 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/Makefile
rules.mk
toolchain/binutils/Makefile
toolchain/eglibc/Makefile
toolchain/gcc/Makefile
toolchain/gdb/Makefile
toolchain/glibc/Makefile
toolchain/insight/Makefile
toolchain/kernel-headers/Makefile
toolchain/uClibc/Makefile

index 60ca5a20ba59fad635361f3a4518d1bf2c49371a..7a8f0271921d39d4666c83eb8b049575e9ebf964 100644 (file)
@@ -409,8 +409,8 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
   endef
 
   define Package/libstdcpp/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(TOOLCHAIN_DIR)/usr/lib/libstdc++.so.* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/lib
+       $(CP) $(TOOLCHAIN_DIR)/lib/libstdc++.so.* $(1)/lib/
   endef
 
   use_libutil=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),libutil)
@@ -454,11 +454,11 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
   endef
 
   define Package/libc/install_lib
-       $(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/usr/lib/lib*.a)) $(1)/lib/
-       $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/usr/lib/libc_so.a $(1)/lib/libc_pic.a)
-       $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.map), \
-               $(CP) $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc_pic.a $(1)/lib/libgcc_s_pic.a; \
-               $(CP) $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.map $(1)/lib/libgcc_s_pic.map \
+       $(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/lib/lib*.a)) $(1)/lib/
+       $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libc_so.a $(1)/lib/libc_pic.a)
+       $(if $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.map), \
+               $(CP) $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc_pic.a $(1)/lib/libgcc_s_pic.a; \
+               $(CP) $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.map $(1)/lib/libgcc_s_pic.map \
        )
   endef
 
@@ -469,7 +469,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
   endef
 
   define Package/libpthread/install_lib
-       $(if $(wildcard $(TOOLCHAIN_DIR)/usr/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/usr/lib/libpthread_so.a $(1)/lib/libpthread_pic.a)
+       $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libpthread_so.a $(1)/lib/libpthread_pic.a)
   endef
 
   define Package/librt/install
@@ -479,8 +479,8 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
   endef
 
   define Package/ldd/install
-       $(INSTALL_DIR) $(1)/usr/bin/
-       $(CP) $(TOOLCHAIN_DIR)/usr/bin/ldd $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/bin/
+       $(CP) $(TOOLCHAIN_DIR)/bin/ldd $(1)/bin/
   endef
 
   define Package/ldconfig/install
index 49c57d23a5734fe00312cf60e45b4ecd721765a8..aeb548c2b16b17725da6a974e60296f88472dc7c 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -111,7 +111,7 @@ TARGET_PATH:=$(STAGING_DIR_HOST)/bin:$(PATH)
 TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3)
 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
 TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
-LIBGCC_A=$(wildcard $(TOOLCHAIN_DIR)/usr/lib/gcc/*/*/libgcc.a)
+LIBGCC_A=$(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.a)
 LIBGCC_S=$(if $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so),-L$(TOOLCHAIN_DIR)/lib -lgcc_s,$(LIBGCC_A))
 
 ifndef DUMP
@@ -119,9 +119,9 @@ ifndef DUMP
     -include $(TOOLCHAIN_DIR)/info.mk
     TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-openwrt-linux$(if $(TARGET_SUFFIX),-$(TARGET_SUFFIX))-)
     TARGET_CFLAGS+= -fhonour-copts
-    TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/usr/include -I$(TOOLCHAIN_DIR)/include
-    TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib
-    TARGET_PATH:=$(TOOLCHAIN_DIR)/usr/bin:$(TARGET_PATH)
+    TARGET_CPPFLAGS+= -I$(TOOLCHAIN_DIR)/include
+    TARGET_LDFLAGS+= -L$(TOOLCHAIN_DIR)/lib
+    TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
   else
     ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
       TARGET_CROSS:=$(call qstrip,$(CONFIG_TOOLCHAIN_PREFIX))
index 94c1d1edab686f10f8920a64d6311fa3d1a695fe..2b1e3620feeaf24fe2983eba40adcce47abbcdd5 100644 (file)
@@ -31,7 +31,7 @@ include $(INCLUDE_DIR)/toolchain-build.mk
 
 BINUTILS_CONFIGURE:= \
        ./configure \
-               --prefix=$(TOOLCHAIN_DIR)/usr \
+               --prefix=$(TOOLCHAIN_DIR) \
                --build=$(GNU_HOST_NAME) \
                --host=$(GNU_HOST_NAME) \
                --target=$(REAL_GNU_TARGET_NAME) \
@@ -77,7 +77,7 @@ endef
 
 define Host/Install
        $(MAKE) -C $(HOST_BUILD_DIR) install
-       $(CP) $(TOOLCHAIN_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-readelf $(REAL_STAGING_DIR_HOST)/bin/readelf
+       $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(REAL_STAGING_DIR_HOST)/bin/readelf
 endef
 
 define Host/Clean
index 822309d0588d80021a32b090c32b0d29fb7904b9..4cc22200b2806412201bc16bca3cb6897c179fb5 100644 (file)
@@ -59,10 +59,10 @@ EGLIBC_CONFIGURE:= \
        CFLAGS="$(EGLIBC_CFLAGS)" \
        libc_cv_slibdir="/lib" \
        $(HOST_BUILD_DIR)/libc/configure \
-               --prefix=/usr \
+               --prefix= \
                --build=$(GNU_HOST_NAME) \
                --host=$(REAL_GNU_TARGET_NAME) \
-               --with-headers=$(TOOLCHAIN_DIR)/usr/include \
+               --with-headers=$(TOOLCHAIN_DIR)/include \
                --disable-profile \
                --without-gd \
                --without-cvs \
@@ -99,7 +99,7 @@ define Stage1/Compile
 endef
 
 define Stage1/Install
-       mkdir -p $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/{include,lib}
+       mkdir -p $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/{include,lib}
        $(EGLIBC_MAKE) -C $(HOST_BUILD_DIR1) \
                install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \
                install-bootstrap-headers=yes \
@@ -107,10 +107,10 @@ define Stage1/Install
        $(EGLIBC_MAKE) -C $(HOST_BUILD_DIR1) \
                csu/subdir_lib
        ( cd $(HOST_BUILD_DIR1); \
-               $(CP) csu/crt1.o csu/crti.o csu/crtn.o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/lib/ \
+               $(CP) csu/crt1.o csu/crti.o csu/crtn.o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/ \
        )
        $(TARGET_CC) -nostdlib -nostartfiles -shared -x c /dev/null \
-               -o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/lib/libc.so
+               -o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/libc.so
 endef
 
 define Stage2/Configure
index 315a55d047fbb9294d55b5e6bd89fbd148d13a17..ba0feb71397f636401b33246464225b18aa244ad 100644 (file)
@@ -71,7 +71,7 @@ export libgcc_cv_fixed_point=no
 GCC_CONFIGURE:= \
        SHELL="$(BASH)" \
        $(HOST_BUILD_DIR)/configure \
-               --prefix=$(TOOLCHAIN_DIR)/usr \
+               --prefix=$(TOOLCHAIN_DIR) \
                --build=$(GNU_HOST_NAME) \
                --host=$(GNU_HOST_NAME) \
                --target=$(REAL_GNU_TARGET_NAME) \
@@ -201,7 +201,7 @@ define Stage1/Install
                $(if $(GCC_BUILD_TARGET_LIBGCC),install-target-libgcc)
        
        # XXX: glibc insists on linking against libgcc_eh
-       ( cd $(TOOLCHAIN_DIR)/usr/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \
+       ( cd $(TOOLCHAIN_DIR)/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) ; \
                [ -e libgcc_eh.a ] || ln -sf libgcc.a libgcc_eh.a ; \
                cp libgcc.a libgcc_initial.a; \
        )
@@ -209,13 +209,13 @@ endef
 
 
 define Stage2/Configure
-       mkdir -p $(HOST_BUILD_DIR2) $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)
+       mkdir -p $(HOST_BUILD_DIR2) $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)
        # Important!  Required for limits.h to be fixed.
-       rm -rf $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sys-include
-       ln -sf ../include $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sys-include
-       rm -rf $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
-       ln -sf ../lib $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
-       $(if $(CONFIG_mips64)$(CONFIG_mips64el)$(CONFIG_x86_64),ln -sf ../lib64 $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64)
+       rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
+       ln -sf ../include $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
+       rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+       ln -sf ../lib $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+       $(if $(CONFIG_mips64)$(CONFIG_mips64el)$(CONFIG_x86_64),ln -sf ../lib64 $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib64)
        (cd $(HOST_BUILD_DIR2); rm -f config.cache; \
                $(GCC_CONFIGURE_STAGE2) \
        );
@@ -226,15 +226,15 @@ define Stage2/Compile
 endef
 
 define SetupExtraArch
-       for app in $(TOOLCHAIN_DIR)/usr/bin/$(OPTIMIZE_FOR_CPU)*-{gcc,gcc-*,g++}; do \
+       for app in $(TOOLCHAIN_DIR)/bin/$(OPTIMIZE_FOR_CPU)*-{gcc,gcc-*,g++}; do \
                [ -e $$$$app ] || continue; \
                old_base=$$$$(basename $$$$app); \
                new_base=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-$$$${old_base##$(OPTIMIZE_FOR_CPU)-}; \
                sed -e "s/@CC_BASE@/$$$$old_base/" \
                        -e 's/@EXTRA_ARCH_OPTS@/$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_OPTS))/' \
                         ./files/alternate-arch-cc.in > \
-                        $(TOOLCHAIN_DIR)/usr/bin/$$$$new_base; \
-               chmod a+x $(TOOLCHAIN_DIR)/usr/bin/$$$$new_base; \
+                        $(TOOLCHAIN_DIR)/bin/$$$$new_base; \
+               chmod a+x $(TOOLCHAIN_DIR)/bin/$$$$new_base; \
        done
 endef
 
@@ -242,7 +242,7 @@ define Stage2/Install
        $(_SINGLE)$(GCC_MAKE) -C $(HOST_BUILD_DIR2) install
        # Set up the symlinks to enable lying about target name.
        set -e; \
-       (cd $(TOOLCHAIN_DIR)/usr; \
+       (cd $(TOOLCHAIN_DIR); \
                ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
                cd bin; \
                for app in $(REAL_GNU_TARGET_NAME)-* ; do \
@@ -295,9 +295,9 @@ define Host/Clean
                $(HOST_BUILD_DIR1) \
                $(HOST_BUILD_DIR2) \
                $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
-               $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME) \
-               $(TOOLCHAIN_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gc* \
-               $(TOOLCHAIN_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-c*
+               $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME) \
+               $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gc* \
+               $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c*
 endef
 
 $(eval $(call HostBuild))
index df4fe55a4a86091716cede3e93febb65f1d138d5..b3838edeb72b81f97b6090bdc133859022d70daf 100644 (file)
@@ -38,17 +38,17 @@ define Host/Compile
 endef
 
 define Host/Install
-       mkdir -p $(TOOLCHAIN_DIR)/usr/bin
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb
-       ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-gdb
-       strip $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb
+       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
 
 define Host/Clean
        rm -rf \
                $(HOST_BUILD_DIR) \
-               $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb \
-               $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-gdb
+               $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
+               $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
 endef
 
 $(eval $(call HostBuild))
index 5d56d4b98ad3d9de1bb549091933306a6e80bbd2..789ae842d61b6e4b6ff396dd61bf62bdba2eb4ad 100644 (file)
@@ -57,10 +57,10 @@ GLIBC_CONFIGURE:= \
        libc_cv_386_tls=yes \
        libc_cv_slibdir="/lib" \
        $(HOST_BUILD_DIR)/configure \
-               --prefix=/usr \
+               --prefix= \
                --build=$(GNU_HOST_NAME) \
                --host=$(REAL_GNU_TARGET_NAME) \
-               --with-headers="$(TOOLCHAIN_DIR)/usr/include" \
+               --with-headers="$(TOOLCHAIN_DIR)/include" \
                $(if $(CONFIG_mips64)$(CONFIG_mips64el), --enable-kernel="2.6.0") \
                --disable-debug \
                --disable-profile \
@@ -111,11 +111,11 @@ define Stage1/Install
                cross-compiling=yes \
                install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \
                install-headers
-       [ -f $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/include/bits/stdio_lim.h ] || \
+       [ -f $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/include/bits/stdio_lim.h ] || \
                $(CP) $(HOST_BUILD_DIR1)/bits/stdio_lim.h \
-                       $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/include/bits/stdio_lim.h
-       [ -f $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/include/gnu/stubs.h ] || \
-               touch $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/include/gnu/stubs.h
+                       $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/include/bits/stdio_lim.h
+       [ -f $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/include/gnu/stubs.h ] || \
+               touch $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/include/gnu/stubs.h
 endef
 
 define Stage2/Configure
index e53635b274f4c912e466200438d3d644a587ca4e..b71e0fd96fdc3184202ab6f5d6e97ed06527d1f6 100644 (file)
@@ -24,7 +24,7 @@ define Host/Configure
                gdb_cv_func_sigsetjmp=yes \
                CFLAGS="-O2" \
                $(HOST_BUILD_DIR)/configure \
-               --prefix=$(TOOLCHAIN_DIR)/usr \
+               --prefix=$(TOOLCHAIN_DIR) \
                --build=$(GNU_HOST_NAME) \
                --host=$(GNU_HOST_NAME) \
                --target=$(REAL_GNU_TARGET_NAME) \
@@ -39,17 +39,17 @@ define Host/Compile
 endef
 
 define Host/Install
-       mkdir -p $(TOOLCHAIN_DIR)/usr/bin
-       $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/insight $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)insight
-       ln -fs $(TARGET_CROSS)insight $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-insight
-       strip $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)insight
+       mkdir -p $(TOOLCHAIN_DIR)/bin
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/insight $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)insight
+       ln -fs $(TARGET_CROSS)insight $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-insight
+       strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)insight
 endef
 
 define Host/Clean
        rm -rf \
                $(HOST_BUILD_DIR) \
-               $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)insight \
-               $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-insight
+               $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)insight \
+               $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-insight
 endef
 
 $(eval $(call HostBuild))
index 394e1d109b06ebaf0ba0ccae6fdc9ea21e8cbdde..8a280bd2303b7a9278fa22ee136bb36b62197588 100644 (file)
@@ -56,19 +56,19 @@ endef
 
 ifneq ($(LINUX_HAS_HEADERS_INSTALL),)
   define Host/Prepare/all
-       mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr
+       mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev
        $(KMAKE) \
                CROSS_COMPILE=$(TARGET_CROSS) \
-               INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/" \
+               INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/" \
                headers_install
   endef
 else
   define Host/Prepare/all
-       mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include
-       cp -pLR $(HOST_BUILD_DIR)/include/asm $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
-       cp -pLR $(HOST_BUILD_DIR)/include/asm-generic $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
-       cp -pLR $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH) $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
-       cp -pLR $(HOST_BUILD_DIR)/include/linux $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
+       mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/include
+       cp -pLR $(HOST_BUILD_DIR)/include/asm $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/
+       cp -pLR $(HOST_BUILD_DIR)/include/asm-generic $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/
+       cp -pLR $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH) $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/
+       cp -pLR $(HOST_BUILD_DIR)/include/linux $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/
   endef
 endif
 
@@ -77,17 +77,17 @@ define Host/Prepare/lzma
        $(CP) \
                $(HOST_BUILD_DIR)/include/asm-mips/asm.h \
                $(HOST_BUILD_DIR)/include/asm-mips/regdef.h \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/
+               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/
 endef
 
 define Host/Prepare/post/cris
        $(CP) \
                $(HOST_BUILD_DIR)/include/linux/user.h \
                $(HOST_BUILD_DIR)/include/linux/autoconf.h \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/linux/
-       ln -snf $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/arch-v10/arch \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/arch
-       $(SED) '/#include <asm\/page\.h>/d' $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/user.h
+               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/linux/
+       ln -snf $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/arch-v10/arch \
+               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/arch
+       $(SED) '/#include <asm\/page\.h>/d' $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/user.h
 endef
 
 define Host/Prepare/post/ubicom32
@@ -96,7 +96,7 @@ define Host/Prepare/post/ubicom32
                $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/user.h \
                $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/page.h \
                $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/page_offset.h \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/
+               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/
 endef
 
 define Host/Prepare/post/mips
index deee154bb8756f42b7b0e03c06d845642426ab79..16d1ed847c18e84af46f4d444a5babbbfce79dcc 100644 (file)
@@ -62,7 +62,7 @@ define Host/Prepare
        $(call Host/Prepare/Default)
        ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
        $(GEN_CONFIG) > $(HOST_BUILD_DIR)/.config
-       $(SED) 's,^KERNEL_HEADERS=.*,KERNEL_HEADERS=\"$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include\",g' \
+       $(SED) 's,^KERNEL_HEADERS=.*,KERNEL_HEADERS=\"$(BUILD_DIR_TOOLCHAIN)/linux-dev/include\",g' \
                -e 's,^.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=$(if $(CONFIG_SOFT_FLOAT),n,y),g' \
                -e 's,^.*UCLIBC_HAS_SOFT_FLOAT.*,UCLIBC_HAS_SOFT_FLOAT=$(if $(CONFIG_SOFT_FLOAT),y,n),g' \
                -e 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=$(if $(CONFIG_LARGEFILE),y,n),g' \
@@ -74,7 +74,7 @@ define Host/Prepare
        $(MAKE) -C $(HOST_BUILD_DIR)/extra/config conf KBUILD_HAVE_NLS= HOSTCFLAGS="-DKBUILD_NO_NLS"
        PATH='$(TARGET_PATH)' $(MAKE) -C $(HOST_BUILD_DIR) \
                PREFIX="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/" \
-               DEVEL_PREFIX=/usr/ \
+               DEVEL_PREFIX=/ \
                RUNTIME_PREFIX="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/" \
                HOSTCC="$(HOSTCC)" \
                CC="$(TARGET_CC)" \
@@ -89,7 +89,7 @@ endef
 
 UCLIBC_MAKE = PATH='$(TARGET_PATH)' $(MAKE) -C $(HOST_BUILD_DIR) \
        $(TARGET_CONFIGURE_OPTS) \
-       DEVEL_PREFIX=/usr/ \
+       DEVEL_PREFIX=/ \
        RUNTIME_PREFIX=/ \
        HOSTCC="$(HOSTCC)" \
        CPU_CFLAGS="$(TARGET_CFLAGS)" \
@@ -101,9 +101,8 @@ define Host/Compile
        $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak
        $(UCLIBC_MAKE) PREFIX= all
        $(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev
-       ln -sf ../../lib/libc.so.0 $(TOOLCHAIN_DIR)/usr/lib/libc.so
-       $(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/usr/lib/
-       $(CP) $(HOST_BUILD_DIR)/libpthread/*/libpthread_so.a $(TOOLCHAIN_DIR)/usr/lib/
+       $(CP) $(HOST_BUILD_DIR)/libc/libc_so.a $(TOOLCHAIN_DIR)/lib/
+       $(CP) $(HOST_BUILD_DIR)/libpthread/*/libpthread_so.a $(TOOLCHAIN_DIR)/lib/
        ( cd $(TOOLCHAIN_DIR) ; \
                for d in lib usr/lib ; do \
                  for f in libc.so libpthread.so libgcc_s.so ; do \
@@ -118,10 +117,9 @@ endef
 define Host/Install
        $(UCLIBC_MAKE) PREFIX= utils
        $(INSTALL_DIR) $(TOOLCHAIN_DIR)/bin
-       $(INSTALL_DIR) $(TOOLCHAIN_DIR)/usr/bin
        $(INSTALL_BIN) \
                $(HOST_BUILD_DIR)/utils/ldd \
-               $(TOOLCHAIN_DIR)/usr/bin/
+               $(TOOLCHAIN_DIR)/bin/
        $(INSTALL_DIR) $(TOOLCHAIN_DIR)/sbin
        $(INSTALL_BIN) \
                $(HOST_BUILD_DIR)/utils/ldconfig \