Bug#1041870: [3dprinter-general] Bug#1041870: slic3r-prusa FTBFS on i386

2023-07-25 Thread Chow Loong Jin
On Tue, Jul 25, 2023 at 12:09:51AM +0200, Christoph Berg wrote:
> Re: Adrian Bunk
> > 2. the following change:
> > 
> > --- debian/rules.old2023-07-24 15:36:20.941771419 +
> > +++ debian/rules2023-07-24 15:36:43.133759741 +
> > @@ -5,7 +5,7 @@
> >  # less debug info to avoid running out of address space
> >  ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
> > export DEB_CXXFLAGS_MAINT_APPEND += --param ggc-min-expand=5 -g0
> > -else ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
> 
> The old command was wrong anyway, the pattern list comes first:
> 
> ifneq (,$(filter armhf, $(DEB_HOST_ARCH)))
> 
> Doesn't matter when it's a single item without % wildcards, but will
> explode when adding more architectures.
> 
> Christoph

Both versions work identically :)

To be perfectly honest though, I'd initially thought $(filter ...) only
took one pattern, but I see that your version works because it takes
multiple patterns in the first argument, whereas the old version would
have worked with a $(filter ...) function that takes only one pattern.

% cat test.mk
all:
ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel armhf))
@echo old=true
else
@echo old=false
endif

ifneq (,$(filter mips mipsel armhf, $(DEB_HOST_ARCH)))
@echo new=true
else
@echo new=false
endif

% for i in mips mipsel armhf amd64 i386; do echo "DEB_HOST_ARCH=$i"; make -f 
test.mk DEB_HOST_ARCH=$i; done;
DEB_HOST_ARCH=mips
old=true
new=true
DEB_HOST_ARCH=mipsel
old=true
new=true
DEB_HOST_ARCH=armhf
old=true
new=true
DEB_HOST_ARCH=amd64
old=false
new=false
DEB_HOST_ARCH=i386
old=false
new=false

-- 
Kind regards,
Loong Jin


signature.asc
Description: PGP signature


Bug#1041870: [3dprinter-general] Bug#1041870: slic3r-prusa FTBFS on i386

2023-07-24 Thread Christoph Berg
Re: Adrian Bunk
> 2. the following change:
> 
> --- debian/rules.old  2023-07-24 15:36:20.941771419 +
> +++ debian/rules  2023-07-24 15:36:43.133759741 +
> @@ -5,7 +5,7 @@
>  # less debug info to avoid running out of address space
>  ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
>   export DEB_CXXFLAGS_MAINT_APPEND += --param ggc-min-expand=5 -g0
> -else ifneq (,$(filter $(DEB_HOST_ARCH), armhf))

The old command was wrong anyway, the pattern list comes first:

ifneq (,$(filter armhf, $(DEB_HOST_ARCH)))

Doesn't matter when it's a single item without % wildcards, but will
explode when adding more architectures.

Christoph