title: How can I compile the mainline Linux Kernel with the same compile flags Debian uses for hardening?
body: <p>As far as I understand, Debian uses several hardening options when building packages. But how do I find out <em>which compile flags are used for the Linux Kernel in Debian and for a specific architecture</em>?</p>
  
  <p>I'm frequently building my own Kernel packages from the upstream mainline sources (kernel.org) and I would like to apply the same or at least similar hardening as Debian uses for its Kernel builds. The target architecture is arm (or armhf in Debian terms) and I'm crosscompiling on x86-64 (if that makes any difference).</p>