当前位置: 技术问答>linux和unix
LDD3中scull编译报错
来源: 互联网 发布时间:2016-08-07
本文导语: 修改makefile 相关路径后 编译报错: [root@localhost s]# make make -C /HHARM2440/kernel/linux-2.6.28.5 M=/HHARM2440/driver/study/scull/s modules make[1]: Entering directory `/HHARM2440/kernel/linux-2.6.28.5' scripts/Makefile.build:46: *** CFLAGS was cha...
修改makefile 相关路径后
编译报错:
[root@localhost s]# make
make -C /HHARM2440/kernel/linux-2.6.28.5 M=/HHARM2440/driver/study/scull/s modules
make[1]: Entering directory `/HHARM2440/kernel/linux-2.6.28.5'
scripts/Makefile.build:46: *** CFLAGS was changed in "/HHARM2440/driver/study/scull/s/Makefile". Fix it to use EXTRA_CFLAGS. Stop.
make[1]: *** [_module_/HHARM2440/driver/study/scull/s] Error 2
make[1]: Leaving directory `/HHARM2440/kernel/linux-2.6.28.5'
make: *** [modules] Error 2
编译报错:
[root@localhost s]# make
make -C /HHARM2440/kernel/linux-2.6.28.5 M=/HHARM2440/driver/study/scull/s modules
make[1]: Entering directory `/HHARM2440/kernel/linux-2.6.28.5'
scripts/Makefile.build:46: *** CFLAGS was changed in "/HHARM2440/driver/study/scull/s/Makefile". Fix it to use EXTRA_CFLAGS. Stop.
make[1]: *** [_module_/HHARM2440/driver/study/scull/s] Error 2
make[1]: Leaving directory `/HHARM2440/kernel/linux-2.6.28.5'
make: *** [modules] Error 2
|
*** CFLAGS was changed in "/HHARM2440/driver/study/scull/s/Makefile". Fix it to use EXTRA_CFLAGS. Stop.
-----------------------
新版的内核不允许在外部makefile里修改CFLAGS
你可以在你的makefile 里把修改CFLAGS的操作改成对EXTRA_CFLAGS的修改
-----------------------
新版的内核不允许在外部makefile里修改CFLAGS
你可以在你的makefile 里把修改CFLAGS的操作改成对EXTRA_CFLAGS的修改
|
CFLAGS += $(DEBFLAGS)
改为
EXTRA_CFLAGS += $(DEBFLAGS)
改为
EXTRA_CFLAGS += $(DEBFLAGS)
|
CFLAGS was changed in "/HHARM2440/driver/study/scull/s/Makefile". Fix it to use EXTRA_CFLAGS
用EXTRA_CFLAGS代替CFLAGS
用EXTRA_CFLAGS代替CFLAGS