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

Re: Cross-Compiled Hurd Upload Difficulties



>>>>> Brent Fulgham writes:

 BF> I am having trouble getting the architecture fields in the
 BF> changes/control files to properly resolve to "hurd-i386".  I have
 BF> tried using several combinations of parameters -VArch=hurd-i386,
 BF> -DArch=hurd-i386, etc.  Can someone tell me the proper
 BF> combination?

Use `dpkg-buildpackage -ahurd-i386', making sure that you're using
Marcus's dpkg-architecture patches.  (Look in the BTS under bugs filed
against `dpkg' for the relevant patch.)

With those patches in place, it all just works for me.  If you need to
conditionalize the rules file, you can do that based on the
DEB_{BUILD,HOST}_{ARCH,GNU_TYPE} environment variables that are set by
dpkg-architecture.

Here's a typical preamble to make a rules file understand
cross-compiling:

DEB_BUILD_ARCH := $(shell dpkg --print-architecture)
DEB_BUILD_GNU_TYPE := $(shell ./config.guess)
ifndef DEB_HOST_ARCH
  DEB_HOST_ARCH := ${DEB_BUILD_ARCH}
endif
DEB_HOST_GNU_CPU := $(patsubst hurd-%,%,$(DEB_HOST_ARCH))
ifeq ($(filter-out hurd-%,${DEB_HOST_ARCH}),)
  DEB_HOST_GNU_SYSTEM := gnu
else
  DEB_HOST_GNU_SYSTEM := linux
endif
DEB_HOST_GNU_TYPE := ${DEB_HOST_GNU_CPU}-${DEB_HOST_GNU_SYSTEM}

I hope this helps,

-- 
 Gordon Matzigkeit <gord@fig.org>  //\ I'm a FIG (http://www.fig.org/)
Committed to freedom and diversity \// I use GNU (http://www.gnu.org/)


Reply to: