Rpmlint executable-stack error

So I’m trying to package mkp224o for Fedora, but I’m a little bit confused by the executable-stack error that it gave me. I can’t find much information about the error online or in the Fedora docs aside from the output of rpmlint -e executable-stack. Is this error acceptable for a package submission to have?

You’re going to run into trouble with SELinux with an executable stack. Does the package include assembly code? If so, it may be that the assembly doesn’t contain the marker that says an executable stack is not needed, in which case the toolchain assumes that it is. If that is the case, you may need to add -Wa,--noexecstack to the build flags, -Wl,-z,noexecstack to the linker flags, or both.

Yes there is a decent bit of asm in there. But adding these did not work for me, I tried using %make_build -Wa,--noexecstack -Wl,-z,noexecstack but I suspect I did this wrong. I believe -Wl,-z,noexecstack needs to be declared when I call ./configure? In which case I probably need to ditch the %configure macro so I can do that.

Sorry, I should have been clearer. Try something like this at the top of %build, before %configure:

CFLAGS='%{build_cflags} -Wa,--noexecstack'
CXXFLAGS='%{build_cxxflags} -Wa,--noexecstack'
LDFLAGS='%{build_ldflags} -Wl,-z,noexecstack'

Thank you, that fixed it. Just need to clean up the spec a little and it should be good to submit for review.