mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Meyer <thomas@m3y3r.de>
To: Vegard Nossum <vegard.nossum@oracle.com>
Cc: linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net,
	Richard Weinberger <richard@nod.at>
Subject: Re: [uml-devel] [PATCH] um: link with -lpthread
Date: Thu, 31 Dec 2015 17:21:43 +0100	[thread overview]
Message-ID: <781be574-7acc-4891-a12a-571f9e68e2dc@email.android.com> (raw)
In-Reply-To: <1451577977-12990-1-git-send-email-vegard.nossum@oracle.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 2121 bytes --]

Am 31.12.2015 5:06 nachm. schrieb Vegard Nossum <vegard.nossum@oracle.com>:
>
> Similarly to commit fb1770aa78a43530940d0c2dd161e77bc705bdac, with gcc 5 
> on Ubuntu and CONFIG_STATIC_LINK=y I was seeing these linker errors: 

Hi,

Oops, yes this patch looks good to me. Honestly I did never test the static link case. Sorry.

With kind regards
Thomas

>
> /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> 
> --- 
> scripts/link-vmlinux.sh | 2 +- 
> 1 file changed, 1 insertion(+), 1 deletion(-) 
>
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh 
> index dacf71a..ba6c34e 100755 
> --- a/scripts/link-vmlinux.sh 
> +++ b/scripts/link-vmlinux.sh 
> @@ -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 
> } 
> -- 
> 1.9.1 
>
>
> ------------------------------------------------------------------------------ 
> _______________________________________________ 
> User-mode-linux-devel mailing list 
> User-mode-linux-devel@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel 
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2015-12-31 16:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-31 16:06 Vegard Nossum
2015-12-31 16:21 ` Thomas Meyer [this message]
2015-12-31 16:41   ` [uml-devel] " Richard Weinberger
2016-01-10 20:13 ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=781be574-7acc-4891-a12a-571f9e68e2dc@email.android.com \
    --to=thomas@m3y3r.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=vegard.nossum@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®