define Package/libstdcpp/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(TOOLCHAIN_DIR)/usr/lib/libstdc++.so.* $(1)/usr/lib/
+ $(CP) $(TOOLCHAIN_DIR)/lib/libstdc++.so.* $(1)/usr/lib/
endef
use_libutil=$(if $(CONFIG_USE_GLIBC)$(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),libutil)
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
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
define Package/ldd/install
$(INSTALL_DIR) $(1)/usr/bin/
- $(CP) $(TOOLCHAIN_DIR)/usr/bin/ldd $(1)/usr/bin/
+ $(CP) $(TOOLCHAIN_DIR)/bin/ldd $(1)/usr/bin/
endef
define Package/ldconfig/install
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_PATH:=$(TOOLCHAIN_DIR)/bin:$(TARGET_PATH)
else
ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
TARGET_CROSS:=$(call qstrip,$(CONFIG_TOOLCHAIN_PREFIX))
BINUTILS_CONFIGURE:= \
./configure \
- --prefix=$(TOOLCHAIN_DIR)/usr \
+ --prefix=$(TOOLCHAIN_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
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
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 \
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 \
$(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
GCC_CONFIGURE:= \
SHELL="$(BASH)" \
$(HOST_SOURCE_DIR)/configure \
- --prefix=$(TOOLCHAIN_DIR)/usr \
+ --prefix=$(TOOLCHAIN_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
$(STAGING_DIR_HOST)/stamp/.binutils_* \
$(GCC_BUILD_DIR) \
$(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
endif
define Host/Configure
- mkdir -p $(GCC_BUILD_DIR) $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)
+ mkdir -p $(GCC_BUILD_DIR) $(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 $(GCC_BUILD_DIR) && rm -f config.cache; \
$(GCC_CONFIGURE) \
);
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
$(_SINGLE)$(GCC_MAKE) -C $(GCC_BUILD_DIR) 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 \
GCC_CONFIGURE += \
--with-newlib \
- --with-sysroot=$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev \
+ --with-sysroot=$(TOOLCHAIN_DIR) \
--enable-languages=c \
--disable-shared \
--disable-threads \
$(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; \
)
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) \
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))
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 \
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
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) \
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))
CONFIG_SHELL=$(BASH)
define Host/Prepare/all
- mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr
+ mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev
$(KMAKE) \
- INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/" \
+ INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/" \
headers_install
if [ -d $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \
mkdir -p $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH); \
$(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 \
- $(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
$(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
$(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' \
$(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)" \
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)" \
$(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 \
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 \