Commit a7df4716 authored by Vegard Nossum's avatar Vegard Nossum Committed by Richard Weinberger

um: link with -lpthread

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.

Cc: stable@vger.kernel.org # 4.4
Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 8c6157b6
...@@ -62,7 +62,7 @@ vmlinux_link() ...@@ -62,7 +62,7 @@ vmlinux_link()
-Wl,--start-group \ -Wl,--start-group \
${KBUILD_VMLINUX_MAIN} \ ${KBUILD_VMLINUX_MAIN} \
-Wl,--end-group \ -Wl,--end-group \
-lutil -lrt ${1} -lutil -lrt -lpthread ${1}
rm -f linux rm -f linux
fi fi
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment