• Vegard Nossum's avatar
    um: link with -lpthread · 1b4d88b5
    Vegard Nossum authored
    commit a7df4716 upstream.
    
    Similarly to commit fb1770aa, with gcc 5
    on Ubuntu and CONFIG_STATIC_LINK=y I was seeing these linker errors:
    
    /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new':
    (.text+0xcd): undefined reference to `pthread_once'
    /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new':
    (.text+0x126): undefined reference to `pthread_attr_init'
    /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/librt.a(timer_create.o): In function `__timer_create_new':
    (.text+0x168): undefined reference to `pthread_attr_setdetachstate'
    [...]
    
    Obviously we also need -lpthread for librt.a.
    Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
    Signed-off-by: Richard Weinberger's avatarRichard Weinberger <richard@nod.at>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    1b4d88b5
link-vmlinux.sh 5.84 KB