On Sun, Feb 20, 2011 at 08:10:06PM -0600, Jonathan Nieder wrote: > That leaves two remaining questions: > - can each Debian arch have a distinct toolchain? If not, why not > (since it would be very convenient to use)? By virtue of the fact that each architecture will have its own copy of gcc in the archive, as an Architecture: any package with different defaults built in, each architecture does have a distinct toolchain. The problem really only arises when you want to use a cross-compiler for the architecture; dpkg-architecture only gives packages the DEB_HOST_GNU_TYPE information to work with, which is no longer sufficient to ensure packages are being correctly built for the stated target arch. I.e., you can invoke the compiler as arm-linux-gnueabi-gcc, but you don't know if that's going to output binaries for armel or for armhf. > >> ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) > >> confflags += --build $(DEB_HOST_GNU_TYPE) > >> else > >> confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) > >> endif > [...] > > Yes, this is potentially a pain in the bum. We need to select a > > toolchain (which could be 'arm-linux-gnueabi' for both arm port > > targets, but with different default options > - how do we communicate distinct compiler flags for the build and host > machines to packages, with a minimum of disruption to existing > packaging? Maybe dpkg-buildflags needs to distinguish between > --build and --host flags, so that dh_auto_configure et al can pass > HOST_CFLAGS to configure. I think it will be disruptive any which way you cut it, if the goal is to have dpkg provide this information. If we instead make it the problem of the cross-compiling developer to ensure their toolchain has the right defaults for their target architecture, we don't need to worry about package disruption at all... we just have to worry about people using the wrong toolchain settings for their architecture. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slangasek@ubuntu.com vorlon@debian.org
Attachment:
signature.asc
Description: Digital signature