• Cyrill Gorcunov's avatar
    make: arch -- Make sure the syscalls headers are generated before deps · ff328579
    Cyrill Gorcunov authored
    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>
    ff328579
Makefile 1.25 KB