Commit ff328579 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

make: arch -- Make sure the syscalls headers are generated before deps

In case if here is a fast cpu and make is done in parallel
we may have the following error

| GEN      arch/x86/sys-exec-tbl.c
| GEN      arch/x86/syscalls.S
| CC       arch/x86/crtools.o
| CC       arch/x86/cpu.o
| CC       arch/x86/syscalls.o
| LINK     arch/x86/syscalls.built-in.o
| In file included from include/restorer.h:12:0,
|                 from arch/x86/crtools.c:19:
| include/lock.h: In function ‘futex_set_and_wake’:
| include/lock.h:56:2: error: implicit declaration of function ‘sys_futex’ [-Werror=implicit-function-declaration]
| cc1: all warnings being treated as errors
| make[1]: *** [arch/x86/crtools.o] Error 1
| make: *** [arch/x86] Error 2

This is because crtools.c includes syscall.h but this header
is generated by a special script. So use $(deps-after) feature
provided by our make engine making sure the header is generated
before the deps are started to build.
Reported-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Tested-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 379a5d31
......@@ -54,5 +54,6 @@ cleanup-y += $(SYS-CODES)
cleanup-y += $(SYS-PROTO)
ifneq ($(MAKECMDGOALS),clean)
deps-after := $(obj)/$(SYS-ASM)
incdeps := y
endif
......@@ -50,5 +50,6 @@ cleanup-y += $(SYS-CODES)
cleanup-y += $(SYS-PROTO)
ifneq ($(MAKECMDGOALS),clean)
deps-after := $(obj)/$(SYS-ASM)
incdeps := y
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment