+++ Chris Jones [2013-05-09 09:50 +0100]:
> On 09/05/2013 09:41, Neil Williams wrote:
> >>I'm trying to cross-build a Debian package - ppp, as it happens. I can do
> >
> >Not all Debian packages have cross-build support built-in. Some, like
> >ppp, do not understand how to use a cross-compiler and assert the use
> >of cc despite attempts to get it to cross build. The package would need
> >modification to cross build.
And it hasn't been fixed in ubuntu either:
http://people.canonical.com/~cjwatson/cross/armhf/raring/ppp_2.4.5-5.1ubuntu2_armhf-20130206-1041
BUt all the cross-build-deps are available, at least in Ubuntu raring,
probably not in debian yet.
This patch makes it build (but cheats by turing off the udeb build
which broke for me due to a missing
'pppd-udeb/plugins/rp-pppoe/pppoe-discovery')
I assume that's fine from your POV.
diff -ur ppp-2.4.5/debian/rules ppp-2.4.5.fixed/debian/rules
--- ppp-2.4.5/debian/rules 2013-05-09 10:02:08.000000000 +0000
+++ ppp-2.4.5.fixed/debian/rules 2013-05-09 10:35:28.000000000 +0000
@@ -1,9 +1,11 @@
#!/usr/bin/make -f
SHELL+= -e
- BUILD_UDEB := 1
-
+#BUILD_UDEB := 1
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ CROSSCONFIG := --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
+endif
QUILT_STAMPFN := .stamp-patched
include /usr/share/quilt/quilt.make
@@ -29,7 +31,7 @@
configure: .stamp-configure
.stamp-configure: $(QUILT_STAMPFN)
dh_testdir
- ./configure --prefix=/usr
+ ./configure --prefix=/usr $(CROSSCONFIG)
touch $@
udebdir: .stamp-udebdir
@@ -46,21 +48,21 @@
build: .stamp-build
.stamp-build: .stamp-configure
dh_testdir
- $(MAKE)
+ $(MAKE) CC=$(DEB_HOST_GNU_TYPE)-gcc
touch $@
build-udeb: .stamp-build-udeb
.stamp-build-udeb: .stamp-udebdir
dh_testdir
cd pppd-udeb/ && \
- $(MAKE) CFLAGS="$(CFLAGS) -Os -fomit-frame-pointer" \
+ $(MAKE) CC=$(DEB_HOST_GNU_TYPE)-gcc CFLAGS="$(CFLAGS) -Os -fomit-frame-pointer" \
CHAPMS= USE_CRYPT= NO_CRYPT_HACK=1 MPPE= \
FILTER= HAVE_MULTILINK= USE_TDB= \
HAS_SHADOW= USE_PAM= HAVE_INET6= \
CBCP= USE_SRP= MAXOCTETS= USE_BUILTIN_CRYPTO=1 \
&& \
cd plugins/ && \
- $(MAKE) CFLAGS="$(CFLAGS) -Os -fomit-frame-pointer" \
+ $(MAKE) CC=$(DEB_HOST_GNU_TYPE)-gcc CFLAGS="$(CFLAGS) -Os -fomit-frame-pointer" \
SUBDIRS='rp-pppoe pppoatm' PLUGINS=
touch $@
Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/