Patch "um: link with -lpthread" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
um: link with -lpthread
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
um-link-with-lpthread.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
a7df4716d19594b7b3f106f0bc0ca1c548e508e6Mon Sep 17 00:00:00 2001
From: Vegard Nossum <[email protected]>
Date: Thu, 31 Dec 2015 17:06:17 +0100
Subject: um: link with -lpthread
From: Vegard Nossum <[email protected]>
commit a7df4716d19594b7b3f106f0bc0ca1c548e508e6 upstream.
Similarly to commit fb1770aa78a43530940d0c2dd161e77bc705bdac, 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.
--- scripts/link-vmlinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/link-vmlinux.sh +1 -1
@@ -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 }
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/um-link-with-lpthread.patchqueue-4.4/uml-flush-stdout-before-forking.patchqueue-4.4/uml-fix-hostfs-mknod.patch