Bug#665997: closed by Guillem Jover <guillem@debian.org> (Bug#665997: fixed in libbsd 0.4.0-1)
reopen 665997
found 665997 libbsd/0.4.0-1
thanks
On Tue, May 29, 2012 at 07:06:30AM +0000, Debian Bug Tracking System wrote:
> This is an automatic notification regarding your Bug report
> which was filed against the src:libbsd package:
>
> #665997: libbsd uses wrong compiler when cross-building
>
> It has been closed by Guillem Jover <guillem@debian.org>.
[...]
> - Autoconfiscated, supports cross-building natively. (Closes: #665997)
This is nearly there, but not quite. You're not passing the required
--build and --host options to configure, so it doesn't know that it's
supposed to cross-compile. I've confirmed that the following patch
fixes it.
* Pass correct --build= and --host= options to configure.
diff -Nru libbsd-0.4.2/debian/rules libbsd-0.4.2/debian/rules
--- libbsd-0.4.2/debian/rules 2012-06-27 08:22:33.000000000 +0100
+++ libbsd-0.4.2/debian/rules 2012-11-22 02:06:32.000000000 +0000
@@ -9,6 +9,14 @@
CFLAGS := -Wall $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
+confflags := --build=$(DEB_BUILD_GNU_TYPE)
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+confflags += --host=$(DEB_HOST_GNU_TYPE)
+endif
+
lib := libbsd0
libdbg := $(lib)-dbg
@@ -24,7 +32,8 @@
LDFLAGS="$(LDFLAGS)" \
--disable-silent-rules \
--prefix=/usr \
- --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
+ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
+ $(confflags)
build-indep:
Thanks,
--
Colin Watson [cjwatson@ubuntu.com]
Reply to: