Commit ceba72a68d17ee36ef24a71b80dde39ee934ece8
Committed by
James Morris
1 parent
1190416725
Exists in
master
and in
20 other branches
selinux: fix parallel compile error
Selinux has an autogenerated file, "flask.h" which is included by two other selinux files. The current makefile has a single dependency on the first object file in the selinux-y list, assuming that will get flask.h generated before anyone looks for it, but that assumption breaks down in a "make -jN" situation and you get: selinux/selinuxfs.c:35: fatal error: flask.h: No such file or directory compilation terminated. remake[9]: *** [security/selinux/selinuxfs.o] Error 1 Since flask.h is included by security.h which in turn is included nearly everywhere, make the dependency apply to all of the selinux-y list of objs. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: James Morris <jmorris@namei.org>
Showing 1 changed file with 1 additions and 1 deletions Inline Diff
security/selinux/Makefile
1 | # | 1 | # |
2 | # Makefile for building the SELinux module as part of the kernel tree. | 2 | # Makefile for building the SELinux module as part of the kernel tree. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_SECURITY_SELINUX) := selinux.o ss/ | 5 | obj-$(CONFIG_SECURITY_SELINUX) := selinux.o ss/ |
6 | 6 | ||
7 | selinux-y := avc.o \ | 7 | selinux-y := avc.o \ |
8 | hooks.o \ | 8 | hooks.o \ |
9 | selinuxfs.o \ | 9 | selinuxfs.o \ |
10 | netlink.o \ | 10 | netlink.o \ |
11 | nlmsgtab.o \ | 11 | nlmsgtab.o \ |
12 | netif.o \ | 12 | netif.o \ |
13 | netnode.o \ | 13 | netnode.o \ |
14 | netport.o \ | 14 | netport.o \ |
15 | exports.o | 15 | exports.o |
16 | 16 | ||
17 | selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o | 17 | selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o |
18 | 18 | ||
19 | selinux-$(CONFIG_NETLABEL) += netlabel.o | 19 | selinux-$(CONFIG_NETLABEL) += netlabel.o |
20 | 20 | ||
21 | EXTRA_CFLAGS += -Isecurity/selinux -Isecurity/selinux/include | 21 | EXTRA_CFLAGS += -Isecurity/selinux -Isecurity/selinux/include |
22 | 22 | ||
23 | $(obj)/avc.o: $(obj)/flask.h | 23 | $(addprefix $(obj)/,$(selinux-y)): $(obj)/flask.h |
24 | 24 | ||
25 | quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h | 25 | quiet_cmd_flask = GEN $(obj)/flask.h $(obj)/av_permissions.h |
26 | cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h | 26 | cmd_flask = scripts/selinux/genheaders/genheaders $(obj)/flask.h $(obj)/av_permissions.h |
27 | 27 | ||
28 | targets += flask.h av_permissions.h | 28 | targets += flask.h av_permissions.h |
29 | $(obj)/flask.h: $(src)/include/classmap.h FORCE | 29 | $(obj)/flask.h: $(src)/include/classmap.h FORCE |
30 | $(call if_changed,flask) | 30 | $(call if_changed,flask) |
31 | 31 |