无法识别的命令行选项‘-fstack protector strong’;使用arm linux gnueabihf gcc

无法识别的命令行选项‘-fstack protector strong’;使用arm linux gnueabihf gcc,linux,linux-kernel,linux-device-driver,raspberry-pi3,Linux,Linux Kernel,Linux Device Driver,Raspberry Pi3,我使用以下命令克隆了Raspberry Pi工具链,并将工具路径添加到bashrc git clone https://github.com/raspberrypi/tools.git --depth=1 echo PATH=$PATH:~raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin >> ~/.bashrc source ~/.bashrc 克隆了树莓皮内核源代码 git c

我使用以下命令克隆了Raspberry Pi工具链,并将工具路径添加到bashrc

git clone https://github.com/raspberrypi/tools.git --depth=1
echo PATH=$PATH:~raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin >> ~/.bashrc
source ~/.bashrc
克隆了树莓皮内核源代码

git clone --depth=1 https://github.com/raspberrypi/linux
简单helloworld模块

#include <linux/kernel.h>
#include <linux/module.h>

MODULE_LICENSE("GPL");
static int test_hello_init(void)
{
    printk(KERN_INFO"%s: In init\n", __func__);
    return 0;
}

static void test_hello_exit(void)
{
    printk(KERN_INFO"%s: In exit\n", __func__);
}

module_init(test_hello_init);
module_exit(test_hello_exit);
它失败,出现以下错误:

arm-linux-gnueabihf-gcc: error: unrecognized command line option ‘-fstack-protector-strong’
scripts/Makefile.build:309: recipe for target '/home/jamal/Linux_Device_Drivers/hello.o' failed

以前,这是可行的,不确定发生了什么变化,现在我得到了这个错误

什么版本的gcc?(运行
arm linux gnueabihf gcc-v
)最近是否升级或降级了?gcc版本4.8.3 20140303(预发布)(crosstool NG linaro-1.13.1+bzr2650-linaro gcc 2014.03)。我没有降级,因为我正在使用预构建的Toolchain。在我看来,
-fstack-protector-strong
直到4.9版才添加到gcc中。我想不到这在GCC4.8.3中会起作用。如果您有GCC4.8,您可以尝试使用
-fstack protector all
arm-linux-gnueabihf-gcc: error: unrecognized command line option ‘-fstack-protector-strong’
scripts/Makefile.build:309: recipe for target '/home/jamal/Linux_Device_Drivers/hello.o' failed