Dear Maintainer,
In Ubuntu, the attached patch was applied to achieve the following:
* Drop explicit -Wl,--as-needed linker flag. It's the default.
* Drop explicit CFLAGS that are checked by configure.
* Also use non-hardening flags from dpkg-buildflags to pick up flags
like -fno-omit-frame-pointer.
Thanks for considering the patch. I also attach the individual commits
done in Ubuntu that could be applied with "git am".