Re: [PATCH] Makefile: Another fix for stackprotector _AUTO mode

From: Robert Jarzmik
Date: Sun Oct 15 2017 - 05:06:02 EST


Kees Cook <keescook@xxxxxxxxxxxx> writes:

> If the compiler didn't support a build mode, the second empty test would
> still trip. This moves it to an "else" test for the non-AUTO modes.
>
> Reported-by: Robert Jarzmik <robert.jarzmik@xxxxxxx>
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
> ---
> Robert, can you test this fix?
Sure, tested and it works perfectly.

Tested-by: Robert Jarzmik <robert.jarzmik@xxxxxxx>

And just to be more complete, what happened yesterday was that I wrongly wrote
"CROSS_COMPILER=arm-linux-gnueabi-" and not "CROSS_COMPILE=arm-linux-gnueabi-".

Normally when I do that kind of mistake, I get a gcc error that my architecture
options (-mabi, ...) are not supported. This time I got the stackprotector
thing. The good part is that with your patch I see again the gcc warnings I was
used too :)

Cheers.

--
Robert

PS:
rj@belgarion:~/mio_linux/kernel$ arm-linux-gnueabi-gcc -fstack-protector
arm-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.