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

Bug#572369: hw-detect: add cross compiling support

Package: hw-detect
Version: 1.76
Severity: wishlist
Tags: patch


Could you consider applying this patch for enable cross compiling support on this package?

I would also like to comment that the following patch is against Makefile (respecting current packaging), but all this mangling I believe it should be done under debian/rules.

diff -urN hw-detect-1.76/Makefile hw-detect-1.76.cross//Makefile
--- hw-detect-1.76/Makefile	2009-12-24 03:16:27.000000000 +0100
+++ hw-detect-1.76.cross//Makefile	2010-03-03 20:08:23.000000000 +0100
@@ -1,5 +1,8 @@
+# XXX I really believe this should go under debian/rules, not here.
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
+DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 # Take account of old dpkg-architecture output.
 ifeq ($(DEB_HOST_ARCH_OS),)
@@ -10,6 +13,9 @@
 CC = gcc
+export CC=$(DEB_HOST_GNU_TYPE)-gcc
 CFLAGS = -W -Wall -Os -g

Kind regards

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (600, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-2-686 (SMP w/2 CPU cores)
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Reply to: