FWIW I looked at the current zesty version where it seems possible to drop the filter but still need the explicit set of LDFLAGS, so
override_dh_auto_build: CFLAGS="$(CFLAGS) $(CPPFLAGS)" \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)" \ dh_auto_build
appears to be working. Could that be a difference in the way Ubuntu automatically exports flags (or not)?
FWIW I looked at the current zesty version where it seems possible to drop the filter but still need the explicit set of LDFLAGS, so
override_ dh_auto_ build:
CFLAGS= "$(CFLAGS) $(CPPFLAGS)" \
LDFLAGS= "$(dpkg- buildflags --get LDFLAGS)" \
dh_auto_ build
appears to be working. Could that be a difference in the way Ubuntu automatically exports flags (or not)?