From 85d7da645c4250c00c8f6a9066c37b5802d5fde0 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 28 Jan 2012 04:46:41 +0000 Subject: [PATCH] toolchain: relocate gcc, binutils and tools from /usr/ prefix to / - fixes implicit search path of libc SVN-Revision: 29933 --- package/base-files/Makefile | 20 ++++++++++---------- rules.mk | 8 ++++---- toolchain/binutils/Makefile | 4 ++-- toolchain/eglibc/Makefile | 10 +++++----- toolchain/gcc/Makefile | 30 +++++++++++++++--------------- toolchain/gdb/Makefile | 12 ++++++------ toolchain/glibc/Makefile | 12 ++++++------ toolchain/insight/Makefile | 14 +++++++------- toolchain/kernel-headers/Makefile | 26 +++++++++++++------------- toolchain/uClibc/Makefile | 14 ++++++-------- 10 files changed, 74 insertions(+), 76 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 60ca5a20ba..7a8f027192 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -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 diff --git a/rules.mk b/rules.mk index 49c57d23a5..aeb548c2b1 100644 --- 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)) diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 94c1d1edab..2b1e3620fe 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -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 diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile index 822309d058..4cc22200b2 100644 --- a/toolchain/eglibc/Makefile +++ b/toolchain/eglibc/Makefile @@ -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 diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 315a55d047..ba0feb7139 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -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)) diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index df4fe55a4a..b3838edeb7 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -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)) diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index 5d56d4b98a..789ae842d6 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -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 diff --git a/toolchain/insight/Makefile b/toolchain/insight/Makefile index e53635b274..b71e0fd96f 100644 --- a/toolchain/insight/Makefile +++ b/toolchain/insight/Makefile @@ -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)) diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile index 394e1d109b..8a280bd230 100644 --- a/toolchain/kernel-headers/Makefile +++ b/toolchain/kernel-headers/Makefile @@ -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 /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 /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 diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile index deee154bb8..16d1ed847c 100644 --- a/toolchain/uClibc/Makefile +++ b/toolchain/uClibc/Makefile @@ -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 \ -- 2.30.2