aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/binutils
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2009-01-08 01:49:11 +0000
committerNicolas Thill <nico@openwrt.org>2009-01-08 01:49:11 +0000
commit3b75e47f8f0d1db7575f0824f7a2469e2e8af7cf (patch)
treee9676ee4d01368996c17caf45fd31f861e3686af /toolchain/binutils
parentec57cd80ccfc739b1d9856e7f2191d12ef568aeb (diff)
downloadupstream-3b75e47f8f0d1db7575f0824f7a2469e2e8af7cf.tar.gz
upstream-3b75e47f8f0d1db7575f0824f7a2469e2e8af7cf.tar.bz2
upstream-3b75e47f8f0d1db7575f0824f7a2469e2e8af7cf.zip
[massive] add support for alternative C libraries (currently only glibc/eglibc)
other (related) changes: - kernel headers are now installed using "make headers_install" on 2.6 - target names now contain an openwrt "vendor" tag (e.g. mips-openwrt-linux-gnu) - build directory names now contain gcc/libc name/version - default cpu for x86 is now i486 (required to build glibc/eglibc) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13931 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain/binutils')
-rw-r--r--toolchain/binutils/Makefile20
1 files changed, 17 insertions, 3 deletions
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 3a4e7e8e4a..db3ea75d44 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -23,20 +23,28 @@ PATCH_DIR:=./patches/$(PKG_VERSION)
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
+
override CONFIG_AUTOREBUILD=
include $(INCLUDE_DIR)/host-build.mk
-EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
+EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX))
-define Build/Configure
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
$(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/
+endef
+
+define Build/Configure
(cd $(PKG_BUILD_DIR); \
./configure \
- --prefix=$(STAGING_DIR_HOST) \
+ --prefix=$(TOOLCHAIN_DIR)/usr \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
+ --with-sysroot=$(TOOLCHAIN_DIR) \
+ --disable-multilib \
--disable-werror \
--disable-nls \
$(EXTRA_TARGET) \
@@ -53,4 +61,10 @@ define Build/Install
$(MAKE) -C $(PKG_BUILD_DIR) install
endef
+define Build/Clean
+ rm -rf \
+ $(PKG_BUILD_DIR) \
+ $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
+endef
+
$(eval $(call HostBuild))