mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
um: link with -lpthread
commita7df4716d1
upstream. Similarly to commitfb1770aa78
, 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: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cfcae394f6
commit
1b4d88b5de
|
@ -62,7 +62,7 @@ vmlinux_link()
|
|||
-Wl,--start-group \
|
||||
${KBUILD_VMLINUX_MAIN} \
|
||||
-Wl,--end-group \
|
||||
-lutil -lrt ${1}
|
||||
-lutil -lrt -lpthread ${1}
|
||||
rm -f linux
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user