[Build-common-hackers] Bug#450483: cdbs: Stop setting DEB_CONFIGURE_SCRIPT_ENV in order to enable cross-building

Neil Williams codehelp at debian.org
Sat Nov 24 11:49:29 UTC 2007


Peter Eisentraut wrote:
> Sorry, the last patch couldn't have worked, because CC and CXX are never
> undefined.  Try this patch instead; the logic is the same.
> 
> Index: 1/class/autotools-vars.mk.in
> ===================================================================
> --- 1/class/autotools-vars.mk.in        (Revision 175)
> +++ 1/class/autotools-vars.mk.in        (Arbeitskopie)
> @@ -31,7 +31,13 @@
>  DEB_AC_AUX_DIR = $(DEB_SRCDIR)
> 
>  DEB_CONFIGURE_SCRIPT = $(CURDIR)/$(DEB_SRCDIR)/configure
> -DEB_CONFIGURE_SCRIPT_ENV = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
> +DEB_CONFIGURE_SCRIPT_ENV = CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
> +ifeq "" "$(findstring $(origin CC),empty default)"
> +DEB_CONFIGURE_SCRIPT_ENV += CC="$(CC)"
> +endif
> +ifeq "" "$(findstring $(origin CXX),empty default)"
> +DEB_CONFIGURE_SCRIPT_ENV += CXX="$(CXX)"
> +endif
>  DEB_CONFIGURE_NORMAL_ARGS = --build=$(DEB_BUILD_GNU_TYPE) --prefix=$(DEB_CONFIGURE_PREFIX) --includedir=$(DEB_CONFIGURE_INCLUDEDIR) --mandir=$(DEB_CONFIGURE_MANDIR) --infodir=$(DEB_CONFIGURE_INFODIR) --sysconfdir=$(DEB_CONFIGURE_SYSCONFDIR) --localstatedir=$(DEB_CONFIGURE_LOCALSTATEDIR) --libexecdir=$(DEB_CONFIGURE_LIBEXECDIR) --disable-maintainer-mode --disable-dependency-tracking
> 
>  # Provide --host only if different from --build, as recommended in
> 

Excellent - this is fine.

Thanks for your help with this one.

Before you make an upload to fix this one though, I've come across a
different perspective on the same issue, when not using autotools, just
using the CDBS make support (/usr/share/cdbs/1/class/makefile.mk). I
need to add this rule:

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
DEB_MAKE_ENVVARS=CC=$(DEB_HOST_GNU_TYPE)-gcc
endif

This change is needed with or without any patch to autotools-vars.mk.in
so I'm thinking of reporting a new bug and there's probably a similar
fix that can be made in makefile-vars.mk.in ?

It could be as simple as the attached patch.

What do you think - do both in the same hit or would you prefer a new
bug report and fix it separately?

With these two patches, I'm able to cross build all the CDBS packages
that I need for Emdebian.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: supplementary.diff
Type: text/x-patch
Size: 878 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20071124/0309c8f5/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20071124/0309c8f5/attachment.pgp 


More information about the Build-common-hackers mailing list