Bug#733886: llvm-toolchain-3.3: FTBFS on powerpc and powerpcspe with gcc-4.8 (-latomic missing)

Roland Stigge stigge at antcom.de
Wed Jan 1 20:00:29 UTC 2014


Source: llvm-toolchain-3.3
Version: 1:3.3-16
Severity: wishlist
Tags: patch
User: debian-powerpcspe at breakpoint.cc
Usertags: powerpcspe

Hi,

when building llvm-toolchain-3.3 on powerpcspe with gcc-4.8, I get:

...
g++-4.8 -I/«PKGBUILDDIR»/build-llvm/include -I/«PKGBUILDDIR»/build-llvm/tools/lldb/lib -I/«PKGBUILDDIR»/include -I/«PKGBUILDDIR»/tools/lldb/lib  -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -O2 -fomit-frame-pointer -fvisibility-inlines-hidden -fno-exceptions -fPIC -Woverloaded-virtual -Wcast-qual -std=c++0x -g -O2 -Wl,-R -Wl,'$ORIGIN' -L/«PKGBUILDDIR»/build-llvm/Release/lib -L/«PKGBUILDDIR»/build-llvm/Release/lib -fuse-ld=gold   -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings    -Wno-maybe-uninitialized -Wno-missing-field-initializers  -shared -o /«PKGBUILDDIR»/build-llvm/Release/lib/liblldb.so  \
	  -Wl,--whole-archive -llldbAPI -llldbBreakpoint -llldbCommands -llldbCore -llldbDataFormatters -llldbExpression -llldbHostCommon -llldbInitAndLog -llldbInterpreter -llldbPluginABIMacOSX_arm -llldbPluginABIMacOSX_i386 -llldbPluginABISysV_x86_64 -llldbPluginDisassemblerLLVM -llldbPluginDynamicLoaderStatic -llldbPluginDynamicLoaderPOSIX -llldbPluginEmulateInstructionARM -llldbPluginLanguageRuntimeCPlusPlusItaniumABI -llldbPluginLanguageRuntimeObjCAppleObjCRuntime -llldbPluginObjectContainerBSDArchive -llldbPluginObjectFileELF -llldbPluginObjectFilePECOFF -llldbPluginOperatingSystemPython -llldbPluginPlatformGDBServer -llldbPluginProcessGDBRemote -llldbPluginSymbolFileDWARF -llldbPluginSymbolFileSymtab -llldbPluginUnwindAssemblyInstEmulation -llldbPluginUnwindAssemblyx86 -llldbPluginUtility -llldbSymbol -llldbTarget -llldbUtility -lclangAnalysis -lclangAST -lclangBasic -lclangCodeGen -lclangFrontend -lclangDriver -lclangEdit -lclangLex -lclangParse -lclangSema -lclangSerialization -lLL
 VMMCDisassembler -llldbPluginPlatformMacOSX -llldbPluginPlatformLinux -llldbPluginPlatformFreeBSD -lclangRewriteCore -lclangRewriteFrontend -llldbHostLinux -llldbPluginProcessLinux -llldbPluginProcessPOSIX -llldbPluginDynamicLoaderMacOSX -Wl,--no-whole-archive -lLLVM-3.3 -Wl,--no-undefined -L/usr/lib/python2.7/config-powerpc-linux-gnuspe -L/usr/lib -lpthread -ldl  -lutil -lm  -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lrt -Wl,--soname,liblldb.so -lpthread -lffi -ldl -lm 
/usr/include/c++/4.8/bits/atomic_base.h:496: error: undefined reference to '__atomic_load_8'
/usr/include/c++/4.8/bits/atomic_base.h:496: error: undefined reference to '__atomic_load_8'
/usr/include/c++/4.8/bits/atomic_base.h:496: error: undefined reference to '__atomic_load_8'
/usr/include/c++/4.8/bits/atomic_base.h:474: error: undefined reference to '__atomic_store_8'
/usr/include/c++/4.8/bits/atomic_base.h:496: error: undefined reference to '__atomic_load_8'
/usr/include/c++/4.8/bits/atomic_base.h:474: error: undefined reference to '__atomic_store_8'
/usr/include/c++/4.8/bits/atomic_base.h:474: error: undefined reference to '__atomic_store_8'
/usr/include/c++/4.8/bits/atomic_base.h:474: error: undefined reference to '__atomic_store_8'
/usr/include/c++/4.8/bits/atomic_base.h:420: error: undefined reference to '__atomic_fetch_add_8'
/usr/include/c++/4.8/bits/atomic_base.h:420: error: undefined reference to '__atomic_fetch_add_8'
/usr/include/c++/4.8/bits/atomic_base.h:420: error: undefined reference to '__atomic_fetch_add_8'
/usr/include/c++/4.8/bits/atomic_base.h:420: error: undefined reference to '__atomic_fetch_add_8'
...

The attached patch fixes this by adding -latomic in the powerpc and powerpcspe
cases.

Roland

-- System Information:
Debian Release: 7.0
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: powerpcspe (ppc)

Kernel: Linux 3.9.0-dirty (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-toolchain-3.3.patch
Type: text/x-diff
Size: 488 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20140101/7c68b6b2/attachment.patch>


More information about the Pkg-llvm-team mailing list