Linux kernel 使用叮当声编译:仅输出警告?

Linux kernel 使用叮当声编译:仅输出警告?,linux-kernel,clang,Linux Kernel,Clang,编译内核时,如何让编译器只输出警告?大概是这样的: arm:multi_v7_defconfig | Success in 1 minute and 5 seconds warning: include/asm-generic/atomic-instrumented.h is out-of-date. warning: include/asm-generic/atomic-long.h is out-of-date. warning: include/linux/atomic-fallback.

编译内核时,如何让编译器只输出警告?大概是这样的:

arm:multi_v7_defconfig | Success in 1 minute and 5 seconds
warning: include/asm-generic/atomic-instrumented.h is out-of-date.
warning: include/asm-generic/atomic-long.h is out-of-date.
warning: include/linux/atomic-fallback.h is out-of-date.
warning: include/asm-generic/atomic-instrumented.h is out-of-date.
warning: include/asm-generic/atomic-long.h is out-of-date.
warning: include/linux/atomic-fallback.h is out-of-date.
net/ipv6/ah6.c:721:4: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
net/ipv6/esp6.c:856:5: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
drivers/hid/hid-quirks.c:1075:27: warning: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Wformat]
drivers/hid/hid-quirks.c:1076:4: warning: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Wformat]
drivers/hid/hid-quirks.c:1242:12: warning: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Wformat]
drivers/hid/hid-quirks.c:1242:26: warning: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Wformat]
drivers/scsi/scsi_sysfs.c:372:1: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
drivers/scsi/scsi_sysfs.c:377:1: warning: format specifies type 'short' but the argument has type 'unsigned char' [-Wformat]
drivers/gpu/drm/nouveau/nouveau_dp.c:51:9: warning: format specifies type 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
drivers/gpu/drm/nouveau/nouveau_dp.c:51:17: warning: format specifies type 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
drivers/gpu/drm/nouveau/nouveau_dp.c:51:25: warning: format specifies type 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
drivers/gpu/drm/nouveau/nouveau_dp.c:55:9: warning: format specifies type 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
drivers/gpu/drm/nouveau/nouveau_dp.c:55:17: warning: format specifies type 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
drivers/gpu/drm/nouveau/nouveau_dp.c:55:25: warning: format specifies type 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat]
总的构建时间也非常好


这些是特定于叮当声的特性,还是我也会在GCC中找到它们?

如果您不更改它,这是Linux内核中的默认特性。所有其他(非警告)行都简单地放在每个调用的一个包装行中。当然,您可以在Makefile中替换
$(安静)
。底线:这不是编译器选项,而是每个项目的设置。也请阅读。@0andriy非常感谢!