--- llvm-1.7.orig/llvmg++.sh +++ llvm-1.7/llvmg++.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# wrapper script for executing the LLVM C++ front end +# +LLVMGCCDIR=/usr/lib/llvm/llvm-gcc4 + +LLVM_LIB_SEARCH_PATH=$LLVMGCCDIR/bytecode-libs +export LLVM_LIB_SEARCH_PATH + +exec $LLVMGCCDIR/bin/g++ $* + --- llvm-1.7.orig/llvmgcc.sh +++ llvm-1.7/llvmgcc.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# wrapper script for executing the LLVM C front end +# +LLVMGCCDIR=/usr/lib/llvm/llvm-gcc4 + +LLVM_LIB_SEARCH_PATH=$LLVMGCCDIR/bytecode-libs +export LLVM_LIB_SEARCH_PATH + +exec $LLVMGCCDIR/bin/gcc $* + --- llvm-1.7.orig/conffiles.sh +++ llvm-1.7/conffiles.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# +#-- this is indeed a hack. there might be a good way to fix this +# in the original source, but i just don't see it yet. the problem +# is that the variable LLVMGCCDIR is used in multiple ways; if we +# fixed the problem for llvm/tools/llvmc, we break it elsewhere, +# and then only for debian, and vice versa. so, we fix it by using +# A Bigger Hammer. in this case, redo the macro substitutions +# after we've already installed them. +# +# TODO: fix this right, which probably means a major munging of +# the llvmc build. +# +# so, recalculate values for LLVMGCCDIR, LLVMCC1, LLVMCC1PLUS, +# LLVMGCCARCH, LLVM_BINDIR, mostly to eliminate the $DESTDIR +# since it gets used incorrectly. +# + +DEB_LLVMGCCDIR=/usr/lib/llvm/llvm-gcc4 +TMPARCH=`llvm/autoconf/config.guess` +DEB_LLVMGCCARCH=${TMPARCH}/3.4-llvm +DEB_LLVMCC1=$DEB_LLVMGCCDIR/libexec/gcc/${DEB_LLVMGCCARCH}/cc1 +DEB_LLVMCC1PLUS=${DEB_LLVMCC1}plus +DEB_LLVM_BINDIR=/usr/bin + +rm -f debian/llvm/etc/llvm/* +for ii in llvm/tools/llvmc/{c,cpp,ll} +do + outname=`basename $ii | sed 's/\.in//'` + sed -e "s+%llvmgccdir%+$DEB_LLVMGCCDIR+g" \ + -e "s+%llvmgccarch%+$DEB_LLVMGCCARCH+g" \ + -e "s+%llvmcc1%+$DEB_LLVMCC1+g" \ + -e "s+%llvmcc1plus%+$DEB_LLVMCC1PLUS+g" \ + -e "s+%llvm_bindir%+$DEB_LLVM_BINDIR+g" \ + -e "s+%bindir%+$DEB_LLVM_BINDIR+g" \ + $ii > debian/llvm/etc/llvm/$outname +done + --- llvm-1.7.orig/debian/llvm-doc.install +++ llvm-1.7/debian/llvm-doc.install @@ -0,0 +1,8 @@ +usr/docs/llvm/doxygen.tar.gz usr/share/doc/llvm +usr/docs/llvm/html.tar.gz usr/share/doc/llvm +usr/docs/llvm/html usr/share/doc/llvm +usr/docs/llvm/ps usr/share/doc/llvm +usr/bin/BFtoLLVM usr/share/doc/llvm/examples +usr/bin/Fibonacci usr/share/doc/llvm/examples +usr/bin/HowToUseJIT usr/share/doc/llvm/examples +usr/bin/ModuleMaker usr/share/doc/llvm/examples --- llvm-1.7.orig/debian/llvm.install +++ llvm-1.7/debian/llvm.install @@ -0,0 +1,2 @@ +usr/man usr/share +llvm.binfmt usr/share/binfmt/llvm --- llvm-1.7.orig/debian/control +++ llvm-1.7/debian/control @@ -0,0 +1,99 @@ +Source: llvm +Section: devel +Priority: optional +Maintainer: Al Stone +Build-Depends: debhelper (>= 4.0.0), flex, bison, dejagnu, tcl8.4, expect, autoconf, automake, perl, libtool, doxygen (>= 1.4.6-2.1), dpatch, chrpath, texinfo, graphviz, sharutils +Standards-Version: 3.7.2 + +Package: llvm-libs +Architecture: i386 sparc powerpc ia64 alpha +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: common libraries for LLVM compiler for C/C++ + 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 is only a utility package that contains the libraries used by + the compiler, both at compile-time and run-time, 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. + +Package: llvm-cfe +Architecture: i386 sparc powerpc ia64 alpha +Depends: llvm-libs, llvm, ${shlibs:Depends}, ${misc:Depends} +Description: C front end for LLVM C/C++ compiler + 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 is only a utility package that contains the 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. + +Package: llvm +Architecture: i386 sparc powerpc ia64 alpha +Recommends: llvm-doc, llvm-cfe +Depends: binfmt-support, llvm-libs, ${shlibs:Depends}, ${misc:Depends} +Description: Low-Level Virtual Machine (LLVM) compiler for C/C++ + 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 3.4), 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. + . + NB: this package needs one or more LLVM front-ends (e.g., the + package 'llvm-cfe'). + +Package: llvm-doc +Section: doc +Architecture: all +Description: documentation for LLVM (Low-Level Virtual Machine) compiler + 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-examples +Section: doc +Architecture: i386 sparc powerpc ia64 alpha +Depends: llvm, llvm-cfe +Description: examples using LLVM (Low-Level Virtual Machine) compiler + 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-1.7.orig/debian/changelog +++ llvm-1.7/debian/changelog @@ -0,0 +1,84 @@ +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-1.7.orig/debian/compat +++ llvm-1.7/debian/compat @@ -0,0 +1 @@ +4 --- llvm-1.7.orig/debian/patches/00list +++ llvm-1.7/debian/patches/00list @@ -0,0 +1,2 @@ +01_debian-version.dpatch +02_target-libobjc.dpatch --- llvm-1.7.orig/debian/patches/01_debian-version.dpatch +++ llvm-1.7/debian/patches/01_debian-version.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01debian-version.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad llvm-1.4/llvm/configure /tmp/dpep.xWD9Ja/llvm-1.4/llvm/configure +--- llvm-1.4/llvm/configure 2004-12-09 10:11:15.000000000 -0700 ++++ /tmp/dpep.xWD9Ja/llvm-1.4/llvm/configure 2005-01-01 10:31:57.000000000 -0700 +@@ -425,8 +425,8 @@ + # Identity of this package. + PACKAGE_NAME='llvm' + PACKAGE_TARNAME='-llvm-' +-PACKAGE_VERSION='1.7' +-PACKAGE_STRING='llvm 1.7' ++PACKAGE_VERSION='1.7-debian1' ++PACKAGE_STRING='llvm 1.7 debian1' + PACKAGE_BUGREPORT='llvmbugs@cs.uiuc.edu' + + ac_unique_file="lib/VMCore/Module.cpp" --- llvm-1.7.orig/debian/patches/02_target-libobjc.dpatch +++ llvm-1.7/debian/patches/02_target-libobjc.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_target-libobjc.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad llvm-1.7~/llvm-gcc4-1.7.source/gcc/objc/config-lang.in llvm-1.7/llvm-gcc4-1.7.source/gcc/objc/config-lang.in +--- llvm-1.7~/llvm-gcc4-1.7.source/gcc/objc/config-lang.in 2006-02-21 11:17:06.000000000 -0700 ++++ llvm-1.7/llvm-gcc4-1.7.source/gcc/objc/config-lang.in 2006-05-01 12:10:54.000000000 -0600 +@@ -35,7 +35,7 @@ + # APPLE LOCAL begin libobjc + # We use libobjc4 instead. To build libobjc anyway, add + # '--enable-libobjc' to the 'configure' command line. +-# target_libs=target-libobjc ++target_libs=target-libobjc + # APPLE LOCAL end libobjc + + # Most of the object files for cc1obj actually come from C. --- llvm-1.7.orig/debian/rules +++ llvm-1.7/debian/rules @@ -0,0 +1,180 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +#Architecture +build: build-arch build-indep + +build-arch: build-arch-stamp +build-arch-stamp: configure-stamp + + # Add here commands to compile the arch part of the package. + #$(MAKE) + touch build-arch-stamp + +build-indep: build-indep-stamp +build-indep-stamp: configure-stamp + + # Add here commands to compile the indep part of the package. + #$(MAKE) doc + touch build-indep-stamp + +unpatch: clean + $(MAKE) unpack + +clean: + dh_testdir + dh_testroot + rm -f build-arch-stamp build-indep-stamp configure-stamp + rm -rf debian/patched + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean --exclude ./llvm-test/Runtime/zlib/Makefile.orig + +install: install-indep install-arch +install-indep: + #-- nothing to do, everything installed in install-arch due + # to the way the package builds + +install-arch: + dh_testdir + dh_testroot + dh_clean -k -s --exclude ./llvm-test/Runtime/zlib/Makefile.orig + dh_installdirs -s -i + + # Add here commands to install the arch part of the package into + # debian/tmp. + $(MAKE) install DESTDIR=$(CURDIR)/debian/llvm + rm -f debian/llvm/usr/bin/sample + rm -f debian/llvm/usr/bin/tblgen + rm -f debian/llvm/usr/bin/burg + rm -f debian/llvm/usr/bin/fpcmp + + #-- rearrange the files we need to for the cfrontend + mkdir -p debian/llvm-cfe/usr/lib/llvm + mv debian/llvm/usr/lib/llvm/llvm-gcc4 debian/llvm-cfe/usr/lib/llvm + + #-- rearrange files for the libs + mkdir -p debian/llvm-libs/usr/lib + mv debian/llvm/usr/lib/* debian/llvm-libs/usr/lib + rm -rf debian/llvm-libs/usr/lib/llvm + + #-- rearrange and clean up files for the docs + mkdir -p debian/llvm-doc/usr/share/doc/llvm-doc + mv debian/llvm/usr/docs/llvm/* debian/llvm-doc/usr/share/doc/llvm-doc + rm -f debian/llvm-doc/usr/share/doc/llvm-doc/doxygen.tar.gz + rm -f debian/llvm-doc/usr/share/doc/llvm-doc/html/doxygen/doxygen.tar.gz + rm -f debian/llvm-doc/usr/share/doc/llvm-doc/html.tar.gz + + #-- rearrange files for the examples + mkdir -p debian/llvm-examples/usr/share/doc/llvm-examples/examples + cp -r llvm/examples/* \ + debian/llvm-examples/usr/share/doc/llvm-examples/examples + chmod u-x \ + debian/llvm-examples/usr/share/doc/llvm-examples/examples/Makefile + mv debian/llvm/usr/bin/BFtoLLVM \ + debian/llvm-examples/usr/share/doc/llvm-examples/examples/BFtoLLVM + mv debian/llvm/usr/bin/Fibonacci \ + debian/llvm-examples/usr/share/doc/llvm-examples/examples/Fibonacci + mv debian/llvm/usr/bin/HowToUseJIT \ + debian/llvm-examples/usr/share/doc/llvm-examples/examples/HowToUseJIT + mv debian/llvm/usr/bin/ModuleMaker \ + debian/llvm-examples/usr/share/doc/llvm-examples/examples/ModuleMaker + chmod -x \ + debian/llvm-examples/usr/share/doc/llvm-examples/examples/Makefile + + #-- rearrange files for the main binaries + mkdir -p debian/llvm/usr/share/man/man1 + rm -f debian/llvm/usr/man/man1/extract.1* + mv debian/llvm/usr/man/man1/* debian/llvm/usr/share/man/man1 + rm -rf debian/llvm/usr/man + ( find debian/llvm/usr/include -type d -exec chmod 755 {} \; ) + ( find debian/llvm/usr/include -type f -exec chmod 644 {} \; ) + ( find debian/llvm/etc/llvm -type d -exec chmod 755 {} \; ) + ( find debian/llvm/etc/llvm -type f -exec chmod 644 {} \; ) + chmod -R -x debian/llvm/usr/lib + ( find debian/llvm/usr/bin -exec chrpath -d {} \; ) + + #-- this is a hack to fix some wayward macro processing. see + # the script for details.... + chmod +x ./conffiles.sh + ( sh ./conffiles.sh ) + + #-- clean up the mess + rm -f debian/llvm/usr/include/llvm/System/LICENSE.TXT + rm -rf debian/llvm/usr/bin/.dir + rm -rf debian/llvm/usr/lib + rm -rf debian/llvm/usr/docs + rm -rf debian/llvm/usr/etc + +# Must not depend on anything. This is to be called by +# binary-arch/binary-indep +# in another 'make' thread. +binary-common: + dh_testdir -a -i + dh_testroot -a -i + dh_installchangelogs -a -i + dh_installdocs -a -i + dh_installman -a -i + dh_link -a -i + dh_strip -a -i --exclude=lib/LLVM --exclude=llvm-gcc4/lib \ + --exclude=bytecode-libs + ( find debian/llvm-cfe/usr/lib/llvm/llvm-gcc4/libexec/gcc -exec strip {} \; ) + dh_compress -a -i + dh_fixperms -a -i + dh_makeshlibs -a -i --exclude=lib/LLVM --exclude=llvm-gcc4/lib \ + --exclude=bytecode-libs + dh_installdeb -a -i + dh_shlibdeps -a -i --exclude=lib/LLVM --exclude=llvm-gcc4/lib \ + --exclude=bytecode-libs --exclude=usr/lib \ + --exclude=doxygen + dh_gencontrol -a -i + dh_md5sums -a -i + dh_builddeb -a -i + +# Build architecture independant packages using the common target. +binary-indep: build-indep install-indep + #-- don't really need to do anything here since we already took care + # of it earlier + # $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +# Build architecture dependant packages using the common target. +binary-arch: build-arch install-arch + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +binary: binary-arch binary-indep +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure --- llvm-1.7.orig/debian/llvm-examples.dirs +++ llvm-1.7/debian/llvm-examples.dirs @@ -0,0 +1,2 @@ +usr/share/doc/llvm-examples +usr/share/doc/llvm-examples/examples --- llvm-1.7.orig/debian/llvm-doc.examples +++ llvm-1.7/debian/llvm-doc.examples @@ -0,0 +1 @@ +llvm/examples usr/share/doc/llvm --- llvm-1.7.orig/debian/llvm-libs.docs +++ llvm-1.7/debian/llvm-libs.docs @@ -0,0 +1,2 @@ +llvm/CREDITS.TXT +llvm/LICENSE.TXT --- llvm-1.7.orig/debian/llvm.binfmt +++ llvm-1.7/debian/llvm.binfmt @@ -0,0 +1,3 @@ +package llvm +interpreter /usr/bin/lli +magic llvc --- llvm-1.7.orig/debian/llvm.links +++ llvm-1.7/debian/llvm.links @@ -0,0 +1,3 @@ +usr/share/man/man1/llvmgxx.1 usr/share/man/man1/llvmg++.1 +usr/share/man/man1/gccld.1 usr/share/man/man1/llvm-stub.1 +usr/share/man/man1/llc.1 usr/share/man/man1/ParallelJIT.1 --- llvm-1.7.orig/debian/llvm-examples.install +++ llvm-1.7/debian/llvm-examples.install @@ -0,0 +1,11 @@ +llvm/examples usr/share/doc/llvm-examples +llvm/Makfile.common usr/share/doc/llvm-examples +llvm/Makfile.rules usr/share/doc/llvm-examples +llvm/Makfile.config.in usr/share/doc/llvm-examples +llvm/Makfile.config usr/share/doc/llvm-examples +llvm/configure usr/share/doc/llvm-examples +llvm/config.status usr/share/doc/llvm-examples +usr/bin/BFtoLLVM usr/share/doc/llvm-doc/examples +usr/bin/Fibonacci usr/share/doc/llvm-doc/examples +usr/bin/HowToUseJIT usr/share/doc/llvm-doc/examples +usr/bin/ModuleMaker usr/share/doc/llvm-doc/examples --- llvm-1.7.orig/debian/llvm-cfe.docs +++ llvm-1.7/debian/llvm-cfe.docs @@ -0,0 +1,2 @@ +llvm/CREDITS.TXT +llvm/LICENSE.TXT --- llvm-1.7.orig/debian/llvm.postinst +++ llvm-1.7/debian/llvm.postinst @@ -0,0 +1,20 @@ +#!/bin/sh +set -e +#set -x + +if [ "$1" = "configure" ]; then + #-- this method for registering binfmt_misc has been deprecated + if [ -f /etc/init.d/llvm ] + then + rm -f /etc/init.d/llvm + update-rc.d -f llvm remove + fi + + #-- and replaced by this one + result=`update-binfmts --package llvm --import llvm` + exit $result +fi + +#-- add in debhelper specific changes +#DEBHELPER# + --- llvm-1.7.orig/debian/llvm.prerm +++ llvm-1.7/debian/llvm.prerm @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ "$1" = purge ] +then + result=`update-binfmts --package --remove llvm llvm` +fi + +if [ "$1" = remove ] +then + result=`update-binfmts --package --disable llvm` +fi + +#-- add in debhelper specific changes +#DEBHELPER# + --- llvm-1.7.orig/debian/llvm-libs.dirs +++ llvm-1.7/debian/llvm-libs.dirs @@ -0,0 +1 @@ +usr/lib --- llvm-1.7.orig/debian/llvm.docs +++ llvm-1.7/debian/llvm.docs @@ -0,0 +1,2 @@ +llvm/CREDITS.TXT +llvm/LICENSE.TXT --- llvm-1.7.orig/debian/llvm-libs.files +++ llvm-1.7/debian/llvm-libs.files @@ -0,0 +1,4 @@ +usr/lib/*.o usr/lib +usr/lib/*.a usr/lib +usr/lib/*.la usr/lib +usr/lib/*.so* usr/lib --- llvm-1.7.orig/debian/llvm-doc.docs +++ llvm-1.7/debian/llvm-doc.docs @@ -0,0 +1,2 @@ +llvm/CREDITS.TXT +llvm/LICENSE.TXT --- llvm-1.7.orig/debian/llvm-cfe.dirs +++ llvm-1.7/debian/llvm-cfe.dirs @@ -0,0 +1 @@ +usr/lib/llvm --- llvm-1.7.orig/debian/copyright +++ llvm-1.7/debian/copyright @@ -0,0 +1,90 @@ +This package was debianized by Al Stone on +Tue, 28 Dec 2004 16:41:57 -0700. + +It was downloaded from http://llvm.org/ + +Copyright (c) 2003, 2004 University of Illinois at Urbana-Champaign. +All rights reserved. + + +Upstream Authors: + LLVM Team + University of Illinois at Urbana-Champaign + http://llvm.cs.uiuc.edu + + +License: + +============================================================================== +LLVM Release License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2003, 2004 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.cs.uiuc.edu + +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 +PowerPC Backend llvm/lib/Target/PowerPC +bzip2: llvm/lib/Support/bzip2/LICENSE +Autoconf: llvm/autoconf + llvm/projects/ModuleMaker/autoconf + llvm/projects/sample/autoconf +Burg: llvm/utils/Burg +GNU Libc: llvm/runtime/GCCLibraries/libc + --- llvm-1.7.orig/debian/llvm.dirs +++ llvm-1.7/debian/llvm.dirs @@ -0,0 +1,19 @@ +usr/bin +usr/lib +usr/lib/llvm +usr/lib/llvm/llvm-gcc4 +usr/lib/llvm/llvm-gcc4/lib +usr/lib/llvm/llvm-gcc4/lib/gcc +usr/lib/llvm/llvm-gcc4/libexec +usr/lib/llvm/llvm-gcc4/libexec/gcc +usr/lib/llvm/llvm-gcc4/bin +usr/lib/llvm/llvm-gcc4/include +usr/lib/llvm/llvm-gcc4/include/c++ +usr/lib/llvm/llvm-gcc4/info +usr/lib/llvm/llvm-gcc4/man +usr/lib/llvm/llvm-gcc4/man/man1 +usr/lib/llvm/llvm-gcc4/man/man7 +usr/lib/llvm/llvm-gcc4/bytecode-libs +usr/share/doc/llvm +usr/share/binfmts +etc/llvm --- llvm-1.7.orig/debian/llvm.files +++ llvm-1.7/debian/llvm.files @@ -0,0 +1 @@ +usr/man usr/share --- llvm-1.7.orig/debian/llvm-examples.docs +++ llvm-1.7/debian/llvm-examples.docs @@ -0,0 +1,2 @@ +llvm/CREDITS.TXT +llvm/LICENSE.TXT --- llvm-1.7.orig/debian/llvm-doc.dirs +++ llvm-1.7/debian/llvm-doc.dirs @@ -0,0 +1 @@ +usr/share/doc/llvm-doc --- llvm-1.7.orig/debian/README.Debian +++ llvm-1.7/debian/README.Debian @@ -0,0 +1,24 @@ +llvm for Debian +--------------- + +Only the architectures of i386, ia64, sparc, amd64, and powerpc are +currently supported. At the same time, I've only done testing on +i386, ia64 and amd64. Please let me know if the other architectures +run into any sort of problem. + +Building cross-compilers has not been attempted, nor am I currently +willing to support it. + +To install a usable LLVM, you need to install BOTH the 'llvm' package +AND an LLVM front-end of some sort. The package 'llvm-cfe' provides +a GCC-based C/C++ front-end, though others will become available in +the future. Since LLVM can adapt to any number of front-ends, the +'llvm' package only recommends one; this will allow one to develop +and install multiple front-ends without collision. + +Note that if you only install 'llvm-cfe', it depends on 'llvm' so it +will be installed for you. + +Other notes TBD. + + -- Al Stone , Tue, 26 May 2005 04:35:29 -0700 --- llvm-1.7.orig/llvmc.sh +++ llvm-1.7/llvmc.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# +# wrapper script for executing the LLVM compiler driver +# +LLVMLIBDIR=/usr/lib/llvm +LLVMGCCDIR=$LLVMLIBDIR/llvm-gcc4 + +LLVM_LIB_SEARCH_PATH=$LLVMGCCDIR/bytecode-libs +export LLVM_LIB_SEARCH_PATH + +LLVM_CONFIG_DIR=/etc/llvm +export LLVM_CONFIG_DIR + +exec $LLVMLIBDIR/llvmc $* + --- llvm-1.7.orig/build.sh +++ llvm-1.7/build.sh @@ -0,0 +1,138 @@ +#!/bin/sh +# +# The LLVM build is complicated enough that it seems wise +# to encapsulate it within this script +# + +CURDIR=`pwd` +DESTDIR=${DESTDIR:-} + +#-- make sure we use the right versions of GCC +CC=gcc +CXX=g++ +export CC CXX + +ARCH=`uname -m` +case $ARCH in +i?86) OTHER_CONFIG_OPTIONS="--target=i486-linux --enable-jit" + ;; +ia64) OTHER_CONFIG_OPTIONS="--target=ia64-linux" + ;; +x86_64) OTHER_CONFIG_OPTIONS="--target=x86_64-linux" + ;; +sparc) OTHER_CONFIG_OPTIONS="--target=sparc-linux" + ;; +sparc64) OTHER_CONFIG_OPTIONS="--target=sparc64-linux" + ;; +power) OTHER_CONFIG_OPTIONS="--target=power-linux" + ;; +alpha) OTHER_CONFIG_OPTIONS="--target=alpha-linux" + ;; +*) echo "? unsupported architecture: \'$ARCH\'" + exit 254 + ;; +esac +OTHER_CONFIG_OPTIONS="$OTHER_CONFIG_OPTIONS --enable-optimized --enable-doxygen" + +LLVM_INSTALL_PREFIX=$DESTDIR/usr +CFEINSTALL=$LLVM_INSTALL_PREFIX/lib/llvm/llvm-gcc4 +export CFEINSTALL + +LLVMGCCDIR=$CURDIR/llvm-gcc4-1.7.source +LLVM_LIB_SEARCH_PATH=$LLVMGCCDIR/bytecode-libs +export LLVMGCCDIR LLVM_LIB_SEARCH_PATH + +#-- all the directories should be present, but just in case... +[ -d $LLVM_INSTALL_PREFIX ] || mkdir -p $LLVM_INSTALL_PREFIX +[ -d $CFEINSTALL ] || mkdir -p $CFEINSTALL + +#-- build the llvm tools first so we can build the cfrontend (CFE) +cd llvm +LLVM_ETCDIR=/etc/llvm +export LLVM_ETCDIR +./configure --prefix=$LLVM_INSTALL_PREFIX \ + $OTHER_CONFIG_OPTIONS +make tools-only +[ $? = "0" ] || exit 10 +cd .. + +#-- now build the cfrontend +export PATH=$CURDIR/llvm/Release/bin:$PATH +cd llvm-gcc4-1.7.source +[ -d build ] || mkdir build +[ -d install ] || mkdir install + +cd build +../configure --prefix=/usr/lib/llvm/llvm-gcc4 --enable-threads \ + --disable-nls --disable-shared --enable-languages=c,c++ \ + --enable-sjlj-exceptions \ + --enable-llvm=${CURDIR}/llvm --program-prefix=llvm- +make +[ $? = "0" ] || exit 20 + +export LLVM_LIB_SEARCH_PATH=`pwd`/gcc +make all +[ $? = "0" ] || exit 22 +make install +[ $? = "0" ] || exit 24 + +#-- minor fixups +#echo "( cd $CFEINSTALL/bin; ln -s gcc llvm-gcc )" +#( cd $CFEINSTALL/bin; ln -s gcc llvm-gcc ) +#echo "( cd $CFEINSTALL/bin; ln -s g++ llvm-g++ )" +#( cd $CFEINSTALL/bin; ln -s g++ llvm-g++ ) +#echo "( cd $CFEINSTALL/bin; ln -s gcc llvmgcc )" +#( cd $CFEINSTALL/bin; ln -s gcc llvmgcc ) +#echo "( cd $CFEINSTALL/bin; ln -s g++ llvmg++ )" +#( cd $CFEINSTALL/bin; ln -s g++ llvmg++ ) + +cd ../.. + +#-- build the llvm runtime now that we have a CFE +cd llvm +export LLVM_ETCDIR=/etc/llvm +export PATH=$CFEINSTALL/bin:$PATH +#export LLVMGCCDIR=$CFEINSTALL +#export LLVMGCC=$CFEINSTALL/bin/llvm-gcc +#export LLVMGXX=$CFEINSTALL/bin/llvm-g++ +#./configure --prefix=$LLVM_INSTALL_PREFIX \ +# --sysconfdir=$DESTDIR/etc/llvm \ +# --mandir=$LLVM_INSTALL_PREFIX/share/man \ +# --with-llvmgccdir=$CFEINSTALL \ +# --with-gnu-ld $OTHER_CONFIG_OPTIONS +./configure --prefix=$LLVM_INSTALL_PREFIX \ + --sysconfdir=$DESTDIR/etc/llvm \ + --mandir=$LLVM_INSTALL_PREFIX/share/man \ + --with-gnu-ld $OTHER_CONFIG_OPTIONS +make +[ $? = "0" ] || exit 30 + +[ -d $CFEINSTALL/bytecode-libs ] || mkdir -p $CFEINSTALL/bytecode-libs +make -C runtime install-bytecode +[ $? = "0" ] || exit 32 +cd .. + +export LLVM_LIB_SEARCH_PATH=$CFEINSTALL/bytecode-libs + +#-- build symbol tables for the runtime libs to help speed up link times +PREVDIR=`pwd` +cd $CFEINSTALL/lib +llvm-ranlib libiberty.a +llvm-ranlib libstdc++.a +llvm-ranlib libsupc++.a + +cd $CFEINSTALL/lib/gcc/*/4.* +llvm-ranlib libgcc.a +llvm-ranlib libgcov.a + +#-- do final install +cd $PREVDIR +cd llvm-gcc4-1.7.source/build +make install +cd ../.. +cd llvm +make install + +#-- all done +exit 0 + --- llvm-1.7.orig/Makefile +++ llvm-1.7/Makefile @@ -0,0 +1,68 @@ +# +# Build LLVM from scratch (actually, starting from the original +# upstream tarballs) +# +# + +FIND=/usr/bin/find +RM=/bin/rm +STAMPDIR=./stamp +TAR=/bin/tar +INSTALL=/usr/bin/install + +all: $(STAMPDIR)/done-stamp +$(STAMPDIR)/done-stamp: $(STAMPDIR)/build-stamp + [ -d $(STAMPDIR) ] || mkdir -p $(STAMPDIR) + touch $(STAMPDIR)/done-stamp + +install: $(STAMPDIR)/install-stamp +$(STAMPDIR)/install-stamp: $(STAMPDIR)/build-stamp +# ( cd llvm-gcc4-1.7.source; make install ) +# ( cd llvm; make install ) + + #-- we wrap parts with env variables + $(INSTALL) -m 655 llvmgcc.sh $(DESTDIR)/usr/bin/llvmgcc + $(INSTALL) -m 655 llvmg++.sh $(DESTDIR)/usr/bin/llvmg++ + + #-- we need to wrap the driver with an env variable, too + $(INSTALL) -m 655 llvm/Release/bin/llvmc \ + $(DESTDIR)/usr/lib/llvm/llvmc + $(INSTALL) -m 655 llvmc.sh $(DESTDIR)/usr/bin/llvmc + + [ -d $(STAMPDIR) ] || mkdir -p $(STAMPDIR) + touch $(STAMPDIR)/install-stamp + +build: $(STAMPDIR)/build-stamp +$(STAMPDIR)/build-stamp: $(STAMPDIR)/patch-stamp + #-- run the build script + ( chmod +x ./build.sh ) + ./build.sh + + [ -d $(STAMPDIR) ] || mkdir -p $(STAMPDIR) + touch $(STAMPDIR)/build-stamp + +patch: $(STAMPDIR)/patch-stamp +$(STAMPDIR)/patch-stamp: $(STAMPDIR)/unpack-stamp + dpatch apply-all + + [ -d $(STAMPDIR) ] || mkdir -p $(STAMPDIR) + touch $(STAMPDIR)/patch-stamp + +unpack: $(STAMPDIR)/unpack-stamp +$(STAMPDIR)/unpack-stamp: + $(TAR) xvzf llvm-gcc4-1.7.source.tar.gz + $(FIND) llvm-gcc4-1.7.source -name .cvsignore -exec rm -f {} \; + $(TAR) xvzf llvm-1.7.tar.gz + $(FIND) llvm -name .cvsignore -exec rm -f {} \; + $(TAR) xvzf llvm-test-1.7.tar.gz + $(FIND) llvm-test -name .cvsignore -exec rm -f {} \; + + [ -d $(STAMPDIR) ] || mkdir -p $(STAMPDIR) + touch $(STAMPDIR)/unpack-stamp + +unpatch: clean unpack + +clean: + $(RM) -rf $(STAMPDIR) + $(RM) -rf llvm-gcc4-1.7.source llvm llvm-test +