[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#465290: busybox: long term mass bug filing for cross build support



Package: busybox
Version: 1:1.1.3-5
Severity: wishlist
Tags: patch
User: codehelp@debian.org
Usertags: crossbuilt

In line with the other cross-building support bugs:
http://lists.debian.org/debian-devel/2007/11/msg00116.html

This patch is necessary to allow busybox to cross-build in Debian,
following the recommendation in autotools-dev.


*** ../crossbuild.diff
--- busybox-1.1.3.debian/debian/rules 
+++ busybox-1.1.3.emdebian/debian/rules 
@@ -6,6 +6,15 @@
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+CC=$(DEB_HOST_GNU_TYPE)-gcc
+MAKE += -e
+else
+CC=gcc
+endif
 
 VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
 EXTRA_VERSION = Debian $(VERSION)
@@ -45,8 +54,8 @@
 	@rm -rf $(DIR)
 	mkdir $(DIR)
 	cp '$(CONFIG)' $(DIR)/.config
-	$(MAKE) O=$(CURDIR)/$(DIR) oldconfig
-	$(MAKE) -C $(CURDIR)/$(DIR)
+	CC=$(CC) $(MAKE) O=$(CURDIR)/$(DIR) oldconfig
+	CC=$(CC) $(MAKE) -C $(CURDIR)/$(DIR)
 	cp $(DIR)/docs/BusyBox.1 $(DIR)/docs/busybox.1
 	touch $@
 


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages busybox depends on:
ii  libc6                         2.7-6      GNU C Library: Shared libraries

busybox recommends no packages.

-- no debconf information

Attachment: signature.asc
Description: Digital signature


Reply to: