Your patch seems ok, except it does not pass -fno-stack-protector through to mkelfimage anymore, which breaks the build on modern Debian based systems.
Can you fix that?
Can you help me know how I broke it? I don't see anywhere that I modified the flags passed to the compiler in mkelfimage.mk. I also looked at the other changes in the patch, but didn't see anything obvious. I don't have Debian, so it's less obvious for me.
Thanks, Myles