--- llvm-2.7-2.7.orig/debian/rules +++ llvm-2.7-2.7/debian/rules @@ -0,0 +1,47 @@ +#!/usr/bin/make -f + +include debian/rules.d/vars.mk + +ifneq (,$(findstring llvm,$(PKGNAME))) + ifneq (,$(findstring llvm-gcc-,$(PKGNAME))) + gcc_version := $(shell echo $(PKGNAME) | cut -d'-' -f3) + endif + include debian/packages.d/$(PKGNAME).mk +else + tools := clang #vmkit + include debian/packages.d/tools.mk +endif + +patchdirs += $(D)/debian/patches +$(foreach build,$(builds),$(eval \ + $(build)_builddir ?= build-$(build))) +ifeq (,$(strip $(tarball))) + srcdir := . +else + ifeq (,$(strip $(srcdir))) + $(error undefined srcdir) + endif +endif + +define pkgname + $(shell cat $(D)/debian/control.in/$1 | awk '/^Package: / {print $$2}' | \ + sed -e 's/@UVERSION@/$(UVERSION)/;s/@GCC_VERSION@/$(GCC_VERSION)/;s/@PKG_VERSION@/$(pkg_version)/') +endef + +define buildof + $(foreach build,$(builds),$(if $(filter $1,$($(build)_packages)),$(build),)) +endef + +include debian/rules.d/control.mk +include debian/rules.d/unpack.mk +include debian/rules.d/build.mk +include debian/rules.d/binary.mk + +clean: + $(RM) -r $(stampdir) $(foreach build,$(builds),$($(build)_builddir)) +ifneq (,$(strip $(tarball))) + $(RM) -r $(srcdir) +endif + $(RM) -r $(D)/debian/ccache + +.PHONY: clean --- llvm-2.7-2.7.orig/debian/copyright +++ llvm-2.7-2.7/debian/copyright @@ -0,0 +1,89 @@ +This package was debianized by Arthur Loiret on +Sun, 10 Nov 2007 12:32:05 +0200. + +It was downloaded from http://llvm.org/releases/download.html + + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + 14 rue de Plaisance, 75014 Paris, France + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + +============================================================================== +LLVM Release License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2003-2007 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +System Library llvm/lib/System +Compiler Driver llvm/tools/llvmc +Autoconf llvm/autoconf + llvm/projects/ModuleMaker/autoconf + llvm/projects/sample/autoconf + --- llvm-2.7-2.7.orig/debian/compat +++ llvm-2.7-2.7/debian/compat @@ -0,0 +1 @@ +6 --- llvm-2.7-2.7.orig/debian/llvm.binfmt +++ llvm-2.7-2.7/debian/llvm.binfmt @@ -0,0 +1,3 @@ +package llvm +interpreter /usr/bin/lli-2.7 +magic llvc --- llvm-2.7-2.7.orig/debian/logwatch.sh +++ llvm-2.7-2.7/debian/logwatch.sh @@ -0,0 +1,104 @@ +#! /bin/sh + +# script to trick the build daemons and output something, if there is +# still test/build activity + +# $1: primary file to watch. if there is activity on this file, we do nothing +# $2+: files to watch to look for activity despite no output in $1 +# if the files are modified or are newly created, then the message +# is printed on stdout. +# if nothing is modified, don't output anything (so the buildd timeout +# hits). + +pidfile=logwatch.pid +timeout=3600 +message='\nlogwatch still running\n' + +usage() +{ + echo >&2 "usage: `basename $0` [-p ] [-t ] [-m ]" + echo >&2 " [ ...]" + exit 1 +} + +while [ $# -gt 0 ]; do + case $1 in + -p) + pidfile=$2 + shift + shift + ;; + -t) + timeout=$2 + shift + shift + ;; + -m) + message="$2" + shift + shift + ;; + -*) + usage + ;; + *) + break + esac +done + +[ $# -gt 0 ] || usage + +logfile="$1" +shift +otherlogs="$@" + +cleanup() +{ + rm -f $pidfile + exit 0 +} + +#trap cleanup 0 1 3 15 + +echo $$ > $pidfile + +update() +{ + _logvar=$1 + _othervar=$2 + + # logfile may not exist yet + if [ -r $logfile ]; then + _logtail="`tail -10 $logfile | md5sum` $f" + else + _logtail="does not exist: $logfile" + fi + eval $_logvar="'$_logtail'" + + _othertails='' + for f in $otherlogs; do + if [ -r $f ]; then + _othertails="$_othertails `tail -10 $f | md5sum` $f" + else + _othertails="$_othertails does not exist: $f" + fi + done + eval $_othervar="'$_othertails'" +} + +update logtail othertails +while true; do + sleep $timeout + update newlogtail newothertails + if [ "$logtail" != "$newlogtail" ]; then + # there is still action in the primary logfile. do nothing. + logtail="$newlogtail" + elif [ "$othertails" != "$newothertails" ]; then + # there is still action in the other log files, so print the message + /bin/echo -e $message + othertails="$newothertails" + else + # nothing changed in the other log files. maybe a timeout ... + : + fi +done --- llvm-2.7-2.7.orig/debian/changelog +++ llvm-2.7-2.7/debian/changelog @@ -0,0 +1,700 @@ +llvm-2.7 (2.7-6ubuntu1) natty; urgency=low + + * Merge with Debian; remaining changes: + - Don't ship usr/share/vim/addons/plugin in the -dev package. + - Don't build llvm-2.7-priv-dev, remove build dependency on + llvm-2.7-priv-dev. + - Adjust conflicts with unversioned llvm package as found in lucid. + - Patch 0010-r109125.patch. + - Don't ship the unversioned binaries and man pages, now provided + by the llvm-runtime, llvm and llvm-dev packages. + + -- Matthias Klose Wed, 24 Nov 2010 16:25:21 +0100 + +llvm-2.7 (2.7-6) unstable; urgency=low + + * Upload as 2.7-6, the version mangling code breaks with the previous upload. + + -- Matthias Klose Thu, 23 Sep 2010 22:09:56 +0200 + +llvm-2.7 (2.7-5.1) unstable; urgency=low + + * Non-maintainer upload. + * Merge ARM fix from Ubuntu (backports from 2.8, taken from OpenEmbedded): + - 0041-r104558-VFPmisc.patch: Add missing implementation to the + materialization of VFP misc. instructions (vmrs, vmsr and vmov + (immediate)). + - 0042-r104587-MOVimm32.patch: Fix TestARMCodeEmitter::emitPseudoInstruction + UNREACHABLE at ARMCodeEmitter.cpp:554. + - 0043-r104652-VFPLoadStoreMultiple.patch: Fix PR7221, makes VFP + calculations correct. + - 0044-r104653-BFC-BFI.patch: Fix PR7222, ERROR: ARMv6t2 JIT is not yet + supported. + * llvm-2.7-dev: Don't ship the empty directory /usr/share/vim/vimcurrent. + Closes: #593188. + * Call update-binfmts with the versioned file name. Closes: #594501. + + -- Matthias Klose Wed, 22 Sep 2010 22:07:22 +0200 + +llvm-2.7 (2.7-5ubuntu2) maverick; urgency=low + + * Don't ship the unversioned binaries and man pages, now provided + by the llvm-runtime, llvm and llvm-dev packages. + + -- Matthias Klose Sat, 25 Sep 2010 02:32:53 +0200 + +llvm-2.7 (2.7-5ubuntu1) maverick; urgency=low + + [ Matthias Klose ] + * Merge with Debian; remaining changes: + - Don't build llvm-2.7-priv-dev, remove build dependency on + llvm-2.7-priv-dev. + - Adjust conflicts with unversioned llvm package as found in lucid. + - Patches 0010-r109125.patch, 004[1-4]-*. + + -- Matthias Klose Thu, 26 Aug 2010 19:30:48 +0200 + +llvm-2.7 (2.7-5) unstable; urgency=low + + * debian/debhelper.in/llvm-dev.install, debian/packages.d/llvm.mk: + Move vim files to /usr/share/vim/addons/plugin/. Closes: #593188. + * Fix clang -fstack-protector link errors. Thanks to Anders Kaseorg! + Closes: #592009. + - debian/patches/0032-x86-fast-isel-fs-load.patch: Add. + - debian/patches/0033-stack-protector-linux.patch: Add. + * debian/rules.d/control.mk: Don't corrupts patches. More thanks to + Anders Kaseorg. Closes: #593252. + * debian/rules.d/binary.mk: Move dh_ocaml call to... + debian/packages.d/llvm.mk (libllvm-ocaml-dev_extra_binary): ... Here. + * Merge from llvm-gcc-4.2 2.7-3: + - debian/rules.d/binary.mk: Call dh_strip after $*_extra_binary. + - debian/packages.d/llvm-gcc-4.2.mk (llvm-gcc-4.2_extra_binary): + Add GCC version to binaries. + - debian/control.in/llvm-gcc-4.2: Provides llvm-gcc. + - debian/debhelper.in/llvm-gcc-4.2.links: Add. + * Merge from clang 2.7-3: + - debian/debhelper.in/clang.install, debian/debhelper.in/clang.links: + + Install all scan-{build,view} files into /usr/share/clang/. + Addresses: #586194, #592301. + + Install /usr/bin/clang++ symlink. Addresses: #592301. + - debian/packages.d/tools.mk: Fix cache location. + - debian/control.in/clang: Recommends python. + * debian/packages.d/llvm.mk (libllvm-ocaml-dev_extra_binary): Add + upstream version to META file. + + -- Arthur Loiret Wed, 25 Aug 2010 17:08:47 +0000 + +llvm-2.7 (2.7-4ubuntu1) maverick; urgency=low + + [ Matthias Klose ] + * Merge with Debian; remaining changes: + - Don't build llvm-2.7-priv-dev, remove build dependency on + llvm-2.7-priv-dev. + - Adjust conflicts with unversioned llvm package as found in lucid. + * Replace 0010-ARM-BX_to_BLX.patch by 0010-r109125.patch. ARMv4 JIT forgets + to set the lr register when making a indirect function call. Fixes PR7608. + * Backports from 2.8 (taken from OpenEmbedded): + - 0041-r104558-VFPmisc.patch: Add missing implementation to the + materialization of VFP misc. instructions (vmrs, vmsr and vmov + (immediate)). + - 0042-r104587-MOVimm32.patch: Fix TestARMCodeEmitter::emitPseudoInstruction + UNREACHABLE at ARMCodeEmitter.cpp:554. + - 0043-r104652-VFPLoadStoreMultiple.patch: Fix PR7221, makes VFP + calculations correct. + - 0044-r104653-BFC-BFI.patch: Fix PR7222, ERROR: ARMv6t2 JIT is not yet + supported. + * Configure with --with-optimize-option=, always build in ARM mode on armel. + + [ Anders Kaseorg ] + * debian/patches/0032-x86-fast-isel-fs-load.patch, + debian/patches/0033-stack-protector-linux.patch: Take upstream r106031 + and r107640 to fix clang -fstack-protector link errors. (LP: #610992) + + -- Matthias Klose Mon, 16 Aug 2010 14:08:30 +0200 + +llvm-2.7 (2.7-4) unstable; urgency=low + + * Merge from Ubuntu: + - debian/control.in/source (Build-depends): Translate tcl8.4 to tcl8.5. + - debian/control.in/llvm-2.7-dev (Depends): Add libffi-dev (>= 3.0.9). + * debian/packages.d/llvm.mk (libllvm-ocaml-dev_extra_binary): Fix META + filename. Addresses: #583475. + * debian/control.in/source (Build-Depends): Add lzma. Addressed: #591139. + * debian/rules.d/vars.mk (dev_version): Bump to 2.7-4. + + -- Arthur Loiret Tue, 03 Aug 2010 11:30:51 +0000 + +llvm-2.7 (2.7-3ubuntu2) maverick; urgency=low + + * Re-add 0011-gcc-4.4-thumb.patch to fix build failure on ARM. + + -- Matthias Klose Tue, 01 Jun 2010 16:47:35 +0200 + +llvm-2.7 (2.7-3ubuntu1) maverick; urgency=low + + * Merge the Debian packaging. + * Don't build llvm-2.7-priv-dev, remove build dependency on llvm-2.7-priv-dev. + * Build-depend on tcl8.5 instead of tcl8.4. + * llvm-2.7-dev: Depend on libffi-dev. + * Adjust conflicts with unversioned llvm package as found in lucid. + + -- Matthias Klose Mon, 31 May 2010 13:41:56 +0200 + +llvm-2.7 (2.7-3) unstable; urgency=low + + * debian/control.in/source: Build-Depends on patchutils, diffstat. + * Build-Depends on llvm-2.7-priv-dev: + - debian/packages.d/llvm.mk: + + (llvm-priv-dev_version): Define, set to previous revision. + + (BUILDDEPS): Add llvm-$(UVERSION)-priv-dev + (>= $(llvm-priv-dev_version)). + + (llvm_extra_unpack): Register the compiler version. + * debian/rules.d/vars.mk (confargs): Set CC, CXX and CPP. + * Fix FTBFS on non-linux architectures: + - debian/packages.d/llvm.mk (llvm_extra_install): Move the shared library + only if it is enabled. + * debian/patches/0002-Fix-llvm-config-script.patch: Update. + Closes: #579814. + + -- Arthur Loiret Sun, 02 May 2010 08:58:29 +0000 + +llvm-2.7 (2.7-2) unstable; urgency=low + + * Temporary build the shared library on linux only: + - debian/rules.d/vars.mk (with_shared): New variable. + - debian/packages.d/llvm.mk: Use it. + * Temporary Build-Conflicts on llvm-2.7-priv-dev. + * debian/patches/0003-Debian-version-info-and-bugreport.patch: Add + DebianOpts to lib/Support/Makefile instead of Makefile.rules. + * debian/patches/0030-alpha-FTBFS.patch: Add, fix FTBFS on alpha. + * debian/patches/0031-mips-version-script.patch: Add, fix FTBFS on mips. + - debian/packages.d/llvm.mk: Remove mips from unsupported processors. + + -- Arthur Loiret Fri, 30 Apr 2010 18:46:49 +0000 + +llvm-2.7 (2.7-1) unstable; urgency=low + + * New upstream release: + - Now use versioned source package, to handle future openjdk-6, opengtl + and ldc transitions more easily. + - Build a shared libLLVM library in libllvm2.7. + * Build using rtti: + - debian/packages.d/llvm.mk: export REQUIRES_RTTI=1. + * debian/source/format: Add, set to 1.0. + * Build system improvements: + - Support nocheck in DEB_BUILD_OPTIONS. + - Add ccache support. This allows the tools to build much faster, and + prevents llvm from being uselessly built twice. + - Enable multiple make jobs again. + * Patches work from debian/patches: + - 0002-Fix-llvm-config-script.patch: Set include directory to + /usr/lib/llvm-2.7/include/. + - 0003-Debian-version-info-and-bugreport.patch: Refresh. + - 0004-Fix-TOOLDIR-path-for-gccas-and-gccld.patch: Remove, gccas and gccld + have been removed upstream. + - 0005-Disable-llvm-stub.patch: Refresh. + - 0006-Update-autotools-for-avr32.patch: Remove, upstream autotools files + have been updated to a recent enough version. + - 0007-Triple.h-Avoid-identifier-conflicts-on-mips-and-spar.patch: Remove, + merged upstream. + - 0008-path-eraseFromDisk.patch: Refresh. + - 0009-Fix-doclinks.patch: Refresh. + - 0010-ARM-BX_to_BLX.patch: Refresh. + - 0012-RUNTESTFLAGS.patch: Refresh. + - 0019-issue6065.patch: Add, taken from Ubuntu. + - 0021-shared-lib-debian.patch: Add, taken from Ubuntu. + - 0024-issue6758.patch: Add, taken from Ubuntu. + + -- Arthur Loiret Tue, 27 Apr 2010 18:56:52 +0000 + +llvm (2.6-9) unstable; urgency=low + + * Fix testsuite: + - debian/packages.d/*.mk: Don't pass DebianOpts to MAKECHECKFLAGS. + - debian/patches/0012-RUNTESTFLAGS.patch: Add, don't pass VERBOSE + to RUNTESTFLAGS. + * debian/rules.d/vars.mk (dev_version): Bump to 2.6-9. + * debian/rules.d/control.mk: Update diffstats on clean. + * debian/control.in/llvm-snapshot (Priority): set to extra. + * Merge changes from clang 2.6-3: + - debian/debhelper.in/clang.install: Install sorttable.js and + scanview.css in /usr/lib/clang/1.0/utils/. + * Merge changes from Ubuntu (on the way for llvm 2.7): + - debian/rules: Unsed environment variables set by dpkg. + - debian/rules.d/vars.mk: Fix UVERSION for experimental uploads. + + -- Arthur Loiret Sat, 03 Apr 2010 22:54:26 +0000 + +llvm (2.6-8) unstable; urgency=low + + * debian/rules.d/build.mk: Ignore testsuite failures. + + -- Arthur Loiret Wed, 10 Mar 2010 19:21:22 +0000 + +llvm (2.6-7) unstable; urgency=low + + [ Arthur Loiret ] + * Split out the lli bytecode interpreter from llvm to llvm-runtime: + - debian/packages.d/llvm.mk (llvm_packages): Add llvm-runtime. + - debian/debhelper.in/llvm-runtime.{install,links,postinst,prerm}: Add. + - debian/debhelper.in/llvm.{postinst,prerm}: Rename to llvm-runtime. + * debian/packages.d/{llvm,tools}.mk: Configure with --disable-assertions. + * Improve build system: + - debian/{packages.d/llvm.mk,rules.d/build.mk}: Build llvm in a single + target instead of separating tools and core builds. + - debian/{rules.d/binary.mk,packages.d/*.mk}: Make binary stamps depend + only on the truly required install stamps. + - debian/packages.d/*.mk, debian/rules.d/build.mk: Support one check + stamp per build. Install testsuite summary in /usr/share/doc. + - debian/packages.d/*.mk: Use $(RM) instead of "rm". + * debian/control.in/llvm-dev: Depends on the same version of llvm. + * debian/control.in/source: Build-Conflicts on oprofile. + + [ Sylvain Le Gall ] + * Build a libllvm-ocaml-dev package, which contains the OCaml binding: + Closes: #568556. + - debian/debhelper.in/libllvm-ocaml-dev.{dirs,doc-base,install,META}: Add. + - debian/control.in/source: Build-Depends on ocaml-nox (>= 3.11.2), + ocaml-best-compilers | ocaml-nox, dh-ocaml (>= 0.9.1). + - debian/packages.d/llvm.mk: + + (llvm_packages): Add libllvm-ocaml-dev. + + (libllvm-ocaml-dev_extra_binary): Define, install META file. + - debian/rules.d/binary.mk: Add dh_installdirs and dh_ocaml. + - debian/rules.d/vars.mk: + + include /usr/share/ocaml/ocamlvars.mk. + + Configure with --with-ocaml-libdir=$(OCAML_STDLIB_DIR)/llvm. + * debian/rules.d/build.mk: Fix symlinks pointing to the $DESTDIR. + + -- Arthur Loiret Wed, 10 Mar 2010 13:29:06 +0000 + +llvm (2.6-6) unstable; urgency=low + + * Install vim and emacs syntax files. Closes: #489980. + - debian/debhelper.in/llvm-dev.{dirs,install}: Install .vim and .el files. + - debian/packages.d/llvm.mk (llvm-dev_extra_binary): Install README files. + * Build system fixes: + - debian/rules.d/unpack.mk: + + Add missing "touch $@" in $(patch-stamp) target. Closes: #571577. + + Robustify more. + - debian/rules.d/binary.mk: Make binary stamps depend on $(install-stamp). + - debian/rules.d/vars.mk (dev_version): New variable, required llvm-dev + version for llvm-gcc and tools. Bump to 2.6-6. + * Patches work: + - debian/patches/0008-path-eraseFromDisk.patch: Refresh. + - debian/patches/0011-Hurd-fixes.patch: Add, dirtily fix build on Hurd. + * debian/debhelper.in/clang.install: Ship scan-build and ccc-analyzer. + * debian/control.in/source: Bump Standards-Version to 3.8.4. + + -- Arthur Loiret Fri, 26 Feb 2010 10:20:31 +0000 + +llvm (2.6-5) unstable; urgency=low + + * debian/control.in/source: Build-Depends on libffi-dev and lsb-release. + * debian/rules.d/vars.mk: + - Configure with --enable-optimized and --enable-libffi. + - New variable $(OS), for portability with Ubuntu. + * debian/rules.d/unpack.mk: Robustify patch system. + * debian/packages.d/llvm-gcc-4.2.mk: Run testsuite on i386 and amd64. + * Backport changes from Ubuntu: + - debian/packages.d/*.mk: Use $(OS) instead of Debian in version strings. + - 0008-path-eraseFromDisk.patch: Add, use fork/exec instead of system to + avoid quoting problems. + - 0009-Fix-doclinks.patch: Add, fix broken links in index.html. + Closes: #469529. + - 0010-ARM-BX_to_BLX.patch: Add, fix to allow shark work on ARM + (Xerxes Ranby). + + -- Arthur Loiret Wed, 24 Feb 2010 12:00:08 +0000 + +llvm (2.6-4) unstable; urgency=low + + * Stop building on unsupported ia64, mips{,el} processors. + * Merge clang 2.6-1 and llvm-gcc-4.2 2.6-3. + + -- Arthur Loiret Sun, 06 Dec 2009 18:32:04 +0000 + +llvm (2.6-3) unstable; urgency=low + + * Build a llvm-source package. + * Merge from llvm-gcc-4.2 2.6-2: + - debian/packages.d/llvm-gcc-4.2.mk: Define llvm-gcc-4.2_extra_binary, + Adds symlinks for binaries. + + -- Arthur Loiret Mon, 16 Nov 2009 21:34:12 +0000 + +llvm (2.6-2) unstable; urgency=low + + * 0007-Triple.h-Avoid-identifier-conflicts-on-mips-and-spar.patch: Add, + maybe fix the build on sparc and mips{,el}. + * Various fixes in the build system. + + -- Arthur Loiret Mon, 16 Nov 2009 19:32:58 +0000 + +llvm (2.6-1) unstable; urgency=low + + * New upstream release. + - 0007-Move-IA64-asmprinter-to-separate-library.patch, + 0008-Move-MIPS-asmprinter-to-separate-library.patch: Remove. + * 0006-Build-LLVM-with-O2.patch: Remove, pass OPTIMIZE_OPTION to make + instead. + * Improve build system, add build infrastructure for tools. + * Remove RPATHS from all binaries and libraries. + + -- Arthur Loiret Sun, 15 Nov 2009 20:24:40 +0000 + +llvm (2.5-3) unstable; urgency=low + + * Backport from mainline: + - 0007-Move-IA64-asmprinter-to-separate-library.patch. + - 0008-Move-MIPS-asmprinter-to-separate-library.patch. + * This hopefuly fixes the FTBFS on mips. Closes: #518592. + * Fix $LLVM_SRC_ROOT and $LLVM_OBJ_ROOT for real. + * Also fix dependency_libs and libdir. + * Support AVR32: + - Build-Depends on autotools-dev (>= 20060702.1). + - Update config.sub and config.guess. Closes: #535729. + * Bump Standards-Version to 3.8.3. + + -- Arthur Loiret Fri, 06 Nov 2009 15:30:40 +0000 + +llvm (2.5-2) unstable; urgency=low + + * Configure all components with PIC enabled, this includes llvm-gcc-4.2. + * Set $LLVM_SRC_ROOT and $LLVM_OBJ_ROOT to $(PF)/build in binary target. + * Build-Conclicts on ocaml to prevent ocaml bindings to be built. This + should be kept until we build an llvm-ocaml binding package. + * Disable parallel build by default. + + -- Arthur Loiret Fri, 13 Mar 2009 12:31:49 +0000 + +llvm (2.5-1) unstable; urgency=low + + * New upstream release. Closes: #518406. + * Update patches: + - 0007-Separate-alpha-asmprinter.-This-should-unbreak-nativ.patch, + 0008-Separate-sparc-asmprinter.-This-should-unbreak-the-n.patch: Remove. + - Refresh all others. + * Configure with --with-pic --enable-pic. Closes: #518476. + * Remove dangling symlinks. Closes: #509669. + - Now autogenerate debian/llvm.links in debian/rules.d/binary.mk. + * Update build infrastructure for llvm-snapshot and llvm-gcc. + + -- Arthur Loiret Fri, 06 Mar 2009 19:19:06 +0000 + +llvm (2.4-1~exp1) experimental; urgency=low + + * Backport from mainline: + - 0007-Separate-alpha-asmprinter.-This-should-unbreak-nativ.patch. + - 0008-Separate-sparc-asmprinter.-This-should-unbreak-the-n.patch. + * debian/debhelper.in/llvm-dev.install: Also install configure, + config.status and autoconf/ in /usr/lib/llvm/build, will be required + to build clang. + * debian/debhelper.in/llvm.postinst, debian/debhelper.in/llvm.prerm: + Remove full path for update-binfmts. + + -- Arthur Loiret Mon, 24 Nov 2008 20:39:24 +0000 + +llvm (2.4-1~exp0) experimental; urgency=low + + * New upstream release. Closes: #505394 + - Update patches. + * debian/rules: + - Support DEB_BUILD_OPTIONS=parallel=n. + - Depect cpu number and run parallel build by default. + * debian/rules.d/binary.mk: Remove extra license file. + * debian/rules.d/unpack.mk: Really unpatch sources on clean. + * debian/control: Bump Standards-Version to 3.8.0. + * Merge changes between versions 2.2-9 and 2.2-12. + + -- Arthur Loiret Sat, 22 Nov 2008 10:43:59 +0000 + +llvm (2.3-1~exp0) experimental; urgency=low + + * New upstream release. Closes: #489255 + - Update patches. + * debian/debhelper.in/llvm.install: No more config files. + + -- Arthur Loiret Tue, 08 Jul 2008 18:42:51 +0000 + +llvm (2.2-12) unstable; urgency=low + + * 4 revisions to fix debian/control, how lame am I… + Properly update debian/control.in/llvm-examples. + + -- Pierre Habouzit Mon, 13 Oct 2008 10:02:55 +0200 + +llvm (2.2-11) unstable; urgency=low + + * +~ sorts before +bX which defeats its purpose. Use +c~ to be sorted + _after_ binNMUs. + + -- Pierre Habouzit Sun, 12 Oct 2008 18:49:45 +0200 + +llvm (2.2-10) unstable; urgency=high + + * New upload to fix previous borked one. + + -- Pierre Habouzit Sun, 05 Oct 2008 16:19:21 +0200 + +llvm (2.2-9) unstable; urgency=high + + * Make llvm bin-NMU friendly (Closes: #499469). + + -- Pierre Habouzit Sun, 05 Oct 2008 09:37:52 +0200 + +llvm (2.2-8) unstable; urgency=high + + * Run testsuite on kfreebsd-i386 and kfreebsd-amd64 as well. + * Don't append LLVM_DEBIAN_INFO to llvm-config. Closes: #481967 + + -- Arthur Loiret Sat, 28 Jun 2008 16:11:48 +0000 + +llvm (2.2-7) unstable; urgency=high + + * Fix i386-only FTBFS due to missing #include (Closes: 474863). + + -- Pierre Habouzit Sun, 20 Apr 2008 21:40:59 +0200 + +llvm (2.2-6) unstable; urgency=low + + [ Arthur Loiret ] + * Don't build llvm-stub: Closes: #468339 + - patches/0007-Disable-llvm-stub.patch: Add. + - debhelper.in/llvm.links: Update. + * Run the testsuite on amd64 i386 ia64 powerpc s390 sparc only. + + [ Pierre Habouzit ] + * Update patches/0006-Build-with-g-4.3.patch with missing hunk. + (Closes: 417382). + + -- Pierre Habouzit Sun, 06 Apr 2008 00:33:49 +0200 + +llvm (2.2-5) unstable; urgency=low + + * brown paper bag bug, fix llvm-examples.links reordering arguments + (Closes: 470409). + + -- Pierre Habouzit Tue, 11 Mar 2008 10:03:09 +0100 + +llvm (2.2-4) unstable; urgency=low + + [ Pierre Habouzit ] + * debian/control: + + Missing Provides: llvm-libs in llvm-dev Package. + * patches/0005-Build-LLVM-with-O2.patch: build llvm with -O2 to ease + buildd's life. + * Install Makefile.{common,config,rules} in /usr/lib/llvm/build. + * Add links to the Makefiles from llvm-examples (Closes: 469531). + * Rework dependency chains: + + llvm-example depends llvm-dev. + + llvm-dev depends llvm. + + llvm depends nothing, but recommends llvm-dev. + * patches/0006-Build-with-g-4.3.patch: add patch to build with g++-4.3 + (Closes: 417382). + + [ Arthur Loiret ] + * Use logwatch script from gcc to prevent testsuite timeouts. + + -- Pierre Habouzit Mon, 10 Mar 2008 13:22:45 +0100 + +llvm (2.2-3) unstable; urgency=low + + [ Arthur Loiret ] + * 0004-Fix-TOOLDIR-path-for-gccas-and-gccld.patch: Add. Closes: #468341 + * debian/debhelper.in/llvm-doc.install: don't install html.tar.gz, already + in untared html dir. Closes: #468338 + * Rename llvm-libs to llvm-dev and include headers in it. Closes: #468344 + + [ Pierre Habouzit ] + * Fix postinst/prerm binfmts registration for chroots. + + -- Pierre Habouzit Mon, 03 Mar 2008 01:21:00 +0100 + +llvm (2.2-2) unstable; urgency=low + + [ Arthur Loiret ] + * Don't Build-Depends on graphviz, not needed. + * Run testsuite by default. + * 0001-Update-configure-script-for-kfreebsd-gnu-and-hurd.patch: New, + fix FTBFS on kfreebsd-gnu and hurd. + * 0002-Fix-llvm-config-script.patch: New, fix lib and include paths. + * 0003-Debian-version-info-and-bugreport.patch: New, mention Debian revision + in --version, update bugreport contact (set to pkg-llvm mailling list). + + -- Pierre Habouzit Fri, 22 Feb 2008 14:04:39 +0100 + +llvm (2.2-1) unstable; urgency=low + + [ Pierre Habouzit ] + * New upstream release. + * debian/debhelper.in/llvm-examples.examples: add missing file so that + llvm-examples isn't empty. + * debian/debhelper.in/llvm.{preinst,postinst}: use binfmt-support to + register llvm.binfmts properly. + + [ Arthur Loiret ] + * debian/debhelper.in/llvm.install: Remove libs, + * debian/rules.d/build.mk: Remove extra-license-file. + + -- Pierre Habouzit Tue, 12 Feb 2008 11:11:34 +0100 + +llvm (2.1.99-20080209-2) experimental; urgency=low + + * Reinstate lost crhpath to remove unsafe rpath. + + -- Pierre Habouzit Sun, 10 Feb 2008 02:35:19 +0100 + +llvm (2.1.99-20080209-1) experimental; urgency=low + + [ Arthur Loiret ] + * New Maintainers. Closes: #451106, #451384, #449355 + * New upstream release, new build system (again). + * debian/control.in/llvm-gcc: + + Update llvm-gcc description. Closes: #441382 + * debian/copyright: Update. + + [ Pierre Habouzit ] + * debian/control.in/source, debian/control: + + add Vcs-* headers. + * Bump compat to 6. + + -- Arthur Loiret Thu, 07 Feb 2008 15:22:43 +0100 + +llvm (2.1-0~exp1) experimental; urgency=low + + [ Arthur Loiret ] + * Initial llvm2 upload, the packaging is not over yet and we need to test a + few things before uploading it to unstable. Closes will be added then. + * Remove dpatch from build-depends, not used anymore. + * New build system. + + [ Pierre Habouzit ] + * debian/control: + + Remove version for doxygen build-depends as it's not even in oldstable. + + Bump Standards-Version to 3.7.3. + + Add Homepage field. + + -- Pierre Habouzit Mon, 07 Jan 2008 15:09:16 +0100 + +llvm (1.8b-1) unstable; urgency=low + + * Closes: bug#356095: missing llvmc from package (over-zealous cleanup + was removing it) + * Replace entire C front-end (CFE)with latest from CVS (as recommended by + upstream); this will get re-synced with the 1.9 release. + * Re-enable amd64 build. + * Closes: bug#380151 -- FTBFS on ia64 and amd64; new CFE fixes ia64, + but amd64 is hacked back in and not officially supported upstream. + * Closes: bug#389300 -- ia64/unstable FTBFS: compile errors (duplicate) + * Closes: bug#394883 -- ia64/unstable FTBFS: compile errors (duplicate) + + -- Al Stone Mon, 23 Oct 2006 12:53:33 -0600 + +llvm (1.8a-1) unstable; urgency=low + + * Upgrade to latest upstream. + * Closes: bug#385767 -- New upstream release + * Closes: bug#382897 -- Please stop Build-Depending on automake (patch + was wrong, dependency is actually on 1.9, not 1.4) + * Makefile used 'tar xvzf' which was far too noisy; using 'tar xzf' now. + * Closes: bug#380150 -- claims front-end is based on GCC 3.4 but it's 4.0.1 + now; fixed the control file to reflect the proper version. + * Closes: bug#390289 -- problem with update-binfmts when purging packagei + llvm; update-binfmts was being invoked with the wrong arguments + + -- Al Stone Sat, 21 Oct 2006 12:27:09 -0600 + +llvm (1.7-3) unstable; urgency=low + + * Closes: bug#376138 -- llvm: postinst failure in update-binfmts + * Closes: bug#373655 -- amd64 FTBS; this is _not_ a fully supported + architecture; the C backend is the only backend available, iff one + uses an older gcc frontend. Waiting for upstream or helping them + are the best options. + + -- Al Stone Tue, 11 Jul 2006 08:33:48 -0600 + +llvm (1.7-2) unstable; urgency=low + + * Closes: bug#374615: llvm-doc: do not ship doxygen.tar.gz and html.tar.gz + * Closes: bug#373655: amd64/unstable FTBFS -- Unsuported LLVM Target + x86_64-unknown-linux-gnu; this is not yet a supported architecture + for this package and should not have been included. + + -- Al Stone Mon, 26 Jun 2006 08:43:40 -0600 + +llvm (1.7-1) unstable; urgency=low + + * New upstream source (1.7) + * Add alpha architecture, be nicer to sparc + * Closes: bug#370161 -- FTBS due to doxygen bug in older versions (patch + from NMU was not used in order to keep dependencies straightforward) -- + bug #345952 closed from doxygen NMU. + * Closes: bug#357015 -- bashism in /etc/init.d/llvm, by removing the use + is the /etc/init.d script and instead using update-binfmts(8). + * Closes: bug#357016 -- please consider replacing /etc/init.d/llvm with + update-binfmts(8) + + -- Al Stone Tue, 13 Jun 2006 18:11:22 -0600 + +llvm (1.6-1.1) unstable; urgency=high + + * Non-maintainer upload. + * Build-depend on fixed doxygen (>= 1.4.6-2.1); fixes FTBFS. + (Closes: #357722) + + -- Steinar H. Gunderson Sat, 3 Jun 2006 13:52:35 +0200 + +llvm (1.6-1) unstable; urgency=low + + * Closes: bug#339768 -- new upstream version + * Closes: bug#332517 -- FTBS on s390 (it's not a supported architecture) + + -- Al Stone Sun, 1 Jan 2006 15:23:30 -0700 + +llvm (1.5-1) unstable; urgency=low + + * Updated to latest upstream (1.5) + * Removed restriction requiring gcc 3.3 on i386 (no longer needed). + * Updated to latest standards version + * Removed dependency on pax (no longer needed) + * NB: this version was not released into the wild due to my inability to + get it done in a reasonable amount of time + + -- Al Stone Sat, 10 Sep 2005 17:30:42 -0600 + +llvm (1.5-0b) unstable; urgency=low + + * Forced dependency on GCC 3.4; LLVM really does prefer it. + * Updated 1.5cvs bits. + + -- Al Stone Wed, 25 May 2005 14:01:21 -0700 + +llvm (1.5-0a) unstable; urgency=low + + * Start preparing for the 1.5 release. + + -- Al Stone Fri, 20 May 2005 17:39:53 -0700 + +llvm (1.4-3) unstable; urgency=low + + * Closes: bug#304035 -- upstream renamed 'extract' to 'llvm-extract' to + remove conflict with /usr/bin/extract from package extract. + * Closes: bug#308694 -- missing depends for texinfo and graphviz + + -- Al Stone Thu, 19 May 2005 16:47:33 -0600 + +llvm (1.4-2) unstable; urgency=low + + * An older version of llvmc was inadvertently used; now fixed. + + -- Al Stone Fri, 11 Mar 2005 17:04:30 -0700 + +llvm (1.4-1) unstable; urgency=low + + * Initial Release. + * Closes: bug#239415 -- ITP for LLVM (Low-Level Virtual Machine) compiler + for C/C++ + + -- Al Stone Thu, 10 Mar 2005 07:31:10 -0700 + --- llvm-2.7-2.7.orig/debian/control +++ llvm-2.7-2.7/debian/control @@ -0,0 +1,168 @@ +Source: llvm-2.7 +Section: devel +Priority: optional +Maintainer: LLVM Packaging Team +Uploaders: Arthur Loiret , Pierre Habouzit +Build-Depends: debhelper (>= 6.0.0), flex, bison, dejagnu, tcl8.5, expect, + autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo, + sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9), + lsb-release, patchutils, diffstat, lzma, ocaml-nox (>= 3.11.2), ocaml-best-compilers | ocaml-nox, dh-ocaml (>= 0.9.1) +Build-Conflicts: oprofile +Standards-Version: 3.9.1 +Homepage: http://www.llvm.org/ +Vcs-Bzr: https://bazaar.launchpad.net/~pkg-llvm/+junk/llvm-2.7-ubuntu + +Package: libllvm2.7 +Architecture: any +Section: libs +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM), runtime library + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. + . + This package contains the LLVM runtime library. + +Package: llvm-2.7 +Architecture: any +Suggests: llvm-2.7-doc +Depends: llvm-2.7-runtime (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Recommends: llvm-2.7-dev +Conflicts: llvm (<< 2.7-1) +Replaces: llvm (<< 2.7-1) +Description: Low-Level Virtual Machine (LLVM) + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + The strengths of the LLVM infrastructure are its extremely + simple design (which makes it easy to understand and use), + source-language independence, powerful mid-level optimizer, automated + compiler debugging support, extensibility, and its stability and + reliability. LLVM is currently being used to host a wide variety of + academic research projects and commercial projects. LLVM includes C + and C++ front-ends (based on GCC 4.0.1), a front-end for a Forth-like + language (Stacker), a young scheme front-end, and Java support is + in development. LLVM can generate code for X86, SparcV9, PowerPC, + or it can emit C code. + +Package: llvm-2.7-runtime +Architecture: any +Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends} +Conflicts: llvm (<< 2.7-1) +Replaces: llvm (<< 2.7-1) +Description: Low-Level Virtual Machine (LLVM), bytecode interpreter + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the minimal required to execute programs in LLVM + format. + +Package: llvm-2.7-dev +Architecture: any +Depends: ${shlibs:Depends}, libffi-dev (>= 3.0.9), ${misc:Depends}, llvm-2.7 (= ${binary:Version}) +Replaces: llvm (<< 2.2-3) +Description: Low-Level Virtual Machine (LLVM), libraries and headers + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the libraries and headers to develop applications + using llvm. + +Package: libllvm-ocaml-2.7-dev +Section: ocaml +Architecture: any +Suggests: llvm-2.7-doc +Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-2.7-dev (= ${binary:Version}) +Provides: ${ocaml:Provides} +Description: Low-Level Virtual Machine (LLVM), bindings for OCaml + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the OCaml bindings to develop applications using llvm. + +Package: llvm-2.7-doc +Section: doc +Architecture: all +Depends: ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM), documentation + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package contains all documentation (extensive). + +Package: llvm-2.7-examples +Section: doc +Architecture: all +Depends: ${misc:Depends}, llvm-2.7-dev (>= ${source:Version}), llvm-2.7-dev (<< ${source:Version}+c~) +Description: Low-Level Virtual Machine (LLVM), examples + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package contains examples for using LLVM, both in developing + extensions to LLVM and in using it to compile code. + +Package: llvm-2.7-source +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM), source code + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package contains the llvm source code. + --- llvm-2.7-2.7.orig/debian/patches/0044-r104653-BFC-BFI.patch +++ llvm-2.7-2.7/debian/patches/0044-r104653-BFC-BFI.patch @@ -0,0 +1,33 @@ +--- + ARMCodeEmitter.cpp | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +--- a/lib/Target/ARM/ARMCodeEmitter.cpp ++++ b/lib/Target/ARM/ARMCodeEmitter.cpp +@@ -778,10 +778,6 @@ + unsigned ImplicitRn) { + const TargetInstrDesc &TID = MI.getDesc(); + +- if (TID.Opcode == ARM::BFC) { +- llvm_report_error("ARMv6t2 JIT is not yet supported."); +- } +- + // Part of binary is determined by TableGn. + unsigned Binary = getBinaryCodeForInstr(MI); + +@@ -817,6 +813,15 @@ + Binary |= ((Hi16 >> 12) & 0xF) << 16; + emitWordLE(Binary); + return; ++ } else if((TID.Opcode == ARM::BFC) || (TID.Opcode == ARM::BFI)) { ++ uint32_t v = ~MI.getOperand(2).getImm(); ++ int32_t lsb = CountTrailingZeros_32(v); ++ int32_t msb = (32 - CountLeadingZeros_32(v)) - 1; ++ // Insts[20-16] = msb, Insts[11-7] = lsb ++ Binary |= (msb & 0x1F) << 16; ++ Binary |= (lsb & 0x1F) << 7; ++ emitWordLE(Binary); ++ return; + } + + // If this is a two-address operand, skip it. e.g. MOVCCr operand 1. --- llvm-2.7-2.7.orig/debian/patches/0024-issue6758.patch +++ llvm-2.7-2.7/debian/patches/0024-issue6758.patch @@ -0,0 +1,170 @@ +--- + lib/ExecutionEngine/JIT/JIT.cpp | 37 +++++++++++++++++++++++++++++++-- + lib/Target/ARM/ARMISelLowering.cpp | 28 ++++++++++++++++++++++++ + lib/Target/PowerPC/PPCISelLowering.cpp | 26 +++++++++++++++++++++++ + tools/llc/CMakeLists.txt | 2 - + tools/llvm-mc/CMakeLists.txt | 2 - + 5 files changed, 91 insertions(+), 4 deletions(-) + +--- a/lib/ExecutionEngine/JIT/JIT.cpp ++++ b/lib/ExecutionEngine/JIT/JIT.cpp +@@ -254,7 +254,12 @@ + MutexGuard guard(Lock); + JITs.erase(jit); + } +- void *getPointerToNamedFunction(const char *Name) const { ++ bool empty() { ++ MutexGuard guard(Lock); ++ return JITs.empty(); ++ } ++ void *getPointerToNamedFunction(const char *Name, ++ bool AbortOnFailure = true) const { + MutexGuard guard(Lock); + assert(JITs.size() != 0 && "No Jit registered"); + //search function in every instance of JIT +@@ -266,7 +271,19 @@ + } + // The function is not available : fallback on the first created (will + // search in symbol of the current program/library) +- return (*JITs.begin())->getPointerToNamedFunction(Name); ++ return (*JITs.begin())->getPointerToNamedFunction(Name, AbortOnFailure); ++ } ++ void *getPointerToGlobalIfAvailable(GlobalValue *V) const { ++ MutexGuard guard(Lock); ++ assert(JITs.size() != 0 && "No Jit registered"); ++ //search function in every instance of JIT ++ for (SmallPtrSet::const_iterator Jit = JITs.begin(), ++ end = JITs.end(); ++ Jit != end; ++Jit) { ++ if (void *Ptr = (*Jit)->getPointerToGlobalIfAvailable(V)) ++ return Ptr; ++ } ++ return 0; + } + }; + ManagedStatic AllJits; +@@ -282,6 +299,22 @@ + } + } + ++extern "C" { ++ // getPointerToNamedFunctionOrNull - same as the above, but returns ++ // NULL instead of aborting if the function cannot be found. ++ void *getPointerToNamedFunctionOrNull(const char *Name) { ++ return !AllJits->empty() ? AllJits->getPointerToNamedFunction(Name, false) : 0; ++ } ++} ++ ++extern "C" { ++ // getPointerToGlobalIfAvailable - same as the above, but for global ++ // variables, and only for those that have been codegened already. ++ void *getPointerToGlobalIfAvailable(GlobalValue *V) { ++ return !AllJits->empty() ? AllJits->getPointerToGlobalIfAvailable(V) : 0; ++ } ++} ++ + JIT::JIT(Module *M, TargetMachine &tm, TargetJITInfo &tji, + JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, bool GVsWithCode) + : ExecutionEngine(M), TM(tm), TJI(tji), AllocateGVsWithCode(GVsWithCode), +--- a/lib/Target/PowerPC/PPCISelLowering.cpp ++++ b/lib/Target/PowerPC/PPCISelLowering.cpp +@@ -2450,6 +2450,9 @@ + InFlag = Chain.getValue(1); + } + ++extern "C" void *getPointerToNamedFunctionOrNull(const char *Name); ++extern "C" void *getPointerToGlobalIfAvailable(GlobalValue *Value); ++ + static + unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag, + SDValue &Chain, DebugLoc dl, int SPDiff, bool isTailCall, +@@ -2462,6 +2465,29 @@ + + unsigned CallOpc = isSVR4ABI ? PPCISD::CALL_SVR4 : PPCISD::CALL_Darwin; + ++ // XXX Work around for http://llvm.org/bugs/show_bug.cgi?id=5201 ++ // and http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=399 ++ // for Shark. ++ // ++ // If the callee is an ExternalSymbol node, and the symbol can be ++ // resolved to a function pointer, then insert that pointer as a ++ // constant. This causes the next block of code to fall into the ++ // block that emits an indirect call. This works around ++ // ++ // This works for Shark because the only kinds of call that Shark ++ // makes that do not already fall into the indirect call block are ++ // calls to pre-existing external functions. ++ if (ExternalSymbolSDNode *S = dyn_cast(Callee)) { ++ void *FuncPtr = getPointerToNamedFunctionOrNull(S->getSymbol()); ++ if (FuncPtr) ++ Callee = DAG.getConstant((uint64_t) FuncPtr, PtrVT); ++ } ++ if (GlobalAddressSDNode *G = dyn_cast(Callee)) { ++ void *FuncPtr = getPointerToGlobalIfAvailable(G->getGlobal()); ++ if (FuncPtr) ++ Callee = DAG.getConstant((uint64_t) FuncPtr, PtrVT); ++ } ++ + // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every + // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol + // node so that legalize doesn't hack it. +--- a/lib/Target/ARM/ARMISelLowering.cpp ++++ b/lib/Target/ARM/ARMISelLowering.cpp +@@ -895,6 +895,9 @@ + } + } + ++extern "C" void *getPointerToNamedFunctionOrNull(const char *Name); ++extern "C" void *getPointerToGlobalIfAvailable(GlobalValue *Value); ++ + /// LowerCall - Lowering a call into a callseq_start <- + /// ARMISD:CALL <- callseq_end chain. Also add input and output parameter + /// nodes. +@@ -1004,6 +1007,31 @@ + InFlag = Chain.getValue(1); + } + ++ EVT PtrVT = DAG.getTargetLoweringInfo().getPointerTy(); ++ ++ // XXX Work around for http://llvm.org/bugs/show_bug.cgi?id=5201 ++ // and http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=399 ++ // for Shark. ++ // ++ // If the callee is an ExternalSymbol node, and the symbol can be ++ // resolved to a function pointer, then insert that pointer as a ++ // constant. This causes the next block of code to fall into the ++ // block that emits an indirect call. This works around ++ // ++ // This works for Shark because the only kinds of call that Shark ++ // makes that do not already fall into the indirect call block are ++ // calls to pre-existing external functions. ++ if (ExternalSymbolSDNode *S = dyn_cast(Callee)) { ++ void *FuncPtr = getPointerToNamedFunctionOrNull(S->getSymbol()); ++ if (FuncPtr) ++ Callee = DAG.getConstant((uint64_t) FuncPtr, PtrVT); ++ } ++ if (GlobalAddressSDNode *G = dyn_cast(Callee)) { ++ void *FuncPtr = getPointerToGlobalIfAvailable(G->getGlobal()); ++ if (FuncPtr) ++ Callee = DAG.getConstant((uint64_t) FuncPtr, PtrVT); ++ } ++ + // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every + // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol + // node so that legalize doesn't hack it. +--- a/tools/llc/CMakeLists.txt ++++ b/tools/llc/CMakeLists.txt +@@ -1,4 +1,4 @@ +-set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} bitreader asmparser) ++set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} jit bitreader asmparser) + + add_llvm_tool(llc + llc.cpp +--- a/tools/llvm-mc/CMakeLists.txt ++++ b/tools/llvm-mc/CMakeLists.txt +@@ -1,4 +1,4 @@ +-set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} support MC MCParser) ++set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} jit support MC MCParser) + + add_llvm_tool(llvm-mc + llvm-mc.cpp --- llvm-2.7-2.7.orig/debian/patches/0041-r104558-VFPmisc.patch +++ llvm-2.7-2.7/debian/patches/0041-r104558-VFPmisc.patch @@ -0,0 +1,62 @@ +--- + ARMCodeEmitter.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +--- a/lib/Target/ARM/ARMCodeEmitter.cpp ++++ b/lib/Target/ARM/ARMCodeEmitter.cpp +@@ -1465,12 +1465,55 @@ + } + + void ARMCodeEmitter::emitMiscInstruction(const MachineInstr &MI) { ++ unsigned Opcode = MI.getDesc().Opcode; + // Part of binary is determined by TableGn. + unsigned Binary = getBinaryCodeForInstr(MI); + + // Set the conditional execution predicate + Binary |= II->getPredicate(&MI) << ARMII::CondShift; + ++ switch(Opcode) { ++ default: ++ llvm_unreachable("ARMCodeEmitter::emitMiscInstruction"); ++ ++ case ARM::FMSTAT: ++ // No further encoding needed. ++ break; ++ ++ case ARM::VMRS: ++ case ARM::VMSR: { ++ const MachineOperand &MO0 = MI.getOperand(0); ++ // Encode Rt. ++ Binary |= ARMRegisterInfo::getRegisterNumbering(MO0.getReg()) ++ << ARMII::RegRdShift; ++ break; ++ } ++ ++ case ARM::FCONSTD: ++ case ARM::FCONSTS: { ++ // Encode Dd / Sd. ++ Binary |= encodeVFPRd(MI, 0); ++ ++ // Encode imm., Table A7-18 VFP modified immediate constants ++ const MachineOperand &MO1 = MI.getOperand(1); ++ unsigned Imm = static_cast(MO1.getFPImm()->getValueAPF() ++ .bitcastToAPInt().getHiBits(32).getLimitedValue()); ++ unsigned ModifiedImm; ++ ++ if(Opcode == ARM::FCONSTS) ++ ModifiedImm = (Imm & 0x80000000) >> 24 | // a ++ (Imm & 0x03F80000) >> 19; // bcdefgh ++ else // Opcode == ARM::FCONSTD ++ ModifiedImm = (Imm & 0x80000000) >> 24 | // a ++ (Imm & 0x007F0000) >> 16; // bcdefgh ++ ++ // Insts{19-16} = abcd, Insts{3-0} = efgh ++ Binary |= ((ModifiedImm & 0xF0) >> 4) << 16; ++ Binary |= (ModifiedImm & 0xF); ++ break; ++ } ++ } ++ + emitWordLE(Binary); + } + --- llvm-2.7-2.7.orig/debian/patches/0011-Hurd-fixes.patch +++ llvm-2.7-2.7/debian/patches/0011-Hurd-fixes.patch @@ -0,0 +1,39 @@ +--- + Path.inc | 5 +++++ + Process.inc | 4 ++-- + 2 files changed, 7 insertions(+), 2 deletions(-) + +--- a/lib/System/Unix/Path.inc ++++ b/lib/System/Unix/Path.inc +@@ -64,6 +64,11 @@ + #include + #endif + ++// For GNU Hurd ++#if defined(__GNU__) && !defined(MAXPATHLEN) ++# define MAXPATHLEN 4096 ++#endif ++ + // Put in a hack for Cygwin which falsely reports that the mkdtemp function + // is available when it is not. + #ifdef __CYGWIN__ +--- a/lib/System/Unix/Process.inc ++++ b/lib/System/Unix/Process.inc +@@ -136,7 +136,7 @@ + return getgid(); + } + +-#ifdef HAVE_MACH_MACH_H ++#if defined(HAVE_MACH_MACH_H) && !defined(__GNU__) + #include + #endif + +@@ -150,7 +150,7 @@ + setrlimit(RLIMIT_CORE, &rlim); + #endif + +-#ifdef HAVE_MACH_MACH_H ++#if defined(HAVE_MACH_MACH_H) && !defined(__GNU__) + // Disable crash reporting on Mac OS X 10.0-10.4 + + // get information about the original set of exception ports for the task --- llvm-2.7-2.7.orig/debian/patches/0042-r104587-MOVimm32.patch +++ llvm-2.7-2.7/debian/patches/0042-r104587-MOVimm32.patch @@ -0,0 +1,182 @@ +--- + ARMCodeEmitter.cpp | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + ARMJITInfo.cpp | 12 ++++++ + ARMRelocations.h | 8 +++- + 3 files changed, 113 insertions(+), 1 deletion(-) + +--- a/lib/Target/ARM/ARMJITInfo.cpp ++++ b/lib/Target/ARM/ARMJITInfo.cpp +@@ -318,6 +318,18 @@ + *((intptr_t*)RelocPos) |= ResultPtr; + break; + } ++ case ARM::reloc_arm_movw: { ++ ResultPtr = ResultPtr & 0xFFFF; ++ *((intptr_t*)RelocPos) |= ResultPtr & 0xFFF; ++ *((intptr_t*)RelocPos) |= ((ResultPtr >> 12) & 0xF) << 16; ++ break; + } ++ case ARM::reloc_arm_movt: { ++ ResultPtr = (ResultPtr >> 16) & 0xFFFF; ++ *((intptr_t*)RelocPos) |= ResultPtr & 0xFFF; ++ *((intptr_t*)RelocPos) |= ((ResultPtr >> 12) & 0xF) << 16; ++ break; ++ } ++ } + } + } +--- a/lib/Target/ARM/ARMCodeEmitter.cpp ++++ b/lib/Target/ARM/ARMCodeEmitter.cpp +@@ -88,6 +88,7 @@ + void emitWordLE(unsigned Binary); + void emitDWordLE(uint64_t Binary); + void emitConstPoolInstruction(const MachineInstr &MI); ++ void emitMOVi32immInstruction(const MachineInstr &MI); + void emitMOVi2piecesInstruction(const MachineInstr &MI); + void emitLEApcrelJTInstruction(const MachineInstr &MI); + void emitPseudoMoveInstruction(const MachineInstr &MI); +@@ -145,6 +146,15 @@ + return getMachineOpValue(MI, MI.getOperand(OpIdx)); + } + ++ /// getMovi32Value - Return binary encoding of operand for movw/movt. If the ++ /// machine operand requires relocation, record the relocation and return zero. ++ unsigned getMovi32Value(const MachineInstr &MI,const MachineOperand &MO, ++ unsigned Reloc); ++ unsigned getMovi32Value(const MachineInstr &MI, unsigned OpIdx, ++ unsigned Reloc) { ++ return getMovi32Value(MI, MI.getOperand(OpIdx), Reloc); ++ } ++ + /// getShiftOp - Return the shift opcode (bit[6:5]) of the immediate value. + /// + unsigned getShiftOp(unsigned Imm) const ; +@@ -217,6 +227,31 @@ + return 0; + } + ++/// getMovi32Value - Return binary encoding of operand for movw/movt. If the ++/// machine operand requires relocation, record the relocation and return zero. ++unsigned ARMCodeEmitter::getMovi32Value(const MachineInstr &MI, ++ const MachineOperand &MO, ++ unsigned Reloc) { ++ assert(((Reloc == ARM::reloc_arm_movt) || (Reloc == ARM::reloc_arm_movw)) ++ && "Relocation to this function should be for movt or movw"); ++ ++ if (MO.isImm()) ++ return static_cast(MO.getImm()); ++ else if (MO.isGlobal()) ++ emitGlobalAddress(MO.getGlobal(), Reloc, true, false); ++ else if (MO.isSymbol()) ++ emitExternalSymbolAddress(MO.getSymbolName(), Reloc); ++ else if (MO.isMBB()) ++ emitMachineBasicBlock(MO.getMBB(), Reloc); ++ else { ++#ifndef NDEBUG ++ errs() << MO; ++#endif ++ llvm_unreachable("Unsupported operand type for movw/movt"); ++ } ++ return 0; ++} ++ + /// getMachineOpValue - Return binary encoding of operand. If the machine + /// operand requires relocation, record the relocation and return zero. + unsigned ARMCodeEmitter::getMachineOpValue(const MachineInstr &MI, +@@ -438,6 +473,42 @@ + } + } + ++void ARMCodeEmitter::emitMOVi32immInstruction(const MachineInstr &MI) { ++ const MachineOperand &MO0 = MI.getOperand(0); ++ const MachineOperand &MO1 = MI.getOperand(1); ++ ++ // Emit the 'movw' instruction. ++ unsigned Binary = 0x30 << 20; // mov: Insts{27-20} = 0b00110000 ++ ++ unsigned Lo16 = getMovi32Value(MI, MO1, ARM::reloc_arm_movw) & 0xFFFF; ++ ++ // Set the conditional execution predicate. ++ Binary |= II->getPredicate(&MI) << ARMII::CondShift; ++ ++ // Encode Rd. ++ Binary |= getMachineOpValue(MI, MO0) << ARMII::RegRdShift; ++ ++ // Encode imm16 as imm4:imm12 ++ Binary |= Lo16 & 0xFFF; // Insts{11-0} = imm12 ++ Binary |= ((Lo16 >> 12) & 0xF) << 16; // Insts{19-16} = imm4 ++ emitWordLE(Binary); ++ ++ unsigned Hi16 = getMovi32Value(MI, MO1, ARM::reloc_arm_movt) >> 16; ++ // Emit the 'movt' instruction. ++ Binary = 0x34 << 20; // movt: Insts{27-20} = 0b00110100 ++ ++ // Set the conditional execution predicate. ++ Binary |= II->getPredicate(&MI) << ARMII::CondShift; ++ ++ // Encode Rd. ++ Binary |= getMachineOpValue(MI, MO0) << ARMII::RegRdShift; ++ ++ // Encode imm16 as imm4:imm1, same as movw above. ++ Binary |= Hi16 & 0xFFF; ++ Binary |= ((Hi16 >> 12) & 0xF) << 16; ++ emitWordLE(Binary); ++} ++ + void ARMCodeEmitter::emitMOVi2piecesInstruction(const MachineInstr &MI) { + const MachineOperand &MO0 = MI.getOperand(0); + const MachineOperand &MO1 = MI.getOperand(1); +@@ -604,6 +674,11 @@ + emitMiscLoadStoreInstruction(MI, ARM::PC); + break; + } ++ ++ case ARM::MOVi32imm: ++ emitMOVi32immInstruction(MI); ++ break; ++ + case ARM::MOVi2pieces: + // Two instructions to materialize a constant. + emitMOVi2piecesInstruction(MI); +@@ -729,6 +804,24 @@ + Binary |= (ARMRegisterInfo::getRegisterNumbering(ImplicitRd) + << ARMII::RegRdShift); + ++ if (TID.Opcode == ARM::MOVi16) { ++ // Get immediate from MI. ++ unsigned Lo16 = getMovi32Value(MI, MI.getOperand(OpIdx), ++ ARM::reloc_arm_movw); ++ // Encode imm which is the same as in emitMOVi32immInstruction(). ++ Binary |= Lo16 & 0xFFF; ++ Binary |= ((Lo16 >> 12) & 0xF) << 16; ++ emitWordLE(Binary); ++ return; ++ } else if(TID.Opcode == ARM::MOVTi16) { ++ unsigned Hi16 = (getMovi32Value(MI, MI.getOperand(OpIdx), ++ ARM::reloc_arm_movt) >> 16); ++ Binary |= Hi16 & 0xFFF; ++ Binary |= ((Hi16 >> 12) & 0xF) << 16; ++ emitWordLE(Binary); ++ return; ++ } ++ + // If this is a two-address operand, skip it. e.g. MOVCCr operand 1. + if (TID.getOperandConstraint(OpIdx, TOI::TIED_TO) != -1) + ++OpIdx; +--- a/lib/Target/ARM/ARMRelocations.h ++++ b/lib/Target/ARM/ARMRelocations.h +@@ -47,7 +47,13 @@ + reloc_arm_pic_jt, + + // reloc_arm_branch - Branch address relocation. +- reloc_arm_branch ++ reloc_arm_branch, ++ ++ // reloc_arm_movt - MOVT immediate relocation. ++ reloc_arm_movt, ++ ++ // reloc_arm_movw - MOVW immediate relocation. ++ reloc_arm_movw + }; + } + } --- llvm-2.7-2.7.orig/debian/patches/0019-issue6065.patch +++ llvm-2.7-2.7/debian/patches/0019-issue6065.patch @@ -0,0 +1,20 @@ +--- + ARMJITInfo.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/lib/Target/ARM/ARMJITInfo.cpp ++++ b/lib/Target/ARM/ARMJITInfo.cpp +@@ -99,7 +99,13 @@ + // The above twiddling of the saved return addresses allows us to + // deallocate everything, including the LR the stub saved, all in one + // pop instruction. ++#ifndef __thumb__ + "ldmia sp!, {r0, r1, r2, r3, lr, pc}\n" ++#else ++ // thumb dont allow lr and pc to be poped in the same instruction. ++ "pop {r0, r1, r2, r3, lr}\n" ++ "pop {pc}\n" ++#endif + ); + #else // Not an ARM host + void ARMCompilationCallback() { --- llvm-2.7-2.7.orig/debian/patches/0002-Fix-llvm-config-script.patch +++ llvm-2.7-2.7/debian/patches/0002-Fix-llvm-config-script.patch @@ -0,0 +1,38 @@ +--- + llvm-config.in.in | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/tools/llvm-config/llvm-config.in.in ++++ b/tools/llvm-config/llvm-config.in.in +@@ -65,7 +65,7 @@ + chomp($ABS_OBJ_ROOT); + + my $INCLUDEDIR = "$ABS_RUN_DIR/include"; +-my $INCLUDEOPTION = "-I$INCLUDEDIR"; ++my $INCLUDEOPTION = "-I/usr/lib/llvm-$VERSION/include"; + my $LIBDIR = "$ABS_RUN_DIR/lib"; + my $BINDIR = "$ABS_RUN_DIR/bin"; + if ($ABS_RUN_DIR eq $ABS_OBJ_ROOT) { +@@ -76,8 +76,11 @@ + $INCLUDEOPTION = "-I$INCLUDEDIR -I$LLVM_OBJ_ROOT/include" + } else { + # If installed, ignore the prefix the tree was configured with, use the +- # current prefix. +- $PREFIX = $ABS_RUN_DIR; ++ # Debian dirs. ++ $INCLUDEDIR = "/usr/lib/llvm-$VERSION/include"; ++ $PREFIX = "/usr/lib/llvm-$VERSION"; ++ $LIBDIR = "/usr/lib/llvm-$VERSION/lib"; ++ $BINDIR = "/usr/lib/llvm-$VERSION/bin"; + } + + sub usage; +@@ -154,7 +157,7 @@ + # Handle any arguments which require building our dependency graph. + if ($want_libs || $want_libnames || $want_libfiles) { + my @libs = expand_dependencies(@components); +- print join(' ', fix_library_names(@libs)), "\n" if ($want_libs); ++ print join(' ', fix_library_names(@libs)), " -L$LIBDIR\n" if ($want_libs); + print join(' ', @libs), "\n" if ($want_libnames); + print join(' ', fix_library_files(@libs)), "\n" if ($want_libfiles); + } --- llvm-2.7-2.7.orig/debian/patches/0012-RUNTESTFLAGS.patch +++ llvm-2.7-2.7/debian/patches/0012-RUNTESTFLAGS.patch @@ -0,0 +1,14 @@ +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +--- a/test/Makefile ++++ b/test/Makefile +@@ -27,7 +27,6 @@ + endif + + ifdef VERBOSE +-RUNTESTFLAGS := $(VERBOSE) + LIT_ARGS := -v + else + LIT_ARGS := -s -v --- llvm-2.7-2.7.orig/debian/patches/0031-mips-version-script.patch +++ llvm-2.7-2.7/debian/patches/0031-mips-version-script.patch @@ -0,0 +1,37 @@ +--- + Makefile.rules | 2 ++ + configure | 2 ++ + 2 files changed, 4 insertions(+) + +--- a/configure ++++ b/configure +@@ -2334,6 +2334,7 @@ + alpha*-*) llvm_cv_target_arch="Alpha" ;; + arm*-*) llvm_cv_target_arch="ARM" ;; + mips-*) llvm_cv_target_arch="Mips" ;; ++ mipsel-*) llvm_cv_target_arch="Mips" ;; + pic16-*) llvm_cv_target_arch="PIC16" ;; + xcore-*) llvm_cv_target_arch="XCore" ;; + msp430-*) llvm_cv_target_arch="MSP430" ;; +@@ -4920,6 +4921,7 @@ + alpha) TARGETS_TO_BUILD="Alpha $TARGETS_TO_BUILD" ;; + arm) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; + mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; ++ mipsel) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + spu) TARGETS_TO_BUILD="CellSPU $TARGETS_TO_BUILD" ;; + pic16) TARGETS_TO_BUILD="PIC16 $TARGETS_TO_BUILD" ;; + xcore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; +--- a/Makefile.rules ++++ b/Makefile.rules +@@ -1268,9 +1268,11 @@ + endif + + ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD)) ++ifneq ($(ARCH), Mips) + LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map + endif + endif ++endif + + + #--------------------------------------------------------- --- llvm-2.7-2.7.orig/debian/patches/0021-shared-lib-debian.patch +++ llvm-2.7-2.7/debian/patches/0021-shared-lib-debian.patch @@ -0,0 +1,27 @@ +--- + Makefile | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/tools/llvm-shlib/Makefile ++++ b/tools/llvm-shlib/Makefile +@@ -26,6 +26,12 @@ + LLVMLibsPaths := $(IncludeInLibLlvm) + + $(LibName.SO): $(LLVMLibsPaths) ++ $(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \ ++ $(LIBRARYNAME)$(SHLIBEXT) ++ $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) \ ++ $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS) ++ mv $(LibName.SO) $(LibName.SO).1 ++ ln -s $(notdir $(LibName.SO)).1 $(LibName.SO) + + ifeq ($(HOST_OS),Darwin) + # set dylib internal version number to llvmCore submission number +@@ -55,6 +61,7 @@ + # Include everything from the .a's into the shared library. + LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \ + -Wl,--no-whole-archive ++ LLVMLibsOptions += -Wl,--soname=$(notdir $(LibName.SO)).1 -Wl,-Bsymbolic-functions + # Don't allow unresolved symbols. + LLVMLibsOptions += -Wl,--no-undefined + endif --- llvm-2.7-2.7.orig/debian/patches/0030-alpha-FTBFS.patch +++ llvm-2.7-2.7/debian/patches/0030-alpha-FTBFS.patch @@ -0,0 +1,15 @@ +--- + AlphaJITInfo.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/lib/Target/Alpha/AlphaJITInfo.cpp ++++ b/lib/Target/Alpha/AlphaJITInfo.cpp +@@ -103,7 +103,7 @@ + + asm( + ".text\n" +- ".globl AlphaComilationCallbackC\n" ++ ".globl AlphaCompilationCallbackC\n" + ".align 4\n" + ".globl AlphaCompilationCallback\n" + ".ent AlphaCompilationCallback\n" --- llvm-2.7-2.7.orig/debian/patches/0033-stack-protector-linux.patch +++ llvm-2.7-2.7/debian/patches/0033-stack-protector-linux.patch @@ -0,0 +1,266 @@ +--- + include/llvm/Target/TargetLowering.h | 8 ++++++++ + lib/CodeGen/StackProtector.cpp | 17 +++++++++++++++-- + lib/Target/X86/X86ISelLowering.cpp | 21 +++++++++++++++++++++ + lib/Target/X86/X86ISelLowering.h | 6 ++++++ + lib/Target/X86/X86Subtarget.cpp | 3 ++- + lib/Target/X86/X86Subtarget.h | 7 +++++++ + test/CodeGen/Generic/stack-protector.ll | 25 ------------------------- + test/CodeGen/PowerPC/stack-protector.ll | 25 +++++++++++++++++++++++++ + test/CodeGen/X86/stack-protector-linux.ll | 28 ++++++++++++++++++++++++++++ + test/CodeGen/X86/stack-protector.ll | 25 +++++++++++++++++++++++++ + 10 files changed, 137 insertions(+), 28 deletions(-) + +--- a/lib/Target/X86/X86Subtarget.cpp ++++ b/lib/Target/X86/X86Subtarget.cpp +@@ -292,7 +292,8 @@ + // FIXME: this is a known good value for Yonah. How about others? + , MaxInlineSizeThreshold(128) + , Is64Bit(is64Bit) +- , TargetType(isELF) { // Default to ELF unless otherwise specified. ++ , TargetType(isELF) // Default to ELF unless otherwise specified. ++ , TargetTriple(TT) { + + // default to hard float ABI + if (FloatABIType == FloatABI::Default) +--- a/lib/Target/X86/X86Subtarget.h ++++ b/lib/Target/X86/X86Subtarget.h +@@ -14,6 +14,7 @@ + #ifndef X86SUBTARGET_H + #define X86SUBTARGET_H + ++#include "llvm/ADT/Triple.h" + #include "llvm/Target/TargetSubtarget.h" + #include + +@@ -95,6 +96,8 @@ + /// + unsigned MaxInlineSizeThreshold; + ++ Triple TargetTriple; ++ + private: + /// Is64Bit - True if the processor supports 64-bit instructions and + /// pointer size is 64 bit. +@@ -169,6 +172,10 @@ + return Is64Bit && (TargetType == isMingw || TargetType == isWindows); + } + ++ bool isTargetLinux() const { ++ return TargetTriple.getOS() == Triple::Linux; ++ } ++ + std::string getDataLayout() const { + const char *p; + if (is64Bit()) +--- a/test/CodeGen/PowerPC/stack-protector.ll ++++ b/test/CodeGen/PowerPC/stack-protector.ll +@@ -0,0 +1,25 @@ ++; RUN: llc -march=ppc32 < %s -o - | grep {__stack_chk_guard} ++; RUN: llc -march=ppc32 < %s -o - | grep {__stack_chk_fail} ++ ++@"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00" ; <[11 x i8]*> [#uses=1] ++ ++define void @test(i8* %a) nounwind ssp { ++entry: ++ %a_addr = alloca i8* ; [#uses=2] ++ %buf = alloca [8 x i8] ; <[8 x i8]*> [#uses=2] ++ %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] ++ store i8* %a, i8** %a_addr ++ %buf1 = bitcast [8 x i8]* %buf to i8* ; [#uses=1] ++ %0 = load i8** %a_addr, align 4 ; [#uses=1] ++ %1 = call i8* @strcpy(i8* %buf1, i8* %0) nounwind ; [#uses=0] ++ %buf2 = bitcast [8 x i8]* %buf to i8* ; [#uses=1] ++ %2 = call i32 (i8*, ...)* @printf(i8* getelementptr ([11 x i8]* @"\01LC", i32 0, i32 0), i8* %buf2) nounwind ; [#uses=0] ++ br label %return ++ ++return: ; preds = %entry ++ ret void ++} ++ ++declare i8* @strcpy(i8*, i8*) nounwind ++ ++declare i32 @printf(i8*, ...) nounwind +--- a/test/CodeGen/X86/stack-protector-linux.ll ++++ b/test/CodeGen/X86/stack-protector-linux.ll +@@ -0,0 +1,28 @@ ++; RUN: llc -mtriple=i386-pc-linux-gnu < %s -o - | grep %gs: ++; RUN: llc -mtriple=x86_64-pc-linux-gnu < %s -o - | grep %fs: ++; RUN: llc -code-model=kernel -mtriple=x86_64-pc-linux-gnu < %s -o - | grep %gs: ++; RUN: llc -mtriple=x86_64-apple-darwin < %s -o - | grep {__stack_chk_guard} ++; RUN: llc -mtriple=x86_64-apple-darwin < %s -o - | grep {__stack_chk_fail} ++ ++@"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00" ; <[11 x i8]*> [#uses=1] ++ ++define void @test(i8* %a) nounwind ssp { ++entry: ++ %a_addr = alloca i8* ; [#uses=2] ++ %buf = alloca [8 x i8] ; <[8 x i8]*> [#uses=2] ++ %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] ++ store i8* %a, i8** %a_addr ++ %buf1 = bitcast [8 x i8]* %buf to i8* ; [#uses=1] ++ %0 = load i8** %a_addr, align 4 ; [#uses=1] ++ %1 = call i8* @strcpy(i8* %buf1, i8* %0) nounwind ; [#uses=0] ++ %buf2 = bitcast [8 x i8]* %buf to i8* ; [#uses=1] ++ %2 = call i32 (i8*, ...)* @printf(i8* getelementptr ([11 x i8]* @"\01LC", i32 0, i32 0), i8* %buf2) nounwind ; [#uses=0] ++ br label %return ++ ++return: ; preds = %entry ++ ret void ++} ++ ++declare i8* @strcpy(i8*, i8*) nounwind ++ ++declare i32 @printf(i8*, ...) nounwind +--- a/test/CodeGen/X86/stack-protector.ll ++++ b/test/CodeGen/X86/stack-protector.ll +@@ -0,0 +1,25 @@ ++; RUN: llc -march=x86 < %s -o - | grep {__stack_chk_guard} ++; RUN: llc -march=x86 < %s -o - | grep {__stack_chk_fail} ++ ++@"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00" ; <[11 x i8]*> [#uses=1] ++ ++define void @test(i8* %a) nounwind ssp { ++entry: ++ %a_addr = alloca i8* ; [#uses=2] ++ %buf = alloca [8 x i8] ; <[8 x i8]*> [#uses=2] ++ %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] ++ store i8* %a, i8** %a_addr ++ %buf1 = bitcast [8 x i8]* %buf to i8* ; [#uses=1] ++ %0 = load i8** %a_addr, align 4 ; [#uses=1] ++ %1 = call i8* @strcpy(i8* %buf1, i8* %0) nounwind ; [#uses=0] ++ %buf2 = bitcast [8 x i8]* %buf to i8* ; [#uses=1] ++ %2 = call i32 (i8*, ...)* @printf(i8* getelementptr ([11 x i8]* @"\01LC", i32 0, i32 0), i8* %buf2) nounwind ; [#uses=0] ++ br label %return ++ ++return: ; preds = %entry ++ ret void ++} ++ ++declare i8* @strcpy(i8*, i8*) nounwind ++ ++declare i32 @printf(i8*, ...) nounwind +--- a/test/CodeGen/Generic/stack-protector.ll ++++ b/test/CodeGen/Generic/stack-protector.ll +@@ -1,25 +0,0 @@ +-; RUN: llc < %s -o - | grep {__stack_chk_guard} +-; RUN: llc < %s -o - | grep {__stack_chk_fail} +- +-@"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00" ; <[11 x i8]*> [#uses=1] +- +-define void @test(i8* %a) nounwind ssp { +-entry: +- %a_addr = alloca i8* ; [#uses=2] +- %buf = alloca [8 x i8] ; <[8 x i8]*> [#uses=2] +- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] +- store i8* %a, i8** %a_addr +- %buf1 = bitcast [8 x i8]* %buf to i8* ; [#uses=1] +- %0 = load i8** %a_addr, align 4 ; [#uses=1] +- %1 = call i8* @strcpy(i8* %buf1, i8* %0) nounwind ; [#uses=0] +- %buf2 = bitcast [8 x i8]* %buf to i8* ; [#uses=1] +- %2 = call i32 (i8*, ...)* @printf(i8* getelementptr ([11 x i8]* @"\01LC", i32 0, i32 0), i8* %buf2) nounwind ; [#uses=0] +- br label %return +- +-return: ; preds = %entry +- ret void +-} +- +-declare i8* @strcpy(i8*, i8*) nounwind +- +-declare i32 @printf(i8*, ...) nounwind +--- a/include/llvm/Target/TargetLowering.h ++++ b/include/llvm/Target/TargetLowering.h +@@ -749,6 +749,14 @@ + /// getFunctionAlignment - Return the Log2 alignment of this function. + virtual unsigned getFunctionAlignment(const Function *) const = 0; + ++ /// getStackCookieLocation - Return true if the target stores stack ++ /// protector cookies at a fixed offset in some non-standard address ++ /// space, and populates the address space and offset as ++ /// appropriate. ++ virtual bool getStackCookieLocation(unsigned &AddressSpace, unsigned &Offset) const { ++ return false; ++ } ++ + //===--------------------------------------------------------------------===// + // TargetLowering Optimization Methods + // +--- a/lib/CodeGen/StackProtector.cpp ++++ b/lib/CodeGen/StackProtector.cpp +@@ -136,7 +136,7 @@ + bool StackProtector::InsertStackProtectors() { + BasicBlock *FailBB = 0; // The basic block to jump to if check fails. + AllocaInst *AI = 0; // Place on stack that stores the stack guard. +- Constant *StackGuardVar = 0; // The stack guard variable. ++ Value *StackGuardVar = 0; // The stack guard variable. + + for (Function::iterator I = F->begin(), E = F->end(); I != E; ) { + BasicBlock *BB = I++; +@@ -155,8 +155,21 @@ + // + PointerType *PtrTy = PointerType::getUnqual( + Type::getInt8Ty(RI->getContext())); +- StackGuardVar = M->getOrInsertGlobal("__stack_chk_guard", PtrTy); + ++ unsigned AddressSpace, Offset; ++ if (TLI->getStackCookieLocation(AddressSpace, Offset)) { ++ Constant *ASPtr = Constant::getNullValue( ++ PointerType::get(Type::getInt8Ty(RI->getContext()), AddressSpace)); ++ APInt OffsetInt(32, Offset); ++ Constant *OffsetVal = Constant::getIntegerValue( ++ Type::getInt32Ty(RI->getContext()), OffsetInt); ++ StackGuardVar = ConstantExpr::getPointerCast( ++ ConstantExpr::getGetElementPtr(ASPtr, &OffsetVal, 1), ++ PointerType::get(PtrTy, AddressSpace)); ++ } else { ++ StackGuardVar = M->getOrInsertGlobal("__stack_chk_guard", PtrTy); ++ } ++ + BasicBlock &Entry = F->getEntryBlock(); + Instruction *InsPt = &Entry.front(); + +--- a/lib/Target/X86/X86ISelLowering.cpp ++++ b/lib/Target/X86/X86ISelLowering.cpp +@@ -1189,6 +1189,27 @@ + return F->hasFnAttr(Attribute::OptimizeForSize) ? 0 : 4; + } + ++bool X86TargetLowering::getStackCookieLocation(unsigned &AddressSpace, ++ unsigned &Offset) const { ++ if (!Subtarget->isTargetLinux()) ++ return false; ++ ++ if (Subtarget->is64Bit()) { ++ // %fs:0x28, unless we're using a Kernel code model, in which case it's %gs: ++ Offset = 0x28; ++ if (getTargetMachine().getCodeModel() == CodeModel::Kernel) ++ AddressSpace = 256; ++ else ++ AddressSpace = 257; ++ } else { ++ // %gs:0x14 on i386 ++ Offset = 0x14; ++ AddressSpace = 256; ++ } ++ return true; ++} ++ ++ + //===----------------------------------------------------------------------===// + // Return Value Calling Convention Implementation + //===----------------------------------------------------------------------===// +--- a/lib/Target/X86/X86ISelLowering.h ++++ b/lib/Target/X86/X86ISelLowering.h +@@ -593,6 +593,12 @@ + /// getFunctionAlignment - Return the Log2 alignment of this function. + virtual unsigned getFunctionAlignment(const Function *F) const; + ++ /// getStackCookieLocation - Return true if the target stores stack ++ /// protector cookies at a fixed offset in some non-standard address ++ /// space, and populates the address space and offset as ++ /// appropriate. ++ virtual bool getStackCookieLocation(unsigned &AddressSpace, unsigned &Offset) const; ++ + private: + /// Subtarget - Keep a pointer to the X86Subtarget around so that we can + /// make the right decision when generating code for different targets. --- llvm-2.7-2.7.orig/debian/patches/0008-path-eraseFromDisk.patch +++ llvm-2.7-2.7/debian/patches/0008-path-eraseFromDisk.patch @@ -0,0 +1,38 @@ +--- + Path.inc | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +--- a/lib/System/Unix/Path.inc ++++ b/lib/System/Unix/Path.inc +@@ -60,6 +60,10 @@ + #include + #endif + ++#if HAVE_UNISTD_H ++#include ++#endif ++ + // Put in a hack for Cygwin which falsely reports that the mkdtemp function + // is available when it is not. + #ifdef __CYGWIN__ +@@ -760,9 +764,18 @@ + } + + if (remove_contents) { ++ int rv; + // Recursively descend the directory to remove its contents. +- std::string cmd = "/bin/rm -rf " + path; +- if (system(cmd.c_str()) != 0) { ++ switch (fork()) { ++ case -1: ++ return MakeErrMsg(ErrStr, path + ": failed to fork (recursively removing directory)."); ++ case 0: ++ execl("/bin/rm", "/bin/rm", "-rf", "--", path.c_str(), (char *) 0); ++ exit(1); ++ default: ++ wait(&rv); ++ } ++ if (rv != 0) { + MakeErrMsg(ErrStr, path + ": failed to recursively remove directory."); + return true; + } --- llvm-2.7-2.7.orig/debian/patches/0005-Disable-llvm-stub.patch +++ llvm-2.7-2.7/debian/patches/0005-Disable-llvm-stub.patch @@ -0,0 +1,15 @@ +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -20,7 +20,7 @@ + llc llvm-ranlib llvm-ar llvm-nm \ + llvm-ld llvm-prof llvm-link \ + lli llvm-extract \ +- bugpoint llvm-bcanalyzer llvm-stub \ ++ bugpoint llvm-bcanalyzer \ + llvm-mc llvmc + + --- llvm-2.7-2.7.orig/debian/patches/0011-gcc-4.4-thumb.patch +++ llvm-2.7-2.7/debian/patches/0011-gcc-4.4-thumb.patch @@ -0,0 +1,13 @@ +--- + Makefile | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/lib/ExecutionEngine/Interpreter/Makefile ++++ b/lib/ExecutionEngine/Interpreter/Makefile +@@ -11,3 +11,6 @@ + LIBRARYNAME = LLVMInterpreter + + include $(LEVEL)/Makefile.common ++ ++CXX.Flags += -Os ++C.Flags += -Os --- llvm-2.7-2.7.orig/debian/patches/0001-Update-configure-script-for-kfreebsd-gnu-and-hurd.patch +++ llvm-2.7-2.7/debian/patches/0001-Update-configure-script-for-kfreebsd-gnu-and-hurd.patch @@ -0,0 +1,27 @@ +--- + configure | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/configure ++++ b/configure +@@ -2146,7 +2146,7 @@ + llvm_cv_no_link_all_option="-Wl,-noall_load" + llvm_cv_os_type="Darwin" + llvm_cv_platform_type="Unix" ;; +- *-*-freebsd*) ++ *-*-freebsd* | *-*-kfreebsd-gnu) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="FreeBSD" +@@ -2181,6 +2181,11 @@ + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Linux" + llvm_cv_platform_type="Unix" ;; ++ *-*-gnu*) ++ llvm_cv_link_all_option="-Wl,--whole-archive" ++ llvm_cv_no_link_all_option="-Wl,--no-whole-archive" ++ llvm_cv_os_type="GNU" ++ llvm_cv_platform_type="Unix" ;; + *-*-solaris*) + llvm_cv_link_all_option="-Wl,-z,allextract" + llvm_cv_no_link_all_option="-Wl,-z,defaultextract" --- llvm-2.7-2.7.orig/debian/patches/0043-r104652-VFPLoadStoreMultiple.patch +++ llvm-2.7-2.7/debian/patches/0043-r104652-VFPLoadStoreMultiple.patch @@ -0,0 +1,51 @@ +--- + ARMCodeEmitter.cpp | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +--- a/lib/Target/ARM/ARMCodeEmitter.cpp ++++ b/lib/Target/ARM/ARMCodeEmitter.cpp +@@ -146,11 +146,11 @@ + return getMachineOpValue(MI, MI.getOperand(OpIdx)); + } + +- /// getMovi32Value - Return binary encoding of operand for movw/movt. If the ++ /// getMovi32Value - Return binary encoding of operand for movw/movt. If the + /// machine operand requires relocation, record the relocation and return zero. +- unsigned getMovi32Value(const MachineInstr &MI,const MachineOperand &MO, ++ unsigned getMovi32Value(const MachineInstr &MI,const MachineOperand &MO, + unsigned Reloc); +- unsigned getMovi32Value(const MachineInstr &MI, unsigned OpIdx, ++ unsigned getMovi32Value(const MachineInstr &MI, unsigned OpIdx, + unsigned Reloc) { + return getMovi32Value(MI, MI.getOperand(OpIdx), Reloc); + } +@@ -227,12 +227,12 @@ + return 0; + } + +-/// getMovi32Value - Return binary encoding of operand for movw/movt. If the ++/// getMovi32Value - Return binary encoding of operand for movw/movt. If the + /// machine operand requires relocation, record the relocation and return zero. + unsigned ARMCodeEmitter::getMovi32Value(const MachineInstr &MI, +- const MachineOperand &MO, ++ const MachineOperand &MO, + unsigned Reloc) { +- assert(((Reloc == ARM::reloc_arm_movt) || (Reloc == ARM::reloc_arm_movw)) ++ assert(((Reloc == ARM::reloc_arm_movt) || (Reloc == ARM::reloc_arm_movw)) + && "Relocation to this function should be for movt or movw"); + + if (MO.isImm()) +@@ -1459,7 +1459,12 @@ + break; + ++NumRegs; + } +- Binary |= NumRegs * 2; ++ // Bit 8 will be set if is consecutive 64-bit registers (e.g., D0) ++ // Otherwise, it will be 0, in the case of 32-bit registers. ++ if(Binary & 0x100) ++ Binary |= NumRegs * 2; ++ else ++ Binary |= NumRegs; + + emitWordLE(Binary); + } --- llvm-2.7-2.7.orig/debian/patches/0023-link-libopagent.patch +++ llvm-2.7-2.7/debian/patches/0023-link-libopagent.patch @@ -0,0 +1,35 @@ +--- + configure | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/configure ++++ b/configure +@@ -14140,7 +14140,7 @@ + CPPFLAGS="-I${withval}/include";; + esac + if test -n "$llvm_cv_oppath" ; then +- LIBS="$LIBS -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}" ++ #LIBS="$LIBS -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}" + { echo "$as_me:$LINENO: checking for library containing bfd_init" >&5 + echo $ECHO_N "checking for library containing bfd_init... $ECHO_C" >&6; } + if test "${ac_cv_search_bfd_init+set}" = set; then +@@ -14236,7 +14236,7 @@ + echo "${ECHO_T}$ac_cv_search_bfd_init" >&6; } + ac_res=$ac_cv_search_bfd_init + if test "$ac_res" != no; then +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++ test "$ac_res" = "none required" || true + + fi + +@@ -14272,8 +14272,8 @@ + if test -z "$ac_lib"; then + ac_res="none required" + else +- ac_res=-l$ac_lib +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ ac_res="-Wl,--as-needed -l$ac_lib -Wl,--no-as-needed" ++ LIBS="-Wl,--as-needed -l$ac_lib -Wl,--no-as-needed $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" --- llvm-2.7-2.7.orig/debian/patches/0010-r109125.patch +++ llvm-2.7-2.7/debian/patches/0010-r109125.patch @@ -0,0 +1,62 @@ +--- + ARMCodeEmitter.cpp | 10 ++++++++++ + ARMInstrInfo.td | 8 ++++---- + 2 files changed, 14 insertions(+), 4 deletions(-) + +--- a/lib/Target/ARM/ARMInstrInfo.td ++++ b/lib/Target/ARM/ARMInstrInfo.td +@@ -961,7 +961,7 @@ + + // ARMv4T + // Note: Restrict $func to the tGPR regclass to prevent it being in LR. +- def BX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), ++ def BX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), + IIC_Br, "mov\tlr, pc\n\tbx\t$func", + [(ARMcall_nolink tGPR:$func)]>, + Requires<[IsARM, HasV4T, IsNotDarwin]> { +@@ -971,7 +971,7 @@ + } + + // ARMv4 +- def BMOVPCRX : ABXIx2<(outs), (ins tGPR:$func, variable_ops), ++ def BMOVPCRX : PseudoInst<(outs), (ins tGPR:$func, variable_ops), + IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", + [(ARMcall_nolink tGPR:$func)]>, + Requires<[IsARM, NoV4T, IsNotDarwin]> { +@@ -1010,7 +1010,7 @@ + + // ARMv4T + // Note: Restrict $func to the tGPR regclass to prevent it being in LR. +- def BXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), ++ def BXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), + IIC_Br, "mov\tlr, pc\n\tbx\t$func", + [(ARMcall_nolink tGPR:$func)]>, + Requires<[IsARM, HasV4T, IsDarwin]> { +@@ -1020,7 +1020,7 @@ + } + + // ARMv4 +- def BMOVPCRXr9 : ABXIx2<(outs), (ins tGPR:$func, variable_ops), ++ def BMOVPCRXr9 : PseudoInst<(outs), (ins tGPR:$func, variable_ops), + IIC_Br, "mov\tlr, pc\n\tmov\tpc, $func", + [(ARMcall_nolink tGPR:$func)]>, + Requires<[IsARM, NoV4T, IsDarwin]> { +--- a/lib/Target/ARM/ARMCodeEmitter.cpp ++++ b/lib/Target/ARM/ARMCodeEmitter.cpp +@@ -552,6 +552,16 @@ + switch (Opcode) { + default: + llvm_unreachable("ARMCodeEmitter::emitPseudoInstruction"); ++ case ARM::BX: ++ case ARM::BMOVPCRX: ++ case ARM::BXr9: ++ case ARM::BMOVPCRXr9: { ++ // First emit mov lr, pc ++ emitWordLE(0xe1a0e00f); ++ // and then emit the branch. ++ emitMiscBranchInstruction(MI); ++ break; ++ } + // FIXME: Add support for MOVimm32. + case TargetOpcode::INLINEASM: { + // We allow inline assembler nodes with empty bodies - they can --- llvm-2.7-2.7.orig/debian/patches/0009-Fix-doclinks.patch +++ llvm-2.7-2.7/debian/patches/0009-Fix-doclinks.patch @@ -0,0 +1,57 @@ +--- + index.html | 38 +++++++++++++++++++------------------- + 1 file changed, 19 insertions(+), 19 deletions(-) + +--- a/docs/index.html ++++ b/docs/index.html +@@ -70,31 +70,31 @@ + Microsoft Visual Studio - An addendum to the main Getting Started guide for + those using Visual Studio on Windows. + +-
  • LLVM Tutorial - A walk through the process of using ++
  • LLVM Tutorial - A walk through the process of using + LLVM for a custom language, and the facilities LLVM offers in tutorial form.
  • +
  • Developer Policy - The LLVM project's + policy towards developers and their contributions.
  • + +-
  • LLVM Command Guide - A reference ++
  • LLVM Command Guide - A reference + manual for the LLVM command line utilities ("man" pages for LLVM tools).
    + Current tools: +- llvm-ar, +- llvm-as, +- llvm-dis, +- llvm-extract, +- llvm-ld, +- llvm-link, +- llvm-nm, +- llvm-prof, +- llvm-ranlib, +- opt, +- llc, +- lli, +- llvmc +- llvm-gcc, +- llvm-g++, +- bugpoint, +- llvm-bcanalyzer, ++ llvm-ar, ++ llvm-as, ++ llvm-dis, ++ llvm-extract, ++ llvm-ld, ++ llvm-link, ++ llvm-nm, ++ llvm-prof, ++ llvm-ranlib, ++ opt, ++ llc, ++ lli, ++ llvmc ++ llvm-gcc, ++ llvm-g++, ++ bugpoint, ++ llvm-bcanalyzer, +
  • + +
  • LLVM's Analysis and Transform Passes - A list of --- llvm-2.7-2.7.orig/debian/patches/0032-x86-fast-isel-fs-load.patch +++ llvm-2.7-2.7/debian/patches/0032-x86-fast-isel-fs-load.patch @@ -0,0 +1,28 @@ +--- + lib/Target/X86/X86FastISel.cpp | 5 +++++ + test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll | 6 ++++++ + 2 files changed, 11 insertions(+) + +--- a/test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll ++++ b/test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll +@@ -0,0 +1,6 @@ ++; RUN: llc -fast-isel -march=x86 < %s | grep %fs: ++ ++define i32 @test1(i32 addrspace(257)* %arg) nounwind { ++ %tmp = load i32 addrspace(257)* %arg ++ ret i32 %tmp ++} +--- a/lib/Target/X86/X86FastISel.cpp ++++ b/lib/Target/X86/X86FastISel.cpp +@@ -349,6 +349,11 @@ + U = C; + } + ++ if (const PointerType *Ty = dyn_cast(V->getType())) ++ if (Ty->getAddressSpace() > 255) ++ // Fast instruction selection doesn't support pointers through %fs or %gs ++ return false; ++ + switch (Opcode) { + default: break; + case Instruction::BitCast: --- llvm-2.7-2.7.orig/debian/patches/0003-Debian-version-info-and-bugreport.patch +++ llvm-2.7-2.7/debian/patches/0003-Debian-version-info-and-bugreport.patch @@ -0,0 +1,39 @@ +--- + configure | 2 +- + lib/Support/CommandLine.cpp | 3 +++ + lib/Support/Makefile | 3 +++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +--- a/configure ++++ b/configure +@@ -563,7 +563,7 @@ + PACKAGE_TARNAME='-llvm-' + PACKAGE_VERSION='2.7' + PACKAGE_STRING='llvm 2.7' +-PACKAGE_BUGREPORT='llvmbugs@cs.uiuc.edu' ++PACKAGE_BUGREPORT='pkg-llvm-team@lists.alioth.debian.org' + + ac_unique_file="lib/VMCore/Module.cpp" + # Factoring default headers for most tests. +--- a/lib/Support/Makefile ++++ b/lib/Support/Makefile +@@ -14,4 +14,7 @@ + ## FIXME: This only requires RTTI because tblgen uses it. Fix that. + REQUIRES_RTTI = 1 + ++# -DLLVM_DEBIAN_INFO='" ($(OS) $(VERSION))"' ++CPP.Flags = $(DebianOpts) ++ + include $(LEVEL)/Makefile.common +--- a/lib/Support/CommandLine.cpp ++++ b/lib/Support/CommandLine.cpp +@@ -1158,6 +1158,9 @@ + #ifdef LLVM_VERSION_INFO + OS << LLVM_VERSION_INFO; + #endif ++#ifdef LLVM_DEBIAN_INFO ++ OS << LLVM_DEBIAN_INFO; ++#endif + OS << "\n "; + #ifndef __OPTIMIZE__ + OS << "DEBUG build"; --- llvm-2.7-2.7.orig/debian/packages.d/tools.mk +++ llvm-2.7-2.7/debian/packages.d/tools.mk @@ -0,0 +1,44 @@ +builds := $(PKGNAME) + +ifeq (,$(filter $(PKGNAME),$(tools))) + $(error unsupported tool) +endif + +BUILDDEPS := \ + llvm-$(UVERSION)-dev (>= $(dev_version)), llvm-$(UVERSION)-source (>= $(dev_version)) +BUILDCONFLICTS := ocaml, ocaml-nox + +PF := /usr + +patchdirs := /usr/src/llvm-$(UVERSION)/patches + +export CCACHE_READONLY=1 + +$(PKGNAME)_packages := $(PKGNAME) + +$(PKGNAME)_confargs := $(confargs) \ + --prefix=$(PF) --disable-assertions \ + --enable-optimized --with-optimize-option=' $(opt_flags)' --enable-pic --enable-libffi + +$(PKGNAME)_MAKEOPTS := $(MAKEOPTS) \ + VERBOSE=1 \ + DebianOpts="-DLLVM_DEBIAN_INFO='\" ($(OS) $(VERSION))\"'" \ + ONLY_TOOLS="$(PKGNAME)" + +# FIXME: Should separe MAJOR/UVERSION. +tarpath := $(firstword $(wildcard $(D)/llvm-$(UVERSION)*.tar.* \ + /usr/src/llvm-$(UVERSION)/llvm-$(UVERSION)*.tar.*)) +tarball := $(notdir $(tarpath)) +srcdir := $(subst -dfsg,,$(subst .tar$(suffix $(tarball)),,$(tarball))) + +define $(PKGNAME)_extra_unpack + rm -rf $(D)/debian/ccache ; \ + if test -f $(PF)/lib/llvm-$(UVERSION)/build/ccache.$(DEB_HOST_ARCH).tar.lzma ; then \ + lzcat $(PF)/lib/llvm-$(UVERSION)/build/ccache.$(DEB_HOST_ARCH).tar.lzma | tar -C $(D)/debian -x -f - ; \ + fi ; \ + test ! "x$(srcdir)" = "x." || exit 1 ; \ + for tool in $(notdir $(wildcard $(D)/tools/*)) ; do \ + rm -rf $(D)/$(srcdir)/tools/$$tool ; \ + ln -sf $(D)/tools/$$tool $(D)/$(srcdir)/tools/$$tool ; \ + done +endef --- llvm-2.7-2.7.orig/debian/packages.d/llvm-snapshot.mk +++ llvm-2.7-2.7/debian/packages.d/llvm-snapshot.mk @@ -0,0 +1,56 @@ +builds := llvm + +BUILDDEPS := ocaml-nox (>= 3.11.2), ocaml-best-compilers | ocaml-nox, \ + dh-ocaml (>= 0.9.1) + +PF := /usr/lib/llvm-snapshot + +include /usr/share/ocaml/ocamlvars.mk + +llvm_packages := llvm-snapshot + +# assertions are not disabled for snapshot builds +llvm_confargs := $(confargs) \ + --prefix=$(PF) \ + --enable-optimized --with-optimize-option=' $(opt_flags)' --enable-pic --enable-libffi \ + --with-ocaml-libdir=$(OCAML_STDLIB_DIR)/llvm-$(UVERSION) + +llvm_MAKEOPTS := $(MAKEOPTS) \ + VERBOSE=1 \ + DebianOpts="-DLLVM_DEBIAN_INFO='\" ($(OS) $(VERSION))\"'" + +# run testsuite +llvm_check := yes + +llvm_MAKECHECKOPTS := $(MAKEOPTS) \ + VERBOSE=1 \ + PATH="$(D)/build-llvm/Release/bin:$(srcdir)/test/Scripts:/usr/bin:/bin" + +define llvm-snapshot_extra_binary + if test "x$*" = "xllvm-snapshot" ; then \ + sed -r 's/^(my\s+\$$LLVM_SRC_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/bin/llvm-config ; \ + sed -r 's/^(my\s+\$$LLVM_OBJ_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/bin/llvm-config ; \ + sed -r 's/^(LLVM_SRC_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile.config ; \ + sed -r 's/^(LLVM_OBJ_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile.config ; \ + sed -r "s/^(ac_pwd\=)'.*'$$/\1'$(subst /,\/,$(PF))\/build'/" \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/config.status ; \ + find $(D)/debian/$(strip $(call pkgname,$*)) -type f -name "LICENSE.TXT" | xargs $(RM) ; \ + if test "x$(llvm_check)" = "xyes" ; then \ + install -m 0644 $(D)/build-llvm/test/testrun.sum \ + $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/ ; \ + echo >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + echo "Compiler version: $(shell $(DEB_HOST_GNU_TYPE)-gcc -dumpversion) (GCC)" \ + >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + echo "Platform: $(DEB_HOST_GNU_TYPE)" \ + >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + echo "configure flags: $(llvm_confargs)" \ + >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + gzip -9nf $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + fi ; \ + fi +endef + --- llvm-2.7-2.7.orig/debian/packages.d/llvm.mk +++ llvm-2.7-2.7/debian/packages.d/llvm.mk @@ -0,0 +1,160 @@ +builds := llvm + +# packages which don't need the builds +extra_packages := llvm-source + +ifneq (,$(findstring $(DEB_HOST_GNU_CPU),ia64)) + $(error unsupported processor) +endif + +BUILDDEPS := \ + ocaml-nox (>= 3.11.2), ocaml-best-compilers | ocaml-nox, \ + dh-ocaml (>= 0.9.1) + + +#ifeq (yes,$(shell dpkg --compare-versions $(VERSION) gt $(UVERSION)-1 && echo yes)) +# llvm-priv-dev_version := $(UVERSION)-$(shell expr $(subst $(UVERSION)-,,$(VERSION)) - 1) +# BUILDDEPS := llvm-$(UVERSION)-priv-dev (>= $(llvm-priv-dev_version)), $(BUILDDEPS) +#endif + +# build with RTTI +export REQUIRES_RTTI=1 + +include /usr/share/ocaml/ocamlvars.mk + +llvm_packages := \ + llvm llvm-runtime llvm-dev \ + libllvm-ocaml-dev \ + llvm-doc llvm-examples + +llvm_confargs := $(confargs) \ + --prefix=$(PF) --disable-assertions \ + --enable-optimized --with-optimize-option=' $(opt_flags)' --enable-pic --enable-libffi \ + --with-ocaml-libdir=$(OCAML_STDLIB_DIR)/llvm-$(UVERSION) + +ifeq ($(with_shared),yes) + llvm_packages := libllvm$(pkg_version) $(llvm_packages) + llvm_confargs += --enable-shared +endif + +llvm_MAKEOPTS := $(MAKEOPTS) \ + VERBOSE=1 \ + DebianOpts="-DLLVM_DEBIAN_INFO='\" ($(OS) $(VERSION))\"'" + +# run testsuite +llvm_check := yes + +llvm_MAKECHECKOPTS := $(MAKEOPTS) \ + VERBOSE=1 \ + PATH="$(D)/build-llvm/Release-Asserts/bin:$(srcdir)/test/Scripts:/usr/bin:/bin" + +ifeq (0,1) +define llvm_extra_unpack + rm -rf $(D)/debian/ccache ; \ + if test -f $(PF)/build/ccache.$(DEB_HOST_ARCH).tar.lzma ; then \ + lzcat $(PF)/build/ccache.$(DEB_HOST_ARCH).tar.lzma | tar -C $(D)/debian -x -f - ; \ + fi ; \ + if ! test "x$$($(DEB_HOST_GNU_TYPE)-g++ --version | head -n 1)" = "x$$(cat $(D)/debian/ccache/version 2>/dev/null)" ; then \ + echo "Clearing the cache." && \ + $(RM) -r $(D)/debian/ccache && \ + mkdir $(D)/debian/ccache && \ + $(DEB_HOST_GNU_TYPE)-g++ --version | head -n 1 > $(D)/debian/ccache/version ; \ + fi ; \ + ccache -c +endef +endif + +define llvm_extra_install + if test "x$*-$(with_shared)" = "xllvm-yes" ; then \ + mv $(D)/debian/tmp-llvm/$(PF)/lib/$(shlib_name).so \ + $(D)/debian/tmp-llvm/usr/lib/$(shlib_name).so.1 ; \ + fi +endef + +define llvm-runtime_extra_binary + if test "x$*" = "xllvm-runtime" ; then \ + mv $(D)/debian/$(strip $(call pkgname,$*))/usr/share/binfmts/llvm.binfmt \ + $(D)/debian/$(strip $(call pkgname,$*))/usr/share/binfmts/llvm-$(UVERSION).binfmt ; \ + fi +endef + +define llvm_extra_binary + if test "x$*" = "xllvm" ; then \ + find $(D)/debian/$(strip $(call pkgname,$*)) ! -type d -name "lli*" | xargs $(RM) ; \ + sed -r 's/^(my\s+\$$LLVM_SRC_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/bin/llvm-config ; \ + sed -r 's/^(my\s+\$$LLVM_OBJ_ROOT\s+=\s+q)\{(.*)\}\;$$/\1\{$(subst /,\/,$(PF))\/build\}\;/' \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/bin/llvm-config ; \ + if test "x$(llvm_check)" = "xyes" ; then \ + install -m 0644 $(D)/build-llvm/test/testrun.sum \ + $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/ ; \ + echo >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + echo "Compiler version: $(shell $(DEB_HOST_GNU_TYPE)-gcc -dumpversion) (GCC)" \ + >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + echo "Platform: $(DEB_HOST_GNU_TYPE)" \ + >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + echo "configure flags: $(llvm_confargs)" \ + >> $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + gzip -9nf $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/testrun.sum ; \ + fi ; \ + fi +endef + +define llvm-dev_extra_binary + if test "x$*" = "xllvm-dev" ; then\ + find $(D)/debian/$(strip $(call pkgname,$*)) ! -type d -name "libLLVM-2.7.so.*" | xargs $(RM) ; \ + for i in llvm llvm-c ; do \ + mv $(D)/debian/$(strip $(call pkgname,$*))/usr/include/$$i \ + $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/include/$$i ; \ + done ; rm -rf $(D)/debian/$(strip $(call pkgname,$*))/usr/include ; \ + for i in $$(ls $(D)/debian/$(strip $(call pkgname,$*))/usr/share/vim/addons/plugin/*.vim 2>/dev/null || echo -n) ; do \ + mv $$i $$(echo $$i | sed -r 's/(\.vim)$$/-2\.7\1/g') ; \ + done ; \ + sed -r 's/^(LLVM_SRC_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile.config ; \ + sed -r 's/^(LLVM_OBJ_ROOT\s+\:\=\s+\$$\(shell cd).*\; \$$\(PWD\)\)$$/\1 $(subst /,\/,$(PF))\/build \; \$$\(PWD\)\)/' \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile.config ; \ + sed -r "s/^(ac_pwd\=)'.*'$$/\1'$(subst /,\/,$(PF))\/build'/" \ + -i $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/config.status ; \ + chmod 644 $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/Makefile* ; \ + find $(D)/debian/$(strip $(call pkgname,$*)) -type f -name "LICENSE.TXT" | xargs $(RM) ; \ + cp $(D)/utils/vim/README $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/README.vim ; \ + cp $(D)/utils/emacs/README $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/README.emacs ; \ + sed -r 's/path-to-llvm\/utils\/emacs/\/usr\/share\/emacs\/site-lisp\/llvm-$(UVERSION)/' \ + -i $(D)/debian/$(strip $(call pkgname,$*))/usr/share/doc/$(strip $(call pkgname,$*))/README.emacs ; \ + fi +endef + +define llvm-priv-dev_extra_binary + if test "x$*" = "xllvm-priv-dev" ; then \ + ccache -c ; \ + cp -r $(D)/debian/ccache $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/ ; \ + cd $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/ && \ + tar cf ccache.$(DEB_HOST_ARCH).tar ccache && \ + lzma --best ccache.$(DEB_HOST_ARCH).tar ; \ + cd $(D) ; \ + $(RM) -r $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/build/ccache ; \ + fi +endef + +# FIXME: Should separe MAJOR/UVERSION. +define llvm-source_extra_binary + if test "x$*" = "xllvm-source" ; then \ + $(RM) -r $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION) ; \ + mkdir -p $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION) ; \ + cp -f ../$(PKGNAME)-$(UVERSION)_$(UVERSION).orig.tar.gz \ + $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION)/$(PKGNAME)-$(UVERSION).tar.gz ; \ + gunzip $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION)/$(PKGNAME)-$(UVERSION).tar.gz ; \ + lzma $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION)/$(PKGNAME)-$(UVERSION).tar ; \ + cp -r $(D)/debian/patches $(D)/debian/$(strip $(call pkgname,$*))/usr/src/llvm-$(UVERSION)/ ; \ + fi +endef + +define libllvm-ocaml-dev_extra_binary + if test "x$*" = "xlibllvm-ocaml-dev" ; then \ + dh_ocaml -p$(call pkgname,$*) ; \ + cp $(D)/debian/$(strip $(call pkgname,$*)).META \ + $(D)/debian/$(strip $(call pkgname,$*))/$(OCAML_STDLIB_DIR)/METAS/META.llvm-$(UVERSION) ; \ + fi +endef + --- llvm-2.7-2.7.orig/debian/packages.d/llvm-gcc-4.2.mk +++ llvm-2.7-2.7/debian/packages.d/llvm-gcc-4.2.mk @@ -0,0 +1,32 @@ +builds := llvm-gcc + +BUILDDEPS := llvm-$(UVERSION)-dev (>= $(dev_version)) +BUILDCONFLICTS := ocaml, ocaml-nox + +llvm-gcc_packages := llvm-gcc-4.2 + +llvm-gcc_confargs := $(confargs) \ + --prefix=$(PF)/gcc-$(gcc_version) --enable-llvm=$(PF) \ + --enable-languages=c,c++ --program-prefix=llvm- \ + --enable-threads --disable-nls --disable-shared \ + --disable-multilib --with-pic + +check_archs := amd64 i386 +ifneq (,$(filter $(DEB_HOST_ARCH),$(check_archs))) + llvm-gcc_check := yes +endif + +tarpath := $(firstword $(wildcard $(D)/llvm-gcc-$(gcc_version)-$(UVERSION)*.tar.* \ + /usr/src/llvm/llvm-gcc-$(gcc_version)-$(UVERSION)*.tar.*)) +tarball := $(notdir $(tarpath)) +srcdir := $(subst -dfsg,,$(subst .tar$(suffix $(tarball)),,$(tarball))) + +define llvm-gcc-4.2_extra_binary + if test "x$*" = "xllvm-gcc-4.2" ; then \ + $(RM) $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/gcc-$(gcc_version)/bin/*-$(gcc_version).* ; \ + for i in $$(ls $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/gcc-$(gcc_version)/bin) ; do \ + echo "$(PF)/gcc-$(gcc_version)/bin/$$i usr/bin/$$i-$(gcc_version)" >> $(D)/debian/$(strip $(call pkgname,$*)).links ; \ + done ; \ + fi +endef + --- llvm-2.7-2.7.orig/debian/rules.d/unpack.mk +++ llvm-2.7-2.7/debian/rules.d/unpack.mk @@ -0,0 +1,54 @@ +unpack: $(unpack-stamp) +$(unpack-stamp): $(addprefix $(unpack-stamp)-,$(tarball)) + mkdir -p $(@D) + $(call $(PKGNAME)_extra_unpack) + touch $@ + +$(unpack-stamp)-%: + test -d $(stampdir) || mkdir $(stampdir) + if ! test -z "$(tarball)" ; then \ + $(RM) -r $(srcdir) ; \ + case $(tarball) in \ + *.bz2) tar -x --bzip2 -f $(tarpath);; \ + *.gz) tar -x --gzip -f $(tarpath);; \ + *.lzma) lzcat $(tarpath) | tar -x -f -;; \ + *) false;; \ + esac ; \ + fi + touch $@ + +patches := $(foreach patchdir,$(patchdirs),$(wildcard $(patchdir)/*.patch)) + +patches_rev := # nothing +$(foreach patch,$(patches),$(eval patches_rev := $(patch) $(patches_rev))) + +patch: $(patch-stamp) +$(patch-stamp): $(unpack-stamp) + test -d $(stampdir)/patches || mkdir -p $(stampdir)/patches + cd $(srcdir) && for patch in $(patches) ; do \ + if ! test -f $(stampdir)/patches/$$(echo $$patch | tr "/" "_") ; \ + then echo "Applying patch: $$patch" && patch -p1 < $$patch ; \ + test $$? = 0 || exit 1 ; \ + touch $(stampdir)/patches/$$(echo $$patch | tr "/" "_") ; \ + echo ; \ + fi ; \ + done + touch $@ + +unpatch: + test -d $(stampdir)/patches || mkdir -p $(stampdir)/patches + test -z "$(tarball)" || (test -d $(srcdir) || mkdir $(srcdir)) + cd $(srcdir) && for patch in $(patches_rev) ; do \ + if test -f $(stampdir)/patches/$$(echo $$patch | tr "/" "_") ; \ + then echo "Reverting patch: $$patch" && patch -p1 -R < $$patch ; \ + test $$? = 0 || exit 1 ; \ + $(RM) $(stampdir)/patches/$$(echo $$patch | tr "/" "_") ; \ + echo ; \ + fi ; \ + done + $(RM) -r $(stampdir)/patches + $(RM) $(patch-stamp) + +clean: unpatch + +.PHONY: clean unpack patch unpatch --- llvm-2.7-2.7.orig/debian/rules.d/binary.mk +++ llvm-2.7-2.7/debian/rules.d/binary.mk @@ -0,0 +1,80 @@ +binary-indep binary-arch: $(build-stamp) $(install-stamp) +binary-arch: $(addprefix $(binary-stamp)-,$(subst -$(UVERSION),,$(packages_arch))) +binary-indep: $(addprefix $(binary-stamp)-,$(subst -$(UVERSION),,$(packages_indep))) +binary: binary-arch binary-indep + # TODO: list installed nowhere files + +debhelper-%: + $(foreach f,$(notdir $(wildcard $(D)/debian/debhelper.in/$*.*)),\ + sed -e "s;@PF@;$(PF);g" \ + -e "s;@TMP@;tmp-$(strip $(call buildof,$*));g" \ + -e "s;@BUILD@;build-$(strip $(call buildof,$*));g" \ + -e "s;@UVERSION@;$(UVERSION);g" \ + -e "s;@GCC_VERSION@;$(GCC_VERSION);g" \ + -e "s;@LLVM_VERSION@;$(LLVM_VERSION);g" \ + -e "s/@PKG_VERSION@/$(pkg_version)/g" \ + -e "s/@SHLIB_NAME@/$(shlib_name)/g" \ + -e "s;@OCAML_STDLIB_DIR@;$(OCAML_STDLIB_DIR);g" \ + $(D)/debian/debhelper.in/$f > \ + $(D)/debian/$(strip $(call pkgname,$*))$(strip $(suffix $(f))) \ + &&) : + +clean: clean-debhelper +clean-debhelper: clean-common + $(RM) $(strip $(foreach f,$(notdir $(wildcard $(D)/debian/debhelper.in/*.*)),\ + $(D)/debian/$(strip $(call pkgname,$(shell echo $(basename $(f)) | sed -e 's/\.$$//')))$(strip $(suffix $(f))) \ + )) + +.PHONY: clean clean-debhelper + +$(foreach build,$(builds),$(foreach package,$($(build)_packages),$(eval \ +dependency-$(package): $(install-stamp)-$(build)))) + +$(foreach package,$(extra_packages),$(eval \ +dependency-$(package): $(patch-stamp))) + +$(binary-stamp)-%: dependency-% debhelper-% + @echo Building package: $(call pkgname,$*) + dh_testdir + dh_testroot + dh_installchangelogs -p$(call pkgname,$*) + dh_installdocs -p$(call pkgname,$*) + dh_installexamples -p$(call pkgname,$*) + dh_installman -p$(call pkgname,$*) + dh_installmime -p$(call pkgname,$*) + dh_installdirs -p$(call pkgname,$*) + dh_install -p$(call pkgname,$*) + $(call $*_extra_binary) + for dir in usr/lib $(PF)/lib usr/bin $(PF)/bin ; \ + do for i in $$(find $(D)/debian/$(strip $(call pkgname,$*))/$$dir 2>/dev/null || echo -n) ; \ + do if objdump -p $$i 2>/dev/null | grep RPATH 2>&1 >/dev/null ; \ + then echo "Removing hardcoded path library from $$i" ; \ + chrpath -d $$i || true ; \ + fi ; \ + done ; \ + done + if ! test "x$(PF)" = "x/usr" ; then \ + for i in $$(ls $(D)/debian/$(strip $(call pkgname,$*))/$(PF)/bin 2>/dev/null || echo -n); do \ + echo "Adding versioned symlink for binary $(D)/debian/$(PF)/bin/$$i" ; \ + echo "$(PF)/bin/$$i usr/bin/$$i$(SUFFIX)" >> $(D)/debian/$(strip $(call pkgname,$*)).links ; \ + done ; \ + fi + for man in $$(seq 1 8) ; do \ + for i in $$(ls $(D)/debian/$(strip $(call pkgname,$*))/usr/share/man/man$$man/*.$$man 2>/dev/null || echo -n) ; do \ + echo "Adding upstream version to manpage $$i" ; \ + mv $$i $$(echo $$i | sed -r "s/(\.$$man)$$/$(subst .,\.,$(SUFFIX))\1/g") ; \ + done ; \ + done + dh_link -p$(call pkgname,$*) + dh_strip -p$(call pkgname,$*) + dh_compress -p$(call pkgname,$*) + dh_fixperms -p$(call pkgname,$*) + DH_VERBOSE=1 dh_shlibdeps -p$(call pkgname,$*) + DH_VERBOSE=1 dh_makeshlibs -p$(call pkgname,$*) + dh_installdeb -p$(call pkgname,$*) + dh_gencontrol -p$(call pkgname,$*) + dh_md5sums -p$(call pkgname,$*) + dh_builddeb -p$(call pkgname,$*) + touch $@ + +.PHONY: binary binary-arch binary-indep dependency-% debhelper-% --- llvm-2.7-2.7.orig/debian/rules.d/vars.mk +++ llvm-2.7-2.7/debian/rules.d/vars.mk @@ -0,0 +1,78 @@ +DISTRIBUTION := $(shell dpkg-parsechangelog | grep ^Distribution | sed -e 's/^Distribution: //') +PKGSOURCE := $(shell dpkg-parsechangelog | grep ^Source | sed -e 's/^Source: //') +VERSION := $(shell dpkg-parsechangelog | grep ^Version | sed -e 's/^Version: //') +UVERSION := $(shell echo $(VERSION) | cut -d'-' -f1) +OS := $(shell lsb_release -is) +PF := /usr/lib/llvm-$(UVERSION) +D := $(CURDIR) + +# remove upstream version +PKGNAME := $(subst -$(UVERSION),,$(PKGSOURCE)) + +# for binaries +SUFFIX := $(subst $(PKGNAME),,$(PKGSOURCE)) + +# for the shared lib +ifeq ($(PKGNAME),llvm) + pkg_version := $(shell sed -n "/^PACKAGE_VERSION=/s/.*'\(.*\)'$$/\1/p" configure) + pkg_version := $(subst svn,,$(pkg_version)) +else + pkg_version := $(UVERSION) +endif +shlib_name := libLLVM-$(pkg_version) + +# for llvm-gcc and tools +dev_version := $(UVERSION)-4 + +# for tools +export CCACHE_DIR=$(D)/debian/ccache +export PATH=/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin + +$(foreach var,$(shell dpkg-architecture | sed -e 's/=/?=/'),$(eval $(var))) + +opt_flags = -g -O2 +ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) + opt_flags += -marm +endif + +# testsuite +nocheck := no +ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + nocheck := yes +endif + +# shared lib +with_shared := yes +ifneq ($(DEB_HOST_ARCH_OS),linux) + with_shared := no +endif + +stampdir := $(D)/debian/stamps +$(foreach target,control unpack patch configure build check install binary, \ + $(eval $(target)-stamp := $(stampdir)/$(target)-stamp)) + +packages_arch := $(strip $(shell dh_listpackages -a 2>/dev/null)) +packages_indep := $(strip $(shell dh_listpackages -i 2>/dev/null)) +packages_all := $(packages_arch) $(packages_indep) + +NJOBS := 1 +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +else + NCPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1) + NJOBS := $(shell if test $(NCPUS) -gt 1; then echo `expr $(NCPUS) + 1`; \ + else echo $(NCPUS); fi) +endif + +confargs := \ + CC=$(DEB_HOST_GNU_TYPE)-gcc CXX=$(DEB_HOST_GNU_TYPE)-g++ \ + CPP=$(DEB_HOST_GNU_TYPE)-cpp \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) + +# build not yet prepared to take variables from the environment +define unsetenv + unexport $(1) + $(1) = +endef +$(foreach v, CPPFLAGS CFLAGS CXXFLAGS FFLAGS LDFLAGS, $(if $(filter environment,$(origin $(v))),$(eval $(call unsetenv, $(v))))) + --- llvm-2.7-2.7.orig/debian/rules.d/build.mk +++ llvm-2.7-2.7/debian/rules.d/build.mk @@ -0,0 +1,67 @@ +configure: $(configure-stamp) +$(configure-stamp): $(addprefix $(configure-stamp)-,$(builds)) + touch $@ + +build: $(build-stamp) +$(build-stamp): $(addprefix $(build-stamp)-,$(builds)) + touch $@ + +check: $(check-stamp) +$(check-stamp): $(addprefix $(check-stamp)-,$(builds)) + touch $@ + +install: $(install-stamp) +$(install-stamp): $(addprefix $(install-stamp)-,$(builds)) + touch $@ + +clean: clean-common +clean-common: + dh_testdir + dh_testroot + dh_clean + find $(srcdir)/test/Bindings/Ocaml -type f \ + -name "*.o" -or -name "*.cmx" | xargs $(RM) + $(RM) -r $(D)/debian/tmp-* + $(RM) $(D)/test/Bindings/Ocaml/*.cm[io] + $(RM) $(D)/debian/log-check-* $(D)/debian/logwatch-*.pid + $(RM) $(D)/log-* $(D)/missing + +.PHONY: configure build install check clean clean-common + +# GENERIC ------------------- +$(configure-stamp)-%: $(unpack-stamp) $(patch-stamp) + -mkdir -p $($*_builddir) 2>/dev/null + cd $($*_builddir) && \ + ../$(srcdir)/configure $($*_confargs) + $(call $*_extra_configure) + touch $@ +$(build-stamp)-%: $(configure-stamp)-% + $(MAKE) -j$(NJOBS) -C $($*_builddir) $($*_MAKEOPTS) + $(call $*_extra_build) + touch $@ +$(check-stamp)-%: $(build-stamp)-% + # TODO: fix logwatch script +# chmod +x $(D)/debian/logwatch.sh && \ +# (debian/logwatch.sh -t 900 -p $(D)/debian/logwatch-$*.pid \ +# -m '\ntestsuite still running ...\n' \ +# $($*_builddir)/test/testrun.log \ +# &) + if test "x$(nocheck)-$($(strip $(call buildof,$*))_check)" = "xno-yes" ; then \ + if test "x$($*_check)" = "xyes" ; then \ + $(MAKE) -C $($*_builddir) $($*_MAKECHECKOPTS) check || true ; \ + fi ; \ + fi + $(call $*_extra_check) + touch $@ +$(install-stamp)-%: $(build-stamp)-% $(check-stamp)-% + $(MAKE) -C $($*_builddir) $($*_MAKEOPTS) install DESTDIR=$(D)/debian/tmp-$* + # Fix links that point to install directory + find $(D)/debian/tmp-$* -type l | while read i ; \ + do \ + L=$$(readlink $$i) ; \ + L=$${L##$(D)/debian/tmp-$*} ; \ + ln -sf $$L $$i ; \ + done + $(call $*_extra_install) + touch $@ + --- llvm-2.7-2.7.orig/debian/rules.d/control.mk +++ llvm-2.7-2.7/debian/rules.d/control.mk @@ -0,0 +1,35 @@ +$(foreach var,BUILDDEPS BUILDCONFLICTS,$(eval \ + $(if $(strip $($(var))),$(eval $(var) :=, $($(var))),$(eval $(var) :=)))) + +packages := $(foreach build,$(builds),$($(build)_packages)) +packages += $(extra_packages) + +debian/control: + @echo Regenerating control file... + sed -e "s/@PKGSOURCE@/$(PKGSOURCE)/g" \ + -e "s/ *@BUILDDEPS@/$(BUILDDEPS)/g" \ + -e "s/ *@BUILDCONFLICTS@/$(BUILDCONFLICTS)/g" \ + -e "s/@UVERSION@/$(UVERSION)/g" \ + -e "s/@GCC_VERSION@/$(gcc_version)/g" \ + -e "s/@PKG_VERSION@/$(pkg_version)/g" \ + -e "s/ , /, /g" \ + $@.in/source $(addprefix $@.in/,$(packages)) > $@ + +control: debian/control + +diffstats: + @echo Updating diffstats... + for patch in $(D)/debian/patches/*.patch ; do \ + (echo '---' ; \ + diffstat $${patch} ; \ + echo ; \ + cat $${patch} | awk '/^---$$/ {put=0} /^[a-zA-Z0-9]/ {put=1} /^--- / {put=1} put==1' ; \ + ) > $${patch}T && \ + sed -r '/^Index: /d;/^={67}$$/d' -i $${patch}T ; \ + diff -U 0 $${patch} $${patch}T ; \ + mv -f $${patch}T $${patch} ; \ + done + +clean: control diffstats + +.PHONY: clean control debian/control diffstats --- llvm-2.7-2.7.orig/debian/control.in/llvm-runtime +++ llvm-2.7-2.7/debian/control.in/llvm-runtime @@ -0,0 +1,20 @@ +Package: llvm-@UVERSION@-runtime +Architecture: any +Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends} +Conflicts: llvm (<< 2.7-1) +Replaces: llvm (<< 2.7-1) +Description: Low-Level Virtual Machine (LLVM), bytecode interpreter + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the minimal required to execute programs in LLVM + format. + --- llvm-2.7-2.7.orig/debian/control.in/llvm-source +++ llvm-2.7-2.7/debian/control.in/llvm-source @@ -0,0 +1,17 @@ +Package: llvm-@UVERSION@-source +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM), source code + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package contains the llvm source code. + --- llvm-2.7-2.7.orig/debian/control.in/llvm-snapshot +++ llvm-2.7-2.7/debian/control.in/llvm-snapshot @@ -0,0 +1,19 @@ +Package: llvm-snapshot +Priority: extra +Architecture: any +Suggests: llvm-doc +Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends} +Description: a SNAPSHOT of the Low-Level Virtual Machine (LLVM) + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package is a SNAPSHOT taken from the upstream SVN. + --- llvm-2.7-2.7.orig/debian/control.in/llvm-gcc-4.2 +++ llvm-2.7-2.7/debian/control.in/llvm-gcc-4.2 @@ -0,0 +1,22 @@ +Package: llvm-gcc-@GCC_VERSION@ +Architecture: i386 amd64 +Depends: llvm-@UVERSION@-dev (>= @UVERSION@), llvm-@UVERSION@ (>= @UVERSION@), ${shlibs:Depends}, ${misc:Depends} +Provides: llvm-gcc +Suggests: gcc-@GCC_VERSION@-doc +Description: Low-Level Virtual Machine (LLVM), C/C++ front-end + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This is only a utility package that contains the C/C++ front-end + used by the compiler, and was created in order to reduce the overall + size of the compiler package itself. Please install the 'llvm' + package to install the actual compiler. + --- llvm-2.7-2.7.orig/debian/control.in/llvm-doc +++ llvm-2.7-2.7/debian/control.in/llvm-doc @@ -0,0 +1,18 @@ +Package: llvm-@UVERSION@-doc +Section: doc +Architecture: all +Depends: ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM), documentation + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package contains all documentation (extensive). + --- llvm-2.7-2.7.orig/debian/control.in/llvm +++ llvm-2.7-2.7/debian/control.in/llvm @@ -0,0 +1,30 @@ +Package: llvm-@UVERSION@ +Architecture: any +Suggests: llvm-@UVERSION@-doc +Depends: llvm-@UVERSION@-runtime (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Recommends: llvm-@UVERSION@-dev +Conflicts: llvm (<< 2.7-1) +Replaces: llvm (<< 2.7-1) +Description: Low-Level Virtual Machine (LLVM) + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + The strengths of the LLVM infrastructure are its extremely + simple design (which makes it easy to understand and use), + source-language independence, powerful mid-level optimizer, automated + compiler debugging support, extensibility, and its stability and + reliability. LLVM is currently being used to host a wide variety of + academic research projects and commercial projects. LLVM includes C + and C++ front-ends (based on GCC 4.0.1), a front-end for a Forth-like + language (Stacker), a young scheme front-end, and Java support is + in development. LLVM can generate code for X86, SparcV9, PowerPC, + or it can emit C code. + --- llvm-2.7-2.7.orig/debian/control.in/libllvm-ocaml-dev +++ llvm-2.7-2.7/debian/control.in/libllvm-ocaml-dev @@ -0,0 +1,20 @@ +Package: libllvm-ocaml-@UVERSION@-dev +Section: ocaml +Architecture: any +Suggests: llvm-@UVERSION@-doc +Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-@UVERSION@-dev (= ${binary:Version}) +Provides: ${ocaml:Provides} +Description: Low-Level Virtual Machine (LLVM), bindings for OCaml + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the OCaml bindings to develop applications using llvm. + --- llvm-2.7-2.7.orig/debian/control.in/llvm-examples +++ llvm-2.7-2.7/debian/control.in/llvm-examples @@ -0,0 +1,19 @@ +Package: llvm-@UVERSION@-examples +Section: doc +Architecture: all +Depends: ${misc:Depends}, llvm-@UVERSION@-dev (>= ${source:Version}), llvm-@UVERSION@-dev (<< ${source:Version}+c~) +Description: Low-Level Virtual Machine (LLVM), examples + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package contains examples for using LLVM, both in developing + extensions to LLVM and in using it to compile code. + --- llvm-2.7-2.7.orig/debian/control.in/source +++ llvm-2.7-2.7/debian/control.in/source @@ -0,0 +1,14 @@ +Source: @PKGSOURCE@ +Section: devel +Priority: optional +Maintainer: LLVM Packaging Team +Uploaders: Arthur Loiret , Pierre Habouzit +Build-Depends: debhelper (>= 6.0.0), flex, bison, dejagnu, tcl8.5, expect, + autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo, + sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9), + lsb-release, patchutils, diffstat, lzma @BUILDDEPS@ +Build-Conflicts: oprofile @BUILDCONFLICTS@ +Standards-Version: 3.9.1 +Homepage: http://www.llvm.org/ +Vcs-Bzr: https://bazaar.launchpad.net/~pkg-llvm/+junk/llvm-2.7-ubuntu + --- llvm-2.7-2.7.orig/debian/control.in/llvm-priv-dev +++ llvm-2.7-2.7/debian/control.in/llvm-priv-dev @@ -0,0 +1,10 @@ +Package: llvm-@UVERSION@-priv-dev +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM), ccache files + This package contains the ccache files from latest upload. It allows the + tools to build much faster, and prevents llvm from being uselessly built + twice. + . + Do not install unless you intend to build LLVM from sources! + --- llvm-2.7-2.7.orig/debian/control.in/llvm-dev +++ llvm-2.7-2.7/debian/control.in/llvm-dev @@ -0,0 +1,19 @@ +Package: llvm-@UVERSION@-dev +Architecture: any +Depends: ${shlibs:Depends}, libffi-dev (>= 3.0.9), ${misc:Depends}, llvm-@UVERSION@ (= ${binary:Version}) +Replaces: llvm (<< 2.2-3) +Description: Low-Level Virtual Machine (LLVM), libraries and headers + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the libraries and headers to develop applications + using llvm. + --- llvm-2.7-2.7.orig/debian/control.in/libllvm2.7 +++ llvm-2.7-2.7/debian/control.in/libllvm2.7 @@ -0,0 +1,11 @@ +Package: libllvm@PKG_VERSION@ +Architecture: any +Section: libs +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM), runtime library + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. + . + This package contains the LLVM runtime library. + --- llvm-2.7-2.7.orig/debian/control.in/clang +++ llvm-2.7-2.7/debian/control.in/clang @@ -0,0 +1,40 @@ +Package: clang +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: llvm-@UVERSION@-dev, python +Description: Low-Level Virtual Machine (LLVM), C language family frontend + The Low-Level Virtual Machine (LLVM) is a collection of libraries and + tools that make it easy to build compilers, optimizers, Just-In-Time + code generators, and many other compiler-related programs. LLVM + uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + Clang project is a new C, C++, Objective C and Objective C++ front-end + for the LLVM compiler. Some of its goals include the following: + . + End-User Features: + . + * Fast compiles and low memory use + * Expressive diagnostics (examples) + * GCC compatibility + . + Utility and Applications: + . + * Modular library based architecture + * Support diverse clients (refactoring, static analysis, code + generation, etc) + * Allow tight integration with IDEs + * Use the LLVM 'BSD' License + . + Internal Design and Implementation: + . + * A real-world, production quality compiler + * A simple and hackable code base + * A single unified parser for C, Objective C, C++, and Objective C++ + * Conformance with C/C++/ObjC and their variants + --- llvm-2.7-2.7.orig/debian/source/format +++ llvm-2.7-2.7/debian/source/format @@ -0,0 +1 @@ +1.0 --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-runtime.links +++ llvm-2.7-2.7/debian/debhelper.in/llvm-runtime.links @@ -0,0 +1 @@ +# AUTOGENERATED in debian/rules.d/binary.mk. --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-runtime.prerm +++ llvm-2.7-2.7/debian/debhelper.in/llvm-runtime.prerm @@ -0,0 +1,11 @@ +#!/bin/sh -e + +if test "$1" = "remove"; then + if test -x /usr/sbin/update-binfmts; then + update-binfmts --package llvm-@UVERSION@ \ + --remove llvm-@UVERSION@ /usr/bin/lli || true + fi +fi + +#DEBHELPER# + --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm.manpages +++ llvm-2.7-2.7/debian/debhelper.in/llvm.manpages @@ -0,0 +1 @@ +debian/@TMP@/@PF@/share/man/man1/* --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-gcc-4.2.links +++ llvm-2.7-2.7/debian/debhelper.in/llvm-gcc-4.2.links @@ -0,0 +1 @@ +# AUTOGENERATED in debian/packages.d/llvm-gc-4.2.mk. --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-doc.dirs +++ llvm-2.7-2.7/debian/debhelper.in/llvm-doc.dirs @@ -0,0 +1 @@ +usr/share/doc/llvm-@UVERSION@-doc --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-examples.dirs +++ llvm-2.7-2.7/debian/debhelper.in/llvm-examples.dirs @@ -0,0 +1 @@ +usr/share/doc/llvm-@UVERSION@-examples --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-snapshot.install +++ llvm-2.7-2.7/debian/debhelper.in/llvm-snapshot.install @@ -0,0 +1,13 @@ +debian/@TMP@/@PF@/bin/* @PF@/bin/ +debian/@TMP@/@PF@/lib/* @PF@/lib/ +debian/@TMP@/@PF@/include/* @PF@/include/ + +debian/@TMP@/@PF@/docs/llvm/html usr/share/doc/llvm-snapshot/ +debian/@TMP@/@PF@/docs/llvm/ps usr/share/doc/llvm-snapshot/ + +@BUILD@/Makefile.common @PF@/build/ +@BUILD@/Makefile.config @PF@/build/ +@BUILD@/config.status @PF@/build/ +Makefile.rules @PF@/build/ +configure @PF@/build/ +autoconf/ @PF@/build/ --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-dev.links +++ llvm-2.7-2.7/debian/debhelper.in/llvm-dev.links @@ -0,0 +1 @@ +usr/lib/libLLVM-2.7.so.1 usr/lib/libLLVM-2.7.so --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-doc.install +++ llvm-2.7-2.7/debian/debhelper.in/llvm-doc.install @@ -0,0 +1,2 @@ +debian/@TMP@/@PF@/docs/llvm/html usr/share/doc/llvm-@UVERSION@-doc/ +debian/@TMP@/@PF@/docs/llvm/ps usr/share/doc/llvm-@UVERSION@-doc/ --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-runtime.install +++ llvm-2.7-2.7/debian/debhelper.in/llvm-runtime.install @@ -0,0 +1,2 @@ +debian/@TMP@/@PF@/bin/lli @PF@/bin/ +debian/llvm.binfmt usr/share/binfmts/ --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm.install +++ llvm-2.7-2.7/debian/debhelper.in/llvm.install @@ -0,0 +1 @@ +debian/@TMP@/@PF@/bin/* @PF@/bin/ --- llvm-2.7-2.7.orig/debian/debhelper.in/libllvm-ocaml-dev.META +++ llvm-2.7-2.7/debian/debhelper.in/libllvm-ocaml-dev.META @@ -0,0 +1,63 @@ +description = "Low Level Virtual Machine bindings" +version = "@UVERSION@" + +directory = "+llvm" + +archive(byte) = "llvm.cma" +archive(native) = "llvm.cmxa" +linkopts = "-cclib -lstdc++ -cclib -lllvm" + +package "executionengine" +( + requires = "llvm" + version = "@UVERSION@" + archive(native) = "llvm_executionengine.cmxa" + archive(byte) = "llvm_executionengine.cma" + linkopts = "-cclib -lllvm_executionengine" +) + +package "target" +( + requires = "llvm" + version = "@UVERSION@" + archive(native) = "llvm_target.cmxa" + archive(byte) = "llvm_target.cma" + linkopts = "-cclib -lllvm_target" +) + +package "scalar_opts" +( + requires = "llvm llvm.target" + version = "@UVERSION@" + archive(native) = "llvm_scalar_opts.cmxa" + archive(byte) = "llvm_scalar_opts.cma" + linkopts = "-cclib -lllvm_scalar_opts" +) + +package "analysis" +( + requires = "llvm" + version = "@UVERSION@" + archive(native) = "llvm_analysis.cmxa" + archive(byte) = "llvm_analysis.cma" + linkopts = "-cclib -lllvm_analysis" +) + +package "bitwriter" +( + requires = "llvm" + version = "@UVERSION@" + archive(native) = "llvm_bitwriter.cmxa" + archive(byte) = "llvm_bitwriter.cma" + linkopts = "-cclib -lllvm_bitwriter" +) + +package "bitreader" +( + requires = "llvm llvm.bitwriter" + version = "@UVERSION@" + archive(native) = "llvm_bitreader.cmxa" + archive(byte) = "llvm_bitreader.cma" + linkopts = "-cclib -lllvm_bitreader" +) + --- llvm-2.7-2.7.orig/debian/debhelper.in/clang.links +++ llvm-2.7-2.7/debian/debhelper.in/clang.links @@ -0,0 +1,5 @@ +usr/share/man/man1/clang.1.gz usr/share/man/man1/llvm-clang.1.gz +usr/share/man/man1/clang.1.gz usr/share/man/man1/clang++.1.gz +@PF@/share/clang/scan-build/scan-build @PF@/bin/scan-build +@PF@/share/clang/scan-view/scan-view @PF@/bin/scan-view +@PF@/bin/clang @PF@/bin/llvm-clang --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-examples.examples +++ llvm-2.7-2.7/debian/debhelper.in/llvm-examples.examples @@ -0,0 +1 @@ +examples/* --- llvm-2.7-2.7.orig/debian/debhelper.in/libllvm-ocaml-dev.install +++ llvm-2.7-2.7/debian/debhelper.in/libllvm-ocaml-dev.install @@ -0,0 +1,2 @@ +debian/@TMP@/@OCAML_STDLIB_DIR@/llvm-@UVERSION@ @OCAML_STDLIB_DIR@/ +debian/@TMP@/@PF@/docs/llvm/ocamldoc/html usr/share/doc/libllvm-ocaml-@UVERSION@-dev/ --- llvm-2.7-2.7.orig/debian/debhelper.in/libllvm-ocaml-dev.dirs +++ llvm-2.7-2.7/debian/debhelper.in/libllvm-ocaml-dev.dirs @@ -0,0 +1 @@ +@OCAML_STDLIB_DIR@/METAS --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-runtime.postinst +++ llvm-2.7-2.7/debian/debhelper.in/llvm-runtime.postinst @@ -0,0 +1,9 @@ +#!/bin/sh -e + +if test "$1" = "configure"; then + if test -x /usr/sbin/update-binfmts; then + update-binfmts --import llvm-@UVERSION@.binfmt || true + fi +fi + +#DEBHELPER# --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-dev.dirs +++ llvm-2.7-2.7/debian/debhelper.in/llvm-dev.dirs @@ -0,0 +1,5 @@ +@PF@/lib +@PF@/build +@PF@/include +usr/share/doc/llvm-@UVERSION@-dev +usr/share/emacs/site-lisp/llvm-@UVERSION@ --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm.links +++ llvm-2.7-2.7/debian/debhelper.in/llvm.links @@ -0,0 +1 @@ +# AUTOGENERATED in debian/rules.d/binary.mk. --- llvm-2.7-2.7.orig/debian/debhelper.in/libllvm2.7.install +++ llvm-2.7-2.7/debian/debhelper.in/libllvm2.7.install @@ -0,0 +1 @@ +debian/@TMP@/usr/lib/libLLVM-2.7.so.1 usr/lib --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm.dirs +++ llvm-2.7-2.7/debian/debhelper.in/llvm.dirs @@ -0,0 +1,3 @@ +@PF@/bin +usr/share/man/man1 +usr/share/doc/llvm-@UVERSION@ --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-runtime.manpages +++ llvm-2.7-2.7/debian/debhelper.in/llvm-runtime.manpages @@ -0,0 +1 @@ +debian/@TMP@/@PF@/share/man/man1/lli.* --- llvm-2.7-2.7.orig/debian/debhelper.in/clang.install +++ llvm-2.7-2.7/debian/debhelper.in/clang.install @@ -0,0 +1,6 @@ +debian/@TMP@/@PF@/lib/clang @PF@/lib/ +debian/@TMP@/@PF@/bin/clang @PF@/bin/ +debian/@TMP@/@PF@/bin/clang++ @PF@/bin/ +tools/clang/tools/scan-build @PF@/share/clang/ +tools/clang/tools/scan-view @PF@/share/clang/ +debian/@TMP@/@PF@/share/man/man1/clang.1 usr/share/man/man1/ --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-dev.install +++ llvm-2.7-2.7/debian/debhelper.in/llvm-dev.install @@ -0,0 +1,17 @@ +debian/@TMP@/@PF@/lib/* @PF@/lib/ +debian/@TMP@/@PF@/include/* usr/include/ + +@BUILD@/Makefile.common @PF@/build/ +@BUILD@/Makefile.config @PF@/build/ +@BUILD@/config.status @PF@/build/ +Makefile.rules @PF@/build/ +configure @PF@/build/ +autoconf/ @PF@/build/ + +utils/vim/llvm.vim usr/share/vim/addons/plugin/ +utils/vim/tablegen.vim usr/share/vim/addons/plugin/ + +utils/emacs/emacs.el usr/share/emacs/site-lisp/llvm-2.7/ +utils/emacs/llvm-mode.el usr/share/emacs/site-lisp/llvm-2.7/ +utils/emacs/tablegen-mode.el usr/share/emacs/site-lisp/llvm-2.7/ + --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-priv-dev.dirs +++ llvm-2.7-2.7/debian/debhelper.in/llvm-priv-dev.dirs @@ -0,0 +1 @@ +@PF@/build --- llvm-2.7-2.7.orig/debian/debhelper.in/libllvm-ocaml-dev.doc-base +++ llvm-2.7-2.7/debian/debhelper.in/libllvm-ocaml-dev.doc-base @@ -0,0 +1,8 @@ +Document: libllvm-ocaml-@UVERSION@-dev-ocamldoc-api-reference +Title: Llvm OCamldoc API Reference +Abstract: API reference manual for libllvm-ocaml-dev (generated via OCamldoc) +Section: Programming/OCaml + +Format: HTML +Index: /usr/share/doc/libllvm-ocaml-@UVERSION@-dev/html/index.html +Files: /usr/share/doc/libllvm-ocaml-@UVERSION@-dev/html/* --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-examples.links +++ llvm-2.7-2.7/debian/debhelper.in/llvm-examples.links @@ -0,0 +1,3 @@ +@PF@/build/Makefile.common usr/share/doc/llvm-@UVERSION@-examples/Makefile.common +@PF@/build/Makefile.config usr/share/doc/llvm-@UVERSION@-examples/Makefile.config +@PF@/build/Makefile.rules usr/share/doc/llvm-@UVERSION@-examples/Makefile.rules --- llvm-2.7-2.7.orig/debian/debhelper.in/llvm-gcc-4.2.install +++ llvm-2.7-2.7/debian/debhelper.in/llvm-gcc-4.2.install @@ -0,0 +1 @@ +debian/@TMP@/@PF@