On Wed, 17 Mar 2021 22:52:56 -0700, Kees Cook said: > On Mon, Mar 08, 2021 at 03:40:21AM -0500, Valdis Klētnieks wrote: > > It turns out that older gcc (4.9 and 5.4) have gnu++11 support, but > > due to a gcc bug fixed in gcc6, throw errors during the build. > > The relevant gcc bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69959 > > > > Version the option based on what gcc we're using. > > Is there a better way to detect this than with version checking? Not really. gcc 11 needs --std=gnu++11 to build it. And although gcc4 and gcc5 *claim* to support it, there's a known bug, so we *can't* feed gnu++11 to them. We can check versions.. Or heave gcc-plugins over the side entirely.. Or declare that gcc6 is the minimum for building the kernel. But if we support gcc4/5 *and* gcc11 to build gcc-plugins, we have to version-check. (Unrelated - the patch has grown a merge conflict since I sent it, let me know if you want an updated one, or if it's OK as is....