On Sun, Nov 18, 2007 at 01:17:16AM +0000, Neil Williams wrote: > On Sun, 18 Nov 2007 00:23:59 +0000 > Colin Watson <[EMAIL PROTECTED]> wrote: > > On Sat, Nov 17, 2007 at 09:29:35PM +0000, Neil Williams wrote: > > > Despite any changes made in 3.5.14, passing --build and --host does not > > > cause base-passwd to set $(CC) correctly, instead it insists on using cc > > > which is a symlink to gcc. The build log ends with: > > > > So, I don't have a cross-compiler installed here, but as a test I ran: > > > > $ sudo ln -s gcc /usr/bin/x86_64-linux-gnu-gcc > > $ ./configure --build i486-linux-gnu --host x86_64-linux-gnu > > checking for x86_64-linux-gnu-gcc... x86_64-linux-gnu-gcc > > checking for C compiler default output file name... a.out > > checking whether the C compiler works... yes > > checking whether we are cross compiling... yes > > In 3.5.14, the error was just before this point but 3.5.15 removed the > $(CC) setting and left it all to ./configure which is the best > solution overall.
Glad to know it works now! > dpkg-source: building base-passwd in base-passwd_3.5.14em1.dsc > debian/rules build > CC=cc CFLAGS="-g -O2 -Wall" ./configure --build x86_64-linux-gnu --host > arm-linux-gnu > configure: loading site script /etc/dpkg-cross/cross-config.arm > checking for arm-linux-gnu-gcc... cc > > 3.5.15 changed that to: > > CFLAGS="-g -O2 -Wall" ./configure --build x86_64-linux-gnu --host > arm-linux-gnu > > Hence, the autotools-dev snippet worked fine. What I didn't realise > initially was that you were going to change the CC=cc bit on the same > line as the CFLAGS ... ./configure ... I thought you were just changing > the ifeq () check lines. No, I didn't change anything to do with CC. For your convenience, I've attached the diff from 3.5.14 to 3.5.15; you'll see that CC is mentioned nowhere, and you can see the before-and-after configure invocations in the diff. The setting of CC was only ever in Emdebian (all your demonstrations of bugginess were with your own 3.5.14em1 version, not with plain 3.5.14; I checked it and it does set CC, while my package never did). > > > If base-passwd is going to continue setting $(CC) in advance of running > > > ./configure, > > > > base-passwd does no such thing, unless your changes in 3.5.14em1 do it. > > I did test carefully with 3.5.14 - the process involves a progression > of changes in the cross build tree in trunk/ to get a usable package for > Emdebian, then create a debian build tree in ../branches/ and port > specific changes into a patch that is tested with the Debian build. You might want to check out your processes a little bit, as it looks like there is some confusion about what is in the plain Debian version and what's in Emdebian. I know from Ubuntu experience that it's easy to get confused when one is maintaining a branch. Cheers, -- Colin Watson [EMAIL PROTECTED]
diff -Nru /tmp/XrixkpOvG2/base-passwd-3.5.14/debian/changelog /tmp/4Z5kneATTn/base-passwd-3.5.15/debian/changelog --- /tmp/XrixkpOvG2/base-passwd-3.5.14/debian/changelog 2007-11-12 10:40:26.000000000 +0000 +++ /tmp/4Z5kneATTn/base-passwd-3.5.15/debian/changelog 2007-11-17 20:00:43.000000000 +0000 @@ -1,3 +1,10 @@ +base-passwd (3.5.15) unstable; urgency=low + + * Use autotools-dev's recommended ./configure --build and --host options + (closes: #451123). + + -- Colin Watson <[EMAIL PROTECTED]> Sat, 17 Nov 2007 20:00:42 +0000 + base-passwd (3.5.14) unstable; urgency=low * Allocate uid/gid 64030 for slurm (Gennaro Oliva, closes: #444412). diff -Nru /tmp/XrixkpOvG2/base-passwd-3.5.14/debian/rules /tmp/4Z5kneATTn/base-passwd-3.5.15/debian/rules --- /tmp/XrixkpOvG2/base-passwd-3.5.14/debian/rules 2007-11-12 10:36:39.000000000 +0000 +++ /tmp/4Z5kneATTn/base-passwd-3.5.15/debian/rules 2007-11-17 20:00:23.000000000 +0000 @@ -8,6 +8,15 @@ # Other stuff SHELL = /bin/bash +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +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 + .PHONY: all build all build: Makefile $(MAKE) @@ -31,7 +40,7 @@ endif Makefile: Makefile.in configure.ac - CFLAGS="$(CFLAGS)" ./configure + CFLAGS="$(CFLAGS)" ./configure $(confflags) .PHONY: binary binary: binary-arch binary-indep