On Tue, Aug 30, 2016 at 11:29:48AM +0100, Santiago Vila wrote:
> On Tue, Aug 30, 2016 at 12:19:42PM +0200, Helmut Grohne wrote:
> 
> > --- unzip-6.0/debian/rules  2015-10-22 11:00:00.000000000 +0200
> > +++ unzip-6.0/debian/rules  2016-08-30 12:11:59.000000000 +0200
> > @@ -1,6 +1,9 @@
> >  #!/usr/bin/make -f
> >  
> > -CC = gcc
> > +include /usr/share/dpkg/architecture.mk
> > +ifeq ($(origin CC),default)
> > +CC = $(DEB_HOST_GNU_TYPE)-gcc
> > +endif
> >  export DEB_BUILD_MAINT_OPTIONS=hardening=-format
> >  CFLAGS := `dpkg-buildflags --get CFLAGS` -Wall
> >  ifeq ($(DEB_HOST_ARCH),armhf)
> 
> I will probably do something like this:
> 
> DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
> CC = $(DEB_HOST_GNU_TYPE)-gcc
> 
> which is a little bit shorter, as I don't see the need to use makefile
> conditionals here.

That'll also solve this bug. I put the conditional there to avoid
hampering clang based builds. Unconditionally setting CC means that you
cannot easily override it.

Also note that in the unpatched debian/rules, DEB_HOST_ARCH may be used
uninitialized (e.g. when building via ./debian/rules binary-arch).

Helmut

Reply via email to