Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • scripts
  • link-vmlinux.sh
Find file BlameHistoryPermalink
  • Vegard Nossum's avatar
    um: link with -lpthread · 9f37f65c
    Vegard Nossum authored Dec 31, 2015
    BugLink: http://bugs.launchpad.net/bugs/1553179
    
    commit a7df4716 upstream.
    
    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.
    
    Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    
    Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
    9f37f65c
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7