diff -Nru llvm-3.1-3.1/debian/changelog llvm-3.1-3.1/debian/changelog --- llvm-3.1-3.1/debian/changelog 2012-07-01 19:29:07.000000000 +0200 +++ llvm-3.1-3.1/debian/changelog 2012-08-27 21:18:10.000000000 +0200 @@ -1,3 +1,11 @@ +llvm-3.1 (3.1-2ubuntu1) quantal; urgency=low + + * Link LLVMgold.so against libLTO which was broken due to ld --as-needed. + (LP: #1026359) + - Add 1001-link-llvmgold-lto.diff, cherry-picked from upstream. + + -- Felix Geyer Mon, 27 Aug 2012 21:17:48 +0200 + llvm-3.1 (3.1-2) unstable; urgency=low * llvm-3.1 did not include line number information recognizable by gdb diff -Nru llvm-3.1-3.1/debian/control llvm-3.1-3.1/debian/control --- llvm-3.1-3.1/debian/control 2012-07-01 19:30:30.000000000 +0200 +++ llvm-3.1-3.1/debian/control 2012-08-27 21:18:15.000000000 +0200 @@ -1,7 +1,8 @@ Source: llvm-3.1 Section: devel Priority: optional -Maintainer: LLVM Packaging Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: LLVM Packaging Team Uploaders: Arthur Loiret , Sylvestre Ledru Build-Depends: debhelper (>= 8.1.3), flex, bison, dejagnu, tcl8.5, expect, autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo, quilt, diff -Nru llvm-3.1-3.1/debian/patches/1001-link-llvmgold-lto.diff llvm-3.1-3.1/debian/patches/1001-link-llvmgold-lto.diff --- llvm-3.1-3.1/debian/patches/1001-link-llvmgold-lto.diff 1970-01-01 01:00:00.000000000 +0100 +++ llvm-3.1-3.1/debian/patches/1001-link-llvmgold-lto.diff 2012-08-27 21:20:42.000000000 +0200 @@ -0,0 +1,18 @@ +Description: Pass -lLTO after gold-plugin.o so that it gets used in systems + that default to --as-needed. +Origin: upstream, http://llvm.org/viewvc/llvm-project?view=rev&revision=162652 +Bug: http://llvm.org/bugs/show_bug.cgi?id=13262 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1026359 + +--- a/tools/gold/Makefile ++++ b/tools/gold/Makefile +@@ -24,6 +24,8 @@ + # Because off_t is used in the public API, the largefile parts are required for + # ABI compatibility. + CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +-CXXFLAGS += -L$(SharedLibDir)/$(SharedPrefix) -lLTO ++LDFLAGS += -L$(SharedLibDir)/$(SharedPrefix) + + include $(LEVEL)/Makefile.common ++ ++LIBS += -lLTO diff -Nru llvm-3.1-3.1/debian/patches/series llvm-3.1-3.1/debian/patches/series --- llvm-3.1-3.1/debian/patches/series 2012-07-01 19:29:07.000000000 +0200 +++ llvm-3.1-3.1/debian/patches/series 2012-08-27 21:20:52.000000000 +0200 @@ -13,3 +13,4 @@ 0044-soname.diff 0045-hurd-stat.patch 0046-Revert-Patch-to-set-is_stmt-a-little-better-for-prol.patch +1001-link-llvmgold-lto.diff