In Ubuntu, the attached patch was applied to achieve the following:
* debian/rules: Set DPKG_EXPORT_BUILDFLAGS = 1 and include
/usr/share/dpkg/buildflags.mk to pick up the correct compiler flags
(LP: #2076419)
A better solution would be to convert the package to use dh though, such
that it inherits flags automatically and also inherits new commands
added to default sequences.