-export EXTRA_CFLAGS=$(CFLAGS)
-export EXTRA_CPPFLAGS=$(CPPFLAGS)
-export HOST_EXTRA_CFLAGS=$(CFLAGS)
-export HOST_EXTRA_CPPFLAGS=$(CPPFLAGS)
-# need to be stripped as DPDK build system adds them and it would be -Wl,-Wl,opt
-export EXTRA_LDFLAGS=$(shell echo $(LDFLAGS) | sed 's/-Wl,//g')
-# HOST_CC build system does not add -Wl ...
-export EXTRA_HOST_LDFLAGS=$(LDFLAGS)
+
+# Support backporting to jessie
+dpkg_version_lt = $(shell dpkg --compare-versions $$(dpkg --status dpkg-dev | grep Version | cut -d' ' -f2) lt-nl "1.18.11" && echo yes)
+ifeq (yes, $(dpkg_version_lt))
+ # package maintainers to append CFLAGS
+ # For Debian, dpkg-dev >= 1.18.11 and gcc 6.x, dpkg-buildflags and gcc
+ # handle -fPIC and related flags relying on specs files
+ # (/usr/share/dpkg/*specs)
+ export DEB_CFLAGS_MAINT_APPEND = -fPIC
+ export EXTRA_CFLAGS=$(CFLAGS)
+ export EXTRA_CPPFLAGS=$(CPPFLAGS)
+ export HOST_EXTRA_CFLAGS=$(CFLAGS)
+ export HOST_EXTRA_CPPFLAGS=$(CPPFLAGS)
+ # need to be stripped as DPDK build system adds them and it would be -Wl,-Wl,opt
+ export EXTRA_LDFLAGS=$(shell echo $(LDFLAGS) | sed 's/-Wl,//g')
+ # HOST_CC build system does not add -Wl ...
+ export EXTRA_HOST_LDFLAGS=$(LDFLAGS)
+endif