If I add this patch to my Chrome OS kernel 4.19 Makefile:
---
diff --git a/Makefile b/Makefile
index a44e05a23631..fc3f463f2bee 100644
--- a/Makefile
+++ b/Makefile
@@ -421,7 +421,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar \
-Werror-implicit-function-declaration \
-Wno-format-security \
- -std=gnu89
+ -std=gnu89 -save-temps
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
---
You start getting errors when you build like:
In file included from /mnt/host/source/src/third_party/kernel/v4.19/kernel/sysctl.c:53:
In file included from /mnt/host/source/src/third_party/kernel/v4.19/include/linux/nfs_fs.h:32:
In file included from /mnt/host/source/src/third_party/kernel/v4.19/include/linux/sunrpc/clnt.h:28:
/mnt/host/source/src/third_party/kernel/v4.19/include/net/ipv6.h:334:8: error: explicitly assigning value of variable of type 'struct ipv6_txoptions *' to itself [-Werror,-Wself-assign]
opt = (opt);
~~~ ^ ~~~
-
/mnt/host/source/src/third_party/kernel/v4.19/mm/memory.c:4602:61: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
if ((((((struct thread_info *)get_current())->addr_limit)) == ((((-1UL))))))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/mnt/host/source/src/third_party/kernel/v4.19/mm/memory.c:4602:61: note: remove extraneous parentheses around the comparison to silence this warning
if ((((((struct thread_info *)get_current())->addr_limit)) == ((((-1UL))))))
~ ^ ~
/mnt/host/source/src/third_party/kernel/v4.19/mm/memory.c:4602:61: note: use '=' to turn this equality comparison into an assignment
if ((((((struct thread_info *)get_current())->addr_limit)) == ((((-1UL))))))
-
/mnt/host/source/src/third_party/kernel/v4.19/mm/mlock.c:389:6: error: explicitly assigning value of variable of type 'unsigned long' to itself [-Werror,-Wself-assign]
end = (end);
~~~ ^ ~~~
-
In file included from /mnt/host/source/src/third_party/kernel/v4.19/kernel/cgroup/cgroup.c:61:
In file included from /mnt/host/source/src/third_party/kernel/v4.19/include/trace/events/cgroup.h:155:
In file included from /mnt/host/source/src/third_party/kernel/v4.19/include/trace/define_trace.h:97:
In file included from /mnt/host/source/src/third_party/kernel/v4.19/include/trace/perf.h:90:
/mnt/host/source/src/third_party/kernel/v4.19/include/trace/events/cgroup.h:11:1547: error: address of array 'root->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
...__data_offsets.name; { entry->root = root->hierarchy_id; entry->ss_mask = root->subsys_mask; strcpy(((char *)((void *)entry + (entry->__data_loc_name & 0xffff))), (root->name) ? (const char *)(r...
---
Presumably adding '-save-temps' is somehow re-enabling a bunch of warnings that we wanted to silence?
Forked from bug #914583
Comment 1 by lloz...@google.com
, Dec 19Status: Assigned (was: Untriaged)