Skip to content

Commit a7df471

Browse files
vegardrichardweinberger
authored andcommitted
um: link with -lpthread
Similarly to commit fb1770a, 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. Cc: stable@vger.kernel.org # 4.4 Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 8c6157b commit a7df471

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/link-vmlinux.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ vmlinux_link()
6262
-Wl,--start-group \
6363
${KBUILD_VMLINUX_MAIN} \
6464
-Wl,--end-group \
65-
-lutil -lrt ${1}
65+
-lutil -lrt -lpthread ${1}
6666
rm -f linux
6767
fi
6868
}

0 commit comments

Comments
 (0)