From: Joachim Breitner Date: Wed, 1 Apr 2015 11:35:10 +0000 (+0000) Subject: Import ghc_7.6.3-21.debian.tar.xz X-Git-Tag: archive/raspbian/8.0.2-9+rpi1~1^2^2^2^2^2~13^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=88728f81896ffec9d8250325005d9b91a8ff5bef;p=ghc.git Import ghc_7.6.3-21.debian.tar.xz [dgit import tarball ghc 7.6.3-21 ghc_7.6.3-21.debian.tar.xz] --- 88728f81896ffec9d8250325005d9b91a8ff5bef diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh new file mode 100644 index 00000000..a90d4d64 --- /dev/null +++ b/Dh_Haskell.sh @@ -0,0 +1,239 @@ +strip_hash(){ + echo "$1" | sed 's/-................................$//' +} + +sort_uniq(){ + { + for i in "$@" ; do + echo $i + done + } | sort -u | tr "\n" " " +} + +dependency(){ + local package + local version + local next_upstream_version + package=$1 + version=`dpkg-query --showformat='${Version}' -W $package` + next_upstream_version=`echo $version | sed -e 's/-[^-]*$//' -e 's/$/+/'` + echo "$package (>= $version), $package (<< $next_upstream_version)" +} + +providing_package_for_ghc(){ + local package + local dep + local dir + local dirs + local lib + dep=`strip_hash $1` + dirs=`ghc-pkg field $dep library-dirs | grep -i ^library-dirs | cut -d':' -f 2` + lib=`ghc-pkg field $dep hs-libraries | grep -i ^hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' ` + for dir in $dirs ; do + if [ -e "${dir}/lib${lib}.a" ] ; then + package=`dpkg-query -S ${dir}/lib${lib}.a | cut -d':' -f 1` || exit $? + continue + fi + done + echo $package +} + +providing_package_for_ghc_prof(){ + local package + local dep + local dir + local dirs + local lib + dep=`strip_hash $1` + dirs=`ghc-pkg field $dep library-dirs | grep -i ^library-dirs | cut -d':' -f 2` + lib=`ghc-pkg field $dep hs-libraries | grep -i ^hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' ` + for dir in $dirs ; do + if [ -e "${dir}/lib${lib}_p.a" ] ; then + package=`dpkg-query -S ${dir}/lib${lib}_p.a | cut -d':' -f 1` || exit $? + continue + fi + done + echo $package +} + +cabal_package_ids(){ + local config + local package_ids + until [ -z "$1" ] + do + config=$1 + package_ids="$package_ids `grep-dctrl -n -i -s Id "" $config`" + shift + done + echo $package_ids +} + +cabal_depends(){ + local config + local dep + local depends + local final_depends + until [ -z "$1" ] + do + config=$1 + depends="$depends `grep-dctrl -n -i -s Depends "" $config | tr "," " "`" + shift + done + for dep in `sort_uniq $depends` ; do + # The package is not mentioned in the ignored package list with the same version + # or mentioned without any version in the ignored package list? + if echo " $ignores " | grep -qv " $dep " && + echo " $ignores " | grep -qv " `echo $dep | sed s%-[0-9][.0-9a-zA-Z]*$%%` " ; + then + final_depends="$final_depends $dep" + fi + done + echo $final_depends +} + +hashed_dependency(){ + local type + local pkgid + local virpkg + type=$1 + pkgid=$2 + virtual_pkg=`package_id_to_virtual_package $type $pkgid` + # As a transition measure, check if dpkg knows about this virtual package + if dpkg-query -W $virtual_pkg >/dev/null 2>/dev/null; + then + echo $virtual_pkg + fi +} + +depends_for_ghc(){ + local dep + local packages + local pkgid + for pkgid in `cabal_depends $@` ; do + dep=`hashed_dependency dev $pkgid` + if [ -z "$dep" ] + then + pkg=`providing_package_for_ghc $pkgid` + if [ -n "$pkg" ] + then + dep=`dependency $pkg` + packages="$packages, $dep" + fi + else + packages="$packages, $dep" + fi + done + + echo $packages | sed -e 's/^,[ ]*//' +} + +depends_for_ghc_prof(){ + local dep + local packages + local pkgid + for pkgid in `cabal_depends $@` ; do + dep=`hashed_dependency prof $pkgid` + if [ -z "$dep" ] + then + pkg=`providing_package_for_ghc_prof $pkgid` + dep=`dependency $pkg` + fi + packages="$packages, $dep" + done + + echo $packages | sed -e 's/^,[ ]*//' +} + +provides_for_ghc(){ + local dep + local packages + for package_id in `cabal_package_ids $@` ; do + packages="$packages, `package_id_to_virtual_package dev $package_id`" + done + echo $packages | sed -e 's/^,[ ]*//' +} + +provides_for_ghc_prof(){ + local dep + local packages + for package_id in `cabal_package_ids $@` ; do + packages="$packages, `package_id_to_virtual_package prof $package_id`" + done + echo $packages | sed -e 's/^,[ ]*//' +} + +package_id_to_virtual_package(){ + local type + type="$1" + echo $2 | tr A-Z a-z | \ + grep '[a-z0-9]\+-[0-9\.]\+-................................' | \ + perl -pe 's/([a-z0-9-]+)-([0-9\.]+)-(.....).........................../libghc-\1-'$type'-\2-\3/' +} + +depends_for_hugs(){ + local version + local upstream_version + version=`dpkg-query --showformat='${Version}' -W hugs` + upstream_version=`echo $version | sed -e 's/-[^-]*$//'` + echo "hugs (>= $upstream_version)" +} + +find_config_for_ghc(){ + local f + local pkg + pkg=$1 + case "$pkg" in + ghc-prof) + pkg=ghc + ;; + libghc-*-prof) + pkg=`echo $pkg | sed -e 's/-prof$/-dev/'` + ;; + *) + ;; + esac + for f in debian/$pkg/var/lib/ghc/package.conf.d/*.conf ; do + if [ -f "$f" ] ; then + echo $f + echo " " + fi + done +} + + +if ! [ `which grep-dctrl` > /dev/null ] ; then + echo "grep-dctrl is missing" >&2 + exit 1 +fi + +args= +ignores= +files= +until [ -z "$1" ] +do + case "$1" in + -X*) + pkg=${1##-X} + ignores="$ignores $pkg" + ;; + + --exclude=*) + pkg=${1##--exclude=} + ignores="$ignores $pkg" + ;; + + -*) + args="$args $1" + ;; + *) + if [ -f $1 ] ; then + files="$files $1" + else + echo "Installed package description file $1 can not be found" >&2 + exit 1 + fi + ;; + esac + shift +done + diff --git a/changelog b/changelog new file mode 100644 index 00000000..57e34c94 --- /dev/null +++ b/changelog @@ -0,0 +1,2084 @@ +ghc (7.6.3-21) unstable; urgency=medium + + * Fix watch file. + * Let ghc-haddock break on ghc-doc (<< 7.6.3-20~). If I used piuparts + correctly, this finally closes: #781649. + + -- Joachim Breitner Wed, 01 Apr 2015 13:35:10 +0200 + +ghc (7.6.3-20) unstable; urgency=medium + + * Mark all triggers -noawait. Possibly Closes: #769554 + + -- Joachim Breitner Sun, 23 Nov 2014 11:20:59 +0100 + +ghc (7.6.3-19) unstable; urgency=medium + + * Fix armel/armhf script munging; ghci and runghc are not available on + those arches. + + -- Joey Hess Mon, 29 Sep 2014 16:28:23 +0100 + +ghc (7.6.3-18) unstable; urgency=medium + + * Fix accidental line wrap in debian/rules + + -- Joachim Breitner Mon, 29 Sep 2014 09:52:40 +0200 + +ghc (7.6.3-17) unstable; urgency=medium + + * armel,armhf: Force use of llvm-3.4, rather than unversioned lvm, + which can have abi changes that break ghc. Closes: #763078 + + -- Joey Hess Sun, 28 Sep 2014 19:16:16 +0100 + +ghc (7.6.3-16) unstable; urgency=medium + + * Also do not conflict with libghc-binary-doc + + -- Joachim Breitner Tue, 29 Jul 2014 14:21:49 +0200 + +ghc (7.6.3-15) unstable; urgency=medium + + * Do not conflict with libghc-binary-dev. + + -- Joachim Breitner Sat, 26 Jul 2014 15:32:10 +0200 + +ghc (7.6.3-14) unstable; urgency=medium + + * Backport from 7.8: Do not panic when annotations are encountered on non-TH + architectures. Less work this way than patching all the library code. + (Closes: 752460). Thanks to Dejan Latinovic to provide the patch. + + -- Joachim Breitner Tue, 01 Jul 2014 09:18:02 +0200 + +ghc (7.6.3-13) unstable; urgency=medium + + * Actually use the conflicting-devs variable in debian/control. No idea what + went wrong yesterday. + + -- Joachim Breitner Wed, 11 Jun 2014 09:55:30 +0200 + +ghc (7.6.3-12) unstable; urgency=medium + + * Last update broke the calculation of the Provides fields, fixing. + (Closes: #751051) + + -- Joachim Breitner Mon, 09 Jun 2014 22:19:03 +0200 + +ghc (7.6.3-11) unstable; urgency=medium + + * Do no conflict with libghc-cabal-dev. + + -- Joachim Breitner Sun, 08 Jun 2014 13:56:51 +0200 + +ghc (7.6.3-10) unstable; urgency=medium + + * Team upload. + * Add ppc64el support. + + -- Colin Watson Sat, 12 Apr 2014 02:26:04 +0100 + +ghc (7.6.3-9) unstable; urgency=medium + + * Team upload. + * Ensure that all copies of config.guess and config.sub in the tree are up + to date at build time. + * Add arm64 support. + + -- Colin Watson Sat, 05 Apr 2014 02:00:21 +0100 + +ghc (7.6.3-8) unstable; urgency=medium + + * Apply a4b1a435 from upstream, to fix building on 64 big endian platforms + such as s390x. Thanks to Aurelien Jarno for pointing out the fix. + Closes: #740144 + + -- Joachim Breitner Mon, 03 Mar 2014 09:12:47 +0100 + +ghc (7.6.3-7) unstable; urgency=low + + [ Gianfranco Costamagna ] + * Bumped standard version to 3.9.5, no changes required. + + [ Joachim Breitner ] + * Depend on gcc (Closes: #736472) + + -- Joachim Breitner Sun, 09 Feb 2014 12:21:48 +0000 + +ghc (7.6.3-6) unstable; urgency=medium + + * Closes: #731597: llvm-3.3 compatibility (patch from upstream) + + -- Joachim Breitner Sun, 08 Dec 2013 18:28:30 +0000 + +ghc (7.6.3-5) unstable; urgency=low + + [ Gianfranco Costamagna ] + * Removing gcc from control file build-deps + + [ Louis Bettens ] + * fix cabal bug #1087 in current version + + -- Gianfranco Costamagna Wed, 28 Aug 2013 16:14:21 +0200 + +ghc (7.6.3-4) unstable; urgency=low + + [ Colin Watson ] + * Enable verbose build output (see + http://lists.debian.org/debian-devel/2013/06/msg00539.html). + + [ Gianfranco Costamagna ] + + * Switch to llvm (Closes: #711948) + * removed deprecated DM-Upload-Allowed + * removed some version checks, higher versions are already in oldstable. + * Added dpkg-buildflags as build-dep, fixing lintian warning. + + -- Joachim Breitner Fri, 16 Aug 2013 14:40:37 +0200 + +ghc (7.6.3-3) unstable; urgency=low + + * Add patches/Handle-sign-bit-when-generating-veneer-for-ARM-Thumb.patch, + patch by Colin Watson + * Disable GHCi on arm, as it is severly borken (for more information see + http://hackage.haskell.org/trac/ghc/ticket/7794) + * Do not create system-wide documentation index if /usr/share/doc is + missing. (Closes: #709911) + * Create a symlink from prof_scc.png to prof_scc (Closes: #664043) + + -- Joachim Breitner Wed, 05 Jun 2013 20:57:49 +0200 + +ghc (7.6.3-2) unstable; urgency=low + + * Enable compat level 9 + * Remove transitional ghc6-* packages + + -- Joachim Breitner Fri, 24 May 2013 11:12:19 +0200 + +ghc (7.6.3-1) experimental; urgency=low + + * New upstream release + + -- Joachim Breitner Sun, 21 Apr 2013 19:12:24 +0200 + +ghc (7.6.2-1) experimental; urgency=low + + * New upstream release + + -- Joachim Breitner Tue, 29 Jan 2013 21:16:52 +0100 + +ghc (7.6.1.20121207-2) experimental; urgency=low + + * Typo in ghc-haddock’s Provides, thanks to David Fox for noticing. + + -- Joachim Breitner Thu, 13 Dec 2012 18:33:48 +0100 + +ghc (7.6.1.20121207-1) experimental; urgency=low + + * New upstream release (aka 7.6.1-rc). + + Closes: #677096 (huge number of wakeups) + * Remove debian/patches/armhf_llvm_abi, applied upstream, thanks to Shawn + Landden for noticing (Closes: #695739) + * Hardcode in debian/rules that haddock supportin interface version 22 also + supports interface version 21. + + -- Joachim Breitner Wed, 12 Dec 2012 12:32:48 +0100 + +ghc (7.6.1-3) experimental; urgency=low + + * Bump standards version, no change + * Change VCS fields back to regular repo + * Build the runtime also in the thr_debug_p way, suggestion by Michał J. + Gajda + + -- Joachim Breitner Tue, 04 Dec 2012 22:00:27 +0100 + +ghc (7.6.1-2) experimental; urgency=low + + * Do not Provide transformers, it is only used internally. + * Ensure this is not used with unstable’s haskell-devscripts + + -- Joachim Breitner Mon, 08 Oct 2012 22:41:46 +0200 + +ghc (7.6.1-1) experimental; urgency=low + + * New upstream release + Dropped patches, applied upstream: + + Fix-GHCi-segfault-on-linux-powerpc + + hurd-is-ELF + + use-llvm-3.0 + + memcpy-ffi + + fix-PPC-right-shift-bug + + no-useless-time + + fix-ppc-ghci-segfault + * Configure the use of llc-3.0 and opt-3.0 via ./configure + * Bump standards version + + -- Joachim Breitner Mon, 08 Oct 2012 15:48:21 +0200 + +ghc (7.4.2-2) experimental; urgency=low + + [ Erik de Castro Lopo ] + * Add patch to fix GHCi segfault on startup on PowerPC (Closes: #631073). + * Remove patch no_ghci_on_powerpc. + + [ Iain Lane ] + * Update Vcs-* to point to experimental branch + + -- Erik de Castro Lopo Mon, 6 Aug 2012 20:19:46 +1000 + +ghc (7.4.2-1) experimental; urgency=low + + * New upstream. + * debian/patches/series + - Remove patch fix-ARM-s-StgCRun-clobbered-register-list-for-both-A, + fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis and memcpy-ffi.patch + (in upstream). + - Refresh other patches. + + -- Erik de Castro Lopo Mon, 11 Jun 2012 15:21:26 +1000 + +ghc (7.4.1-4) unstable; urgency=low + + [ Erik de Castro Lopo ] + * Add debian/patches/fix-PPC-right-shift-bug which fixes upstream GHC bug: + http://hackage.haskell.org/trac/ghc/ticket/6156 (Closes: #677591) + * Refresh other patches. + * debian/contol: Add myself to uploaders and set DM-Upload-Allowed to yes. + + [ Joachim Breitner ] + * debian/patches/no-useless-timer: Backported from GHC 7.4.2, (Closes: + #677096) + * Make sure GHC is using ld.bfd, as it passes arguments not understood by + the gold linker (Closes: #673081) + * Use a saner priority for the runhaskell alternative. (Closes: #676970). + TODO for later: Consider removing the alternatives code altogether. + + -- Joachim Breitner Sat, 16 Jun 2012 12:48:18 +0200 + +ghc (7.4.1-3) unstable; urgency=low + + * Remove the ghc-doc symlink logic from 7.0.4-3, as with 7.4.1, every + documentation package had to be rebuit. + * ghc-doc: Conflict on libghc-haddock-doc, as it contains files that moved + into ghc-doc. (Closes: #659081) + * Added debian/patches/memcpy-ffi.patch, backported from upstream master + branch. See http://hackage.haskell.org/trac/ghc/ticket/5967. + + -- Joachim Breitner Sun, 06 May 2012 21:51:17 +0200 + +ghc (7.4.1-2) unstable; urgency=low + + [ Iain Lane ] + + * Two new patches (backported by Iulian Udrea) to fix armel build + failures. See upstream bug #5824. + - fix-ARM-s-StgCRun-clobbered-register-list-for-both-A + - fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis + * Use dh_autoreconf{,_clean} to autoreconf, mainly so we can have proper + clean support. + * armhf support (thanks to Jani Monoses): + - debian/patches/ARM-VFPv3D16: Use vfp3-d16 FPU for ARM builds. + - debian/patches/armhf_llvm_abi: Pass -float-abi=hard to llc on armhf if + __ARM_PCS_VFP is defined (needs to be preprocessed for this) + - debian/rules: Define __ARM_PCS_VFP on armhf for the above patch. + + [ Joachim Breitner] + + * patches/hurd-is-ELF added, Closes: #659530, thanks to Samuel + Thibault + * Also conflict with any provided libghc-*-dev packages. Thus, if a packages + is moved _into_ ghc that was outside before, no external package can be + installed (as was the case with binary). + * patches/no-missing-haddock-file-warning: Quench warning, as it is quite + common on Debian installations. + * build-depends-indep on hscolour and fop, to ensure most documentation is + built. + + -- Joachim Breitner Sat, 10 Mar 2012 19:32:34 +0100 + +ghc (7.4.1-1) unstable; urgency=low + + * New upstream release. + + -- Joachim Breitner Fri, 03 Feb 2012 16:27:31 +0100 + +ghc (7.4.0.20120126-1) experimental; urgency=low + + * New upstream release candidate (7.4.1-rc2) + + -- Joachim Breitner Sat, 28 Jan 2012 13:31:10 -0500 + +ghc (7.4.0.20120108-1) experimental; urgency=low + + * s/armef/armhf/ in debian/control + * New upstream release, drop all patches introduced in 7.4.0.20111219-3, + applied upstream. + + -- Joachim Breitner Mon, 09 Jan 2012 13:22:18 +0100 + +ghc (7.4.0.20111219-4) experimental; urgency=low + + * Prefix haddock interface number with "haddock-interface" in + Depends/Provides pair + * Switch to llvm and registered builds on arm* + * Do not set UseLibFFIForAdjustors in debian/rules, as the code in + ./mk/config.mk.in seems to do the same anyways. + * Do not set GhcWithInterpreter=YES for kfreebsd-*, done in + ./mk/config.mk.in by now. + * Do not set GhcUnregisterised=YES in debian/rules, ./mk/config.mk.in + already makes the right choice. + * Do not build the accidentally included dph libraries. + * Explicitly depend on llv-3.0 and use corresponding binary names. + + -- Joachim Breitner Mon, 02 Jan 2012 20:39:42 +0100 + +ghc (7.4.0.20111219-3) experimental; urgency=low + + * patches/kfreebsd-OS: KFreeBSD is an ELF-based OK + * patches/S390-Arch: Mention bitness of S390(x) + * patches/ArchMips: Add more missing Arch values + + -- Joachim Breitner Fri, 30 Dec 2011 18:05:33 +0100 + +ghc (7.4.0.20111219-2) experimental; urgency=low + + * Fix building bundeled haddock out-of-tree (We need to re-think this + approach). + * Drop patches/lpthread-bootstrap-workaround, probably not needed any + more. Also drop autoconf dependency. + + -- Joachim Breitner Fri, 23 Dec 2011 09:23:42 +0100 + +ghc (7.4.0.20111219-1) experimental; urgency=low + + * New upstream release (AKA 7.4.1-rc1) + + Closes: #635587 (GHCi linker could not find libstdc++) + + Closes: #514720 (cabal installation wrecks permissions) (was actually + closed earlier, I think) + + Closes: #533022 (Data.Word should define instances of Random for each + type) + + -- Joachim Breitner Thu, 22 Dec 2011 14:34:50 +0100 + +ghc (7.2.2-1) experimental; urgency=low + + * New upstream release + * Call autoconf and remove configure in clean, to avoid having an + autoreconf-patch in debian/patches. + * Drop patches/hash-version-number, applied upstream + * Drop improve_linker_script_handling, applied upstream + + -- Joachim Breitner Sat, 19 Nov 2011 18:34:17 +0100 + +ghc (7.2.1-1) experimental; urgency=low + + * New upstream release. + + -- Joachim Breitner Tue, 23 Aug 2011 20:58:31 +0200 + +ghc (7.2.0.20110728-1) experimental; urgency=low + + * Remove ghc-doc dependency on ghc, it did not have the desired effect. + Instead call ghc-pkg recache in ghc-doc’s trigger as well. + * Install 7.2.1-rc1 to experimental. + * Undo the symlink-workarounds introduced in 7.0.4-3. The -doc work-around + is still needed, as the haddock interface version did not change. + + -- Joachim Breitner Sat, 06 Aug 2011 19:50:04 +0200 + +ghc (7.0.4-9) UNRELEASED; urgency=low + + * Suggest llvm package + + -- Joachim Breitner Thu, 10 Nov 2011 19:19:41 +0100 + +ghc (7.0.4-8) unstable; urgency=low + + * Remove ghci support on powerpc (Closes: #631073) + + -- Joachim Breitner Sun, 30 Oct 2011 17:56:23 +0100 + +ghc (7.0.4-7) unstable; urgency=low + + [ Joachim Breitner ] + * patches/configure-s390x: Add s390x to the list of known architectures. + * add armhf in debian/rules (Patch by Riku Voipio, Closes: #640811) + + [ Iain Lane ] + * Handle linker scripts for which dlopen returns "file too short" and/or + which contain INPUT statements (for example libncurses.so) (Closes: + #644591) + * Standards-Version → 3.9.2, no changes required + + -- Iain Lane Tue, 18 Oct 2011 17:09:39 +0100 + +ghc (7.0.4-6) unstable; urgency=low + + * Fix #609445 by actually removing the patch for #566331, not needed any + more since this upstream commit: + + Sat Jul 31 12:55:06 BST 2010 Ian Lynagh + * Expose the functions haddock needs even when haddock is disabled; #3558 + + + -- Joachim Breitner Wed, 31 Aug 2011 08:44:33 +0200 + +ghc (7.0.4-5) unstable; urgency=low + + * Remove ghc-doc dependency on ghc, it did not have the desired effect. + Instead call ghc-pkg recache in ghc-doc’s trigger as well. + * Fix missing instance documentation (Closes: #609445) + This was a Debian-specific regression, introduced in the fix for #566331 + or later caused by it, and fixed by building haddock with -DGHCI. + + -- Joachim Breitner Sat, 30 Jul 2011 16:09:07 +0200 + +ghc (7.0.4-4) unstable; urgency=low + + * Let ghc-doc depend on ghc. It already does via ghc-haddock, making this + explicit ensures that the triggers run in the right order. + * debian/patches/hash-version-number: Include the upstream version number in + the ABI hash. We do need to recompile everything, even after a minor ghc + upgrade. This allows to use the same mechanism to ensure correctness and + detect that we need to recompile something as for other kind of + recompilations. (Closes: #633828) + + -- Joachim Breitner Sat, 16 Jul 2011 11:23:09 +0200 + +ghc (7.0.4-3) unstable; urgency=low + + * Employ similar symlink work-around to merge /var/lib/ghc-*/package.conf.d + into /var/lib/ghc/package.conf.d. Also remove version number from + /usr/lib/ghc path. + + -- Joachim Breitner Mon, 11 Jul 2011 13:13:45 +0200 + +ghc (7.0.4-2) unstable; urgency=low + + * Fix ghc-ghci existance check logic + + -- Joachim Breitner Sun, 10 Jul 2011 15:23:55 +0200 + +ghc (7.0.4-1) unstable; urgency=low + + * New upstream release (Closes: #622731) + + -- Joachim Breitner Sat, 09 Jul 2011 19:50:41 +0200 + +ghc (7.0.3-2) unstable; urgency=low + + * Mention correct haddock version in package description. + * Install .haddock files under /usr/lib/ghc-doc/haddock, a path valid across + ghc-versions. Also move them to the ghc-doc package. + * In ghc-doc.prerm, do a better job of cleaning + /usr/share/doc/ghc-doc/html/libraries of files generated when creating the + haddock index. + * Make Provides: ghc-ghci dependent on existence of ghci binary + (Closes: #629038) + * Make ghc-haddock depend on the exact version of ghc, just to be on the + safe side. (Closes: #539312) + + -- Joachim Breitner Sat, 18 Jun 2011 21:07:06 +0200 + +ghc (7.0.3-1) unstable; urgency=low + + * Remove Build-Conflict on dash, as a fixed package has been uploaded. + * Do not provide utf8-string or xhtml, as they are only built internally. + * Remove Build-Depend alternative ghc6, and also remove Provides: ghc6, as + this is a lie and I see no techical reason for it. + * New upstream release + * Avoid "hPutChar: resource vanished" message and simplify postinst script + (Closes: #619403) + * Remove package cache in prerm, even on upgrade. This is the right thing to + do if upgrading to a new upstream release, and does not hurt in the other + cases. + + -- Joachim Breitner Sat, 09 Apr 2011 21:43:15 +0530 + +ghc (7.0.2-7) unstable; urgency=low + + * Upload to unstable + + -- Joachim Breitner Sat, 26 Mar 2011 21:45:53 +0530 + +ghc (7.0.2-6) experimental; urgency=low + + * Set a dummy HOME variable upon build. Some build daemons do not set HOME, + but ghc-cabal expects it to be available. + + -- Joachim Breitner Fri, 25 Mar 2011 12:47:29 +0530 + +ghc (7.0.2-5) experimental; urgency=low + + * Build-Conflict with broken version of dash (See #618023) + * Link ghc-doc to haddock via virtual package "haddock-interface-" + * Remove redundand Build-dependency on autoconf + + -- Joachim Breitner Wed, 23 Mar 2011 12:03:56 +0530 + +ghc (7.0.2-4) experimental; urgency=low + + * ghc6-preinst: Remove package.cache file of any ghc6 installation to avoid + dpkg warning at upgrade time. + * Build-conflict with ccache. pbuilder installs ccache by default, which + causes ghc to pick up a wrong path for "gcc". + * Pass -lpthread everywhere. This can possibly be dropped later. + + -- Joachim Breitner Fri, 11 Mar 2011 14:00:11 +0530 + +ghc (7.0.2-3) experimental; urgency=low + + [ Iain Lane ] + * debian/rules: Build with -mminimal-toc on ppc64 — thanks to Colin + Watson for investigation and patch. + + [ Joachim Breitner ] + * Disable the use of epoll_create1 and use epoll_create, as the former is + not available on Linux kernels earlier than 2.6.27. + http://hackage.haskell.org/trac/ghc/ticket/5005 + + -- Joachim Breitner Wed, 09 Mar 2011 21:44:50 +0530 + +ghc (7.0.2-2) experimental; urgency=low + + [ Joachim Breitner ] + * Remove procps dependency (watcher.hs has been removed since a while) + * Build-depend and depend on libgmp-dev instead of libgmp3-dev. + + [ Erik de Castro Lopo ] + * Add patch to fix powerpc compile error (powerpc-compile-616635) + (Closes: #616635) + + [ Joachim Breitner ] + * fix FTBFUS by removing left-over binaries + + -- Joachim Breitner Tue, 08 Mar 2011 13:01:18 +0530 + +ghc (7.0.2-1) experimental; urgency=low + + * (Closes: 554174) Segfaults at startup not observable any more + * Tweak debian/copyright + * New upstream release (Should help to close 616494) + + -- Joachim Breitner Sat, 05 Mar 2011 22:04:21 +0530 + +ghc (7.0.1-1) experimental; urgency=low + + [ Joachim Breitner ] + * New upstream release, some patches included. + * Package adopted by the Debian Haskell Group. Thanks to kaol for his + work! + * Rename source and binary packages to ghc, include transitional dummy + package + * Standards-Version 3.9.1 (no changes necessary) + + [ Erik de Castro Lopo ] + * Re-enable building of ghci on powerpc. (Closes: 557185) + + -- Joachim Breitner Mon, 17 Jan 2011 12:49:24 +0530 + +ghc6 (6.12.3-1) experimental; urgency=low + + * New upstream release + * ghci :m now works with module names containing ' (Closes: #580568) + * Put haddock and the shared libraries into their own packages. + (Closes: #571537) + * Only insert packages in gen_contents_index which are both registered + and for which the html directory exists. + * Use ghc-pkg --global in ghc6's trigger to avoid accessing HOME. + (Closes: #578679) + * Fix directories in haddock manpage. (Closes: #578321) + * Apply some patches from Gentoo (thanks, Sergei Trofimovich) hopefully + fixing ia64 build. + * Downgrade ghc6's dependency on perl to Suggests and have ghc6-doc + depend on perl. (Closes: #553332) + * Standards-Version 3.9.0 (no changes necessary) + * ghc6 package now provides ghc6-ghci on architectures where it's + supported (i386 and amd64 only currently). + + -- Kari Pahula Tue, 20 Jul 2010 19:19:20 +0300 + +ghc6 (6.12.1-13) unstable; urgency=low + + * Remove debian/watcher.sh. (Closes: #571824) + * Don't ship /var/lib/ghc-6.12.1/package.conf.d/package.cache with ghc6. + (Closes: #574417) + * Patch compiler/rename/RnSource.lhs to make hlist happy. + * Remove some more generated .hc files in debian/rules clean. + * Don't ship broken symlink /usr/lib/ghc-6.12.1/package.conf + + -- Kari Pahula Sat, 17 Apr 2010 10:35:25 +0300 + +ghc6 (6.12.1-12) unstable; urgency=low + + * Fix the kfreebsd-* patch. + * Don't die in ghc6's trigger if ghc-pkg check fails. (Closes: #570921) + * Recognise DEB_BUILD_OPTIONS=parallel. + + -- Kari Pahula Mon, 22 Feb 2010 15:08:48 +0200 + +ghc6 (6.12.1-11) unstable; urgency=low + + * Add "unset LC_ALL\nexport LC_CTYPE=en_US" to bin/ghc wrapper on ia64. + * Actually append GhcWithInterpreter=YES to mk/build.mk on kfreebsd-*, + don't just echo it to stdout. + + -- Kari Pahula Mon, 22 Feb 2010 03:24:02 +0200 + +ghc6 (6.12.1-10) unstable; urgency=low + + * Use dh_haskell_depends from haskell-devscripts to create provides + including the packages ABI. + * Make provided substvar for utf8-string too. + * Run "ghc-pkg check" in ghc6's trigger also. + * Added a stub /usr/share/doc/ghc6-doc/index.html that redirects to + html/index.html. + + -- Kari Pahula Fri, 19 Feb 2010 18:08:57 +0200 + +ghc6 (6.12.1-9) unstable; urgency=low + + * Remove /usr/lib/ghc-$(ProjectVersion)/lib/haddock (ie. the internal + haddock binary that ghc6 used at build time) from the ghc6 package. + * Install haddock's files from /usr/share/haddock-$VERSION in ghc6 + package, not ghc6-doc. + + -- Kari Pahula Sat, 13 Feb 2010 02:49:11 +0200 + +ghc6 (6.12.1-8) unstable; urgency=low + + * Use tabs instead of 8 spaces in debian/rules for ia64 specific flags. + + -- Kari Pahula Wed, 10 Feb 2010 13:19:32 +0200 + +ghc6 (6.12.1-7) unstable; urgency=low + + * Include patches to haddock to ghc6's own patches and don't apply them + in debian/rules. + * Update the patch for alpha. + * ghc6-doc depends on ghc6 (>= ${binary:Version}), not haddock. + * Upload to unstable. + + -- Kari Pahula Tue, 09 Feb 2010 23:45:14 +0200 + +ghc6 (6.12.1-6) experimental; urgency=low + + * Use some more compiler flags to make ghc6 build on ia64 for real. + * Patch TcForeign.lhs and EventLog.c to make ghc6 build on alpha. + + -- Kari Pahula Mon, 08 Feb 2010 13:58:59 +0200 + +ghc6 (6.12.1-5) experimental; urgency=low + + * Included haddock with the ghc6 package. Provides, conflicts and + replaces haddock. Copied over haddock.1 from the haddock package. + * Build with UseLibFFIForAdjustors=YES on alpha. + * Set ghc6 depend on libc6-dev. (Closes: #567809) + * Standards-Version 3.8.4, no changes necessary. + * Patch up the sources some more for kfreebsd. (Closes: #567298) + + -- Kari Pahula Fri, 05 Feb 2010 12:05:15 +0200 + +ghc6 (6.12.1-4) experimental; urgency=low + + * Patched utils/haddock/src/Haddock/Interface/Create.hs to use + lookupGlobalName instead of lookupName when GHCI is + unavailable. (Closes: #566331) + + -- Kari Pahula Thu, 28 Jan 2010 11:46:55 +0200 + +ghc6 (6.12.1-3) experimental; urgency=low + + * Updated ghc-pkg's man page. + * Added a trigger to run ghc-pkg recache when files are added to + /var/lib/ghc-6.12.1/package.conf.d/. + * Patch rts/posix/OSThreads.c to define _GNU_SOURCE on kfreebsd + too. (Closes: #565818) + * Patch utils/haddock/src/Haddock/Interface/AttachInstances.hs to use + Nothing as mb_info in attachInstances when GHCI is + unavailable. (Closes: #566331) + * Breaks cabal-install (<< 0.8.0). + + -- Kari Pahula Wed, 27 Jan 2010 23:37:32 +0200 + +ghc6 (6.12.1-2) experimental; urgency=low + + * Added missing build dependency: libncurses5-dev. + * Use the included haddock to build documentation and drop the + build-depends-indep on haddock. + + -- Kari Pahula Wed, 13 Jan 2010 10:02:15 +0200 + +ghc6 (6.12.1-1) experimental; urgency=low + + * New upstream release (Closes: #539789) + * System.Posix.Semaphore fixed. (Closes: #544127) + * Switch to dpkg-source 3.0 (quilt) format + * Standards-Version 3.8.3 (no changes necessary). + * Added a dependency on libbsd-dev (Closes: #549403) + * Patched compiler/utils/Panic.lhs to add a message to internal GHC + error messages, suggesting removing .hi files and pointing to + README.Debian. (Closes: #532443) + * Don't alter Binary.hs and just let Ints to be stored in architecture + native format. + * Don't set XMLDocWays in build.mk since it's not used anymore. + * Remove lpia arch from debian/rules. + * Split debian/rules binary to binary-arch and binary-indep. (Closes: #543972) + * Set SRC_HC_OPTS += -lffi in build.mk and update the patch + system-libffi to use Debian's packaged libffi. + * Update the patch to make the build system use /usr/bin/haddock and not + build its own. + + -- Kari Pahula Tue, 12 Jan 2010 16:29:03 +0200 + +ghc6 (6.10.4-2) unstable; urgency=low + + * Patch libraries/unix/System/Posix/Semaphore.hsc + + -- Kari Pahula Sat, 29 Aug 2009 10:08:42 +0300 + +ghc6 (6.10.4-1) unstable; urgency=low + + * New upstream release + * Pass UseLibFFIForAdjustors=YES to build options on armel. + * Standards-Version 3.8.2 (no changes necessary). + * Pass GhcUnregisterised=NO to build options on lpia (for Ubuntu's + benefit). + + -- Kari Pahula Wed, 22 Jul 2009 15:22:36 +0300 + +ghc6 (6.10.3-3) unstable; urgency=low + + * Patch mkWeakForeignEnv# in rts/PrimOps.cmm to avoid random + segfaults. (re: + https://bugs.launchpad.net/ubuntu/+source/ghc6/+bug/382803) + * Exclude internal boot libraries from generated Provides: libghc6-* + substvars. (Closes: #531318) + + -- Kari Pahula Sat, 27 Jun 2009 17:58:49 +0300 + +ghc6 (6.10.3-2) unstable; urgency=low + + * Only call ghc-pkg6 in ghc6-doc's trigger if ghc6 is installed. + (Closes: #530732) + * Fix the test for seeing if ghci would work. + * Build a registerised build on powerpc, but disable ghci. + + -- Kari Pahula Thu, 28 May 2009 12:40:17 +0300 + +ghc6 (6.10.3-1) unstable; urgency=low + + * New upstream release + * GHCi uses stdio in blocking mode now. (Closes: #512762) + * GHC can cope with missing setitimer(ITIMER_VIRTUAL) support. + (Closes: #509252) + * Uses haskeline instead of editline. + * Only provide ghci and runghc on archs that support it. + (Closes: #320335) + * Patched compiler/utils/Binary.hs to store Ints as Int64s on 32 bit + architectures and warn if it needed to truncate when unserialising. + * Moved package.conf to /var/lib/ghc-$VERSION/. + * Added a /var/lib/ghc-$VERSION/package.conf.d/ dir. + * Set symlinks from /usr/lib/ghc-$VERSION/package.conf* to /var. + * Don't ship generated index files in /usr/share/doc/ghc6-doc/libraries/ + and remove them in postrm. (Closes: #501188) + * Remove any leftover index.html files in + /usr/share/doc/ghc6-doc/html/libraries/. (Closes: #461323) + * Bumped to debhelper compat 7 and Standards-Version 3.8.1 (no changes + needed). + * Section: haskell for ghc6 and ghc6-prof. + * Fix up generated Provides for ghc6 and ghc6-doc. + (Closes: #514085, #518400) + * Added man pages for runghc and ghc-pkg. (Closes: #460425, #315763) + * Removed alternative for /usr/bin/ghcprof. (Closes: #527382) + * Build an unregisterised build on powerpc. (Closes: #514946) + * Build-depend on a newer binutils on [arm armel]. Add -mlong-calls to + gcc's flags. + * gen_contents_index reintroduced, this time as a perl script. + * Added /usr/share/ghc6-doc/ghc-$VERSION/desc/ for copies of package + conf info in -doc packages. + * Added a preinst for ghc6, to remove a package.conf file from a removed + but not purged old version. + + -- Kari Pahula Mon, 18 May 2009 22:18:18 +0300 + +ghc6 (6.10.1+dfsg1-13) unstable; urgency=low + + * Haddock again just a B-D-I, now with (>= 2.4.1-4). + * Patched compiler/utils/Binary.hs to store Ints as Int32s on 64 bit + arches, too. + * Put .haddock files back to ghc6-doc. + + -- Kari Pahula Wed, 25 Feb 2009 05:53:48 +0200 + +ghc6 (6.10.1+dfsg1-12) unstable; urgency=low + + * Put haddock in Build-Depends on [i386 amd64 sparc powerpc mips mipsel + s390 kfreebsd-i386]. + + -- Kari Pahula Sat, 21 Feb 2009 14:08:08 +0200 + +ghc6 (6.10.1+dfsg1-11) unstable; urgency=low + + * Put .haddock files in ghc6, not ghc6-doc. + * Don't call ghc-pkg in a loop in ghc6-doc's trigger, use perl instead. + * Don't remove packages.conf on upgrade from one 6.10.1+dfsg1 version to + another. + * Generate haddock index in ghc6-doc's postinst configure, too. + + -- Kari Pahula Sat, 21 Feb 2009 10:00:19 +0200 + +ghc6 (6.10.1+dfsg1-10) unstable; urgency=low + + * chmod +x debian/mk_provided_substvars before calling it. + + -- Kari Pahula Tue, 17 Feb 2009 19:03:49 +0200 + +ghc6 (6.10.1+dfsg1-9) unstable; urgency=low + + * Made ghc6-doc's postinst only call haddock on haddock files that are + actually installed. + + -- Kari Pahula Tue, 17 Feb 2009 12:52:37 +0200 + +ghc6 (6.10.1+dfsg1-8) unstable; urgency=low + + * Moved xsltproc, docbook-xsl, docbook-xml back as Build-Depends. + + -- Kari Pahula Tue, 17 Feb 2009 09:52:55 +0200 + +ghc6 (6.10.1+dfsg1-7) unstable; urgency=low + + * Set build deps related to doc building as Build-Depends-Indep. + * Set BUILD_HADDOCK_DOCS at build time, depending on haddock's + presence. See debian/rules for rationale. + * Replaced /usr/lib/ghc6-doc/gen_contents_index with a symlink to + /bin/true. + * Amended ghc6-doc's "postinst triggered" to perform what g_c_i did. + * Added GhcDebugged=YES and some other flags to build.mk on ia64 and hppa. + * Moved provided-{dev,prof,doc} generation to its own script and catch + errors in it. (Closes: #514085, #514086) + * Further cleanups to debian/rules. + + -- Kari Pahula Mon, 16 Feb 2009 12:28:56 +0200 + +ghc6 (6.10.1+dfsg1-6) experimental; urgency=low + + * This time actually change the build on ia64 to be unregisterised. + * Dropped ghc6's dependency on haskell-utils. + * Removed calls to haskell-utils from prerm and postinst. + * Build haddock docs on i386 and amd64. (Closes: #514088) + + -- Kari Pahula Thu, 05 Feb 2009 14:14:01 +0200 + +ghc6 (6.10.1+dfsg1-5) experimental; urgency=low + + * Add libffi-dev as a dependency for ghc6. (Closes: #513289) + * Replaced libreadline5-dev with libedit-dev from ghc6's deps. + * Don't add any extra flags to GhcRTSWays build variable. + * Build a registerised build on kfreebsd-i386. (Closes: #513198) + * Build an unregisterised build on ia64. + + -- Kari Pahula Wed, 28 Jan 2009 09:23:11 +0200 + +ghc6 (6.10.1+dfsg1-4) experimental; urgency=low + + * Add pkg-config as a build dep. + * Explicitly build an unregisterised version of the compiler on other + arches but i386, amd64, powerpc, ia64. (Closes: #512827) + * Remove --relax altogether from ia64's ld flags. + + -- Kari Pahula Mon, 26 Jan 2009 15:10:54 +0200 + +ghc6 (6.10.1+dfsg1-3) experimental; urgency=low + + * Again, use the same build options for all arches and just use what + arch-specific exceptions upstream provided. + + -- Kari Pahula Fri, 23 Jan 2009 08:24:45 +0200 + +ghc6 (6.10.1+dfsg1-2) experimental; urgency=low + + * Patched the build system to use haddock from /usr/bin/, not build its + own. + * Disabled building haddock docs for this version. + * Re-enabled some of 6.8.2's build options for non-i386, non-amd64. + * Patch compiler/Makefile's ia64 build options; + s/--ld-option=-Wl,--relax/--ld-option=--relax/. + + -- Kari Pahula Wed, 21 Jan 2009 23:33:11 +0200 + +ghc6 (6.10.1+dfsg1-1) experimental; urgency=low + + * New upstream release (Closes: #495126) + * Change the calling conventions for unboxed tuples slightly. + (Closes: #365497) + * Better documentation for swapMVar. (Closes: #405717) + * Don't change code in error messages. (Closes: #499137) + * Improve error reporting for 'deriving' (Closes: #499216) + * Better error message when -XRankNTypes is missing. (Closes: #499217) + * ghc-pkg respects --global with 'field' option. (Closes: #510499) + * Repackaged to remove a copy of GNU MP library. + * Enable building the stage2 compiler on all architectures. + * Added information about libffi (which is included with GHC) to + debian/copyright. + * Manage changes to the source with quilt. + * Link against the system's libffi and add libffi-dev as a build + dependency. + * Build-dep on haddock >= 2.4.1-1. + * Build-dep on libedit-dev, removed build-dep on libreadline-dev. + * Patched gen_contents_index: fixed the case when not run inplace; trac + #2764 + * Patched libraries/base/Data/Data.hs: use Prelude.(,,) for + tuple3DataType; trac #2750 + * Added a trigger to ghc6-doc for /usr/share/doc/ghc6-doc/libraries to + run gen_contents_index. (Closes: #506568) + + -- Kari Pahula Mon, 19 Jan 2009 12:03:16 +0200 + +ghc6 (6.8.2dfsg1-1) unstable; urgency=medium + + * Repackaged the upstream tarball to remove a copy of GNU MP library + with GFDLed docs w/ invariant sections. (Closes: #511756) + + -- Kari Pahula Thu, 15 Jan 2009 07:42:47 +0200 + +ghc6 (6.8.2-7) unstable; urgency=medium + + * Build-Depend on hurd as an alternative to procps. (Closes: #481343) + * Added AC_SYS_LARGEFILE to libraries/unix/configure.ac and ran + autoreconf. (Closes: #500407) + + -- Kari Pahula Sun, 28 Sep 2008 10:32:20 +0300 + +ghc6 (6.8.2-6) unstable; urgency=medium + + * New maintainer. + * Made the perl script driver/split/ghc-split not use the obsolete $* + var (Closes: #489157) + * Copied libraries/unix/System/Posix/Resource.hsc and + libraries/base/include/HsBase.h from 6.8.3 to fix issues with + setResourceLimit. (Closes: #491909) + + -- Kari Pahula Wed, 03 Sep 2008 23:41:18 +0300 + +ghc6 (6.8.2-5) unstable; urgency=low + + * Don't build template-haskell if we're not building GHCi. + The package is largely useless without GHCi, and some of the buildds + were having trouble building template-haskell. We'll need to fix + this some other way if GHCi is to be available on every arch, though... + + -- Ian Lynagh (wibble) Thu, 01 May 2008 12:32:13 +0000 + +ghc6 (6.8.2-4) unstable; urgency=low + + * Small wibbles to debian/watcher.sh. + * Add a build-dep on procps (debian/watcher.sh runs ps). + + -- Ian Lynagh (wibble) Wed, 26 Mar 2008 17:12:18 +0000 + +ghc6 (6.8.2-3) unstable; urgency=low + + * Every 10 minutes, print any "ps ux" lines that mention gcc or ghc. + According to folks on IRC, this is standard practice. It means that + we don't have to worry about security buildds having different + timeouts to the normal builders. + * Apply upstream patch: + FIX #2073: Don't add empty lines to GHCI's history + Ian Lynagh **20080224143256 + Closes: #461170. + + -- Ian Lynagh (wibble) Mon, 24 Mar 2008 22:09:02 +0000 + +ghc6 (6.8.2-2) unstable; urgency=low + + * Apply upstream patch: + Tweak the splitter + Ian Lynagh **20080116195612 + We were generating a label ".LnLC7", which the splitter was confusing + with a literal constant (LC). The end result was the assembler tripping + up on ".Ln.text". + Closes: #466262. + * Make an hpc symlink in /usr/bin. Closes: #461146. + * Add a dep and build-dep on gcc >= 4:4.2 as we need the + -fno-toplevel-reorder flag. Closes: #461332. + * Put the right upstream source URL in debian/copyright. + Closes: #465058. + + -- Ian Lynagh (wibble) Wed, 20 Feb 2008 17:32:52 +0000 + +ghc6 (6.8.2-1) unstable; urgency=low + + * Strengthen haddock dep and build-dep to 0.8-2 as we need the + version that makes compatible files on 32 and 64 bit arches. + Closes: #433251. + * Add a build-dep on hscolour. We now use it when making the + documentation, so the haddock docs link to syntax highlighted + source. + * Remove the libsrc package. ghc6-doc now includes the sources anyway. + Closes: #432706. + * gen_contents_index is now provided by the upstream install, so we + no longer ship our own copy. However, we do have to move it into + /usr/lib rather than /usr/share/doc. + * Remove the stat2resid slave of the GHC symlink, as stat2resid + no longer exists. Closes: #432715. + * We set bindir, docdir, htmldir, dvidir, pdfdir and psdir in + mk/build.mk rather than with configure flags, as the way configure + currently works means they can't be set relative to other variables + if set with configure flags. + * We no longer pass --datadir to configure; we used to use this to + get the docs in the right place. + * When doing the install step, we now use DESTDIR rather than prefix + to override where the files go. + * We now need to set HADDOCK_DOCS=YES in mk/build.mk in order to get the + haddock docks built. + * Removed "html/" from the documentation path in ghc6-doc.postinst, + ghc6-doc.prerm and ghc6-doc.doc-base.users-guide. + * Use "[ ! -f mk/config.mk ] ||" to guard "make distclean" rather than + ignoring all errors from it. + * Use ${binary:Version} rather than ${Source-Version} to specify the + dependency of ghc6-prof on ghc6. + * All the libraries now install LICENSE files, so we remove them after + the install step. + * Follow change in man path from /usr/man to /usr/share/man. + * lintian thinks that Cabal's Distribution/License.hi is an extra + licence file, so add a lintian override. + + -- Ian Lynagh (wibble) Tue, 18 Dec 2007 22:05:22 +0000 + +ghc6 (6.6.1-2) unstable; urgency=low + + * ghc6-doc now depends on haddock as it needs to run + gen_contents_index in postinst. Closes: #423561. + * ghc6-doc and ghc6-libsrc depend on ${shlibs:Depends}, ${misc:Depends}. + + -- Ian Lynagh (wibble) Tue, 15 May 2007 14:12:53 +0000 + +ghc6 (6.6.1-1) unstable; urgency=low + + * New upstream version. + * Policy 3.7.2 compliant. + * ghc6-doc provides libghc6-PACKAGE-doc for the various packages it + has docs for. + * Tweaked debian/rules to handle changes. + * Remove build-dep on xutils; we no longer use lndir (which has now + moved to xutils-dev anyway!) + * Remove build-dep on cpio; we now let dh_install do all the moving + rather than doing it ourselves with cpio. + * Remove build-dep on time; no longer used. + * Remove build-deps on libx11-dev, libsm-dev, libice-dev, libxmu-dev, + libxi-dev; the X11 stuff is now in separate Cabal packages. + * Manpages generation script removed s it is now in upstream. + * Pass --datadir to ./configure rather than "make install-docs" + so the haddock fields in package.conf get set correctly. + Closes: #417325. + * In mk/config.mk.in, don't put ghc-6.6.1/ on the end of datadir. + * Use $(INSTALL) rather than hardcoding /usr/bin/install everywhere. + * Don't generate or install library HTML doc contents and index. + * Do install libraries-footer.txt, libraries-header.txt and the various + prologue.txt's. + * Install a gen_contents_index script for generating the haddock + contents and index. + * Add -X.haddock to the dh_compress call to make sure the .haddock + files aren't getting compressed. + * Give ghc6-doc a postinst to generate the haddock contents and index + when it is installed. + * Give ghc6-doc a prerm to clean up the above. + * Revert these earlier changes as we now have haddock 0.8: + * Remove the --source-module argument to haddock in mk/package.mk + as haddock 0.7 doesn't support it. + * Re-add the -optP-P when generating .raw-hs files as haddock 0.7 + doesn't cope with line numbers in the files. + + -- Ian Lynagh (wibble) Sun, 29 Apr 2007 00:47:00 +0100 + +ghc6 (6.6-3) unstable; urgency=low + + * Add arm to the list of arches that have ghc6. + * Add arm to the arches in compiler/cmm/PprC.hs for which + loads and stores to be printed in a way that works if they are not + aligned as the arch wishes. + * For arm's odd floating point numbers: + * Add FPTOOLS_FLOAT_WORD_ORDER_BIGENDIAN test to aclocal.m4 + * Call FPTOOLS_FLOAT_WORD_ORDER_BIGENDIAN after AC_C_BIGENDIAN + in configure.ac. + * Extra section for the FPTOOLS_FLOAT_WORD_ORDER_BIGENDIAN test in + configure. + * Add "#undef FLOAT_WORDS_BIGENDIAN" to mk/config.h.in. + * Add FLOAT_WORDS_BIGENDIAN cases to rts/StgPrimFloat.c. + * Apply the following upstream patch, to fix potential problems + compiling ghc6 on amd64 (and possibly others): + + Fri Oct 20 16:39:25 BST 2006 Simon Marlow + * In hashExpr, use Word32 rather than relying on wrapping behaviour of Int + Fixes #952, as it turns out. + + When compiling via C, we are at the mercy of C's undefined behaviour + with respect to overflow of signed integer operations, and this was + biting us here. + + Perhaps we should always add the -fwrapv flag to gcc, but since + Haskell doesn't define overflow on Int either, it seemed the right + thing to do to fix this code anyway. + + -- Ian Lynagh (wibble) Sun, 22 Oct 2006 22:36:32 +0000 + +ghc6 (6.6-2) unstable; urgency=low + + * Add mips and mipsel to the list of arches that have ghc6. + * Add mips and mipsel to the arches in compiler/cmm/PprC.hs for which + loads and stores to be printed in a way that works if they are not + aligned as the arch wishes. + * Removed the -static flag for mips from compiler/main/DynFlags.hs. + + -- Ian Lynagh (wibble) Mon, 16 Oct 2006 14:20:08 +0100 + +ghc6 (6.6-1) unstable; urgency=low + + * New upstream version. + * Drop ghc6-hopengl package as HOpenGL is now split off from the + GHC core. + * Removed: + * ghc6-hopengl.README.debian + * ghc6-hopengl.examples + * ghc6-hopengl.postinst.in + * ghc6-hopengl.prerm.in + * Removed opengl examples. + * debian/scripts.mk no longer makes: + * debian/ghc6-hopengl.postinst + * debian/ghc6-hopengl.prerm + * Removed all opengl-related commands from debian/rules. + * Drop build-deps on + xlibmesa-gl-dev, libglu1-xorg-dev | libglu-dev, libglut3-dev + now we don't build the OpenGL libs. + * Added note to manpage that ghci is not yet available on all arches. + * Add ppc64 to the list of arches that have ghc6. Closes: #375623. + * Update locations of README and ANNOUNCE in ghc6.docs. + * Don't include ghc/mk/version.mk in debian/scripts.mk as it no longer + exists. Instead, get ProjectVersion with some shell magic. + * Don't include ghc/mk/version.mk in debian/scripts.mk as it no longer + exists. Instead, pass $(ProjectVersion) in from debian/rules. + * Remove mk/build.mk before we start filling it so the commands can be + more symmetric. + * Don't build the threaded RTS except on x86/amd64. + * Don't try to link ghc6 with the threaded RTS except on x86/amd64. + * Remove debian/test-build before creating it, so we can restart + builds part-way through without them falling over. + * Various paths in debian/rules lose their ghc/ prefix. + * Clean up debian/test-build/ after doing the test. + * hslibs no longer exists, so remove everything relating to it in + debian/rules. + * Remove register declarations from rts/StgCRun.c that break the + unregisterised build on alpha. + * Add to compiler/cmm/PprC.hs an option for loads and stores to be + printed in a way that works if they are not aligned as the arch + wishes. Enable this option for alpha. + * Remove the --source-module argument to haddock in mk/package.mk + as haddock 0.7 doesn't support it. + * Re-add the -optP-P when generating .raw-hs files as haddock 0.7 + doesn't cope with line numbers in the files. + + -- Ian Lynagh (wibble) Thu, 12 Oct 2006 01:22:24 +0000 + +ghc6 (6.4.2-2) unstable; urgency=low + + * Have ghc-pkg not create ~/.ghc when it doesn't need to, and return + the empty package file when trying to read a package file that + doesn't exist. Closes: #375166, #375188. + + -- Ian Lynagh (wibble) Sat, 24 Jun 2006 09:41:01 +0000 + +ghc6 (6.4.2-1) unstable; urgency=low + + * New upstream release. Closes: #369947. + * Add --nonet to XSLTPROC_OPTS. + * Add GhcWithInterpreter=NO on arches we don't build registerised + due to http://hackage.haskell.org/trac/ghc/ticket/631 + + -- Ian Lynagh (wibble) Mon, 19 Jun 2006 22:43:02 +0100 + +ghc6 (6.4.1-2.1) unstable; urgency=high + + * Non-maintainer upload. + * Add docbook-xml to build-dep (Closes: #356015). + + -- Luk Claes Sat, 25 Mar 2006 18:43:52 +0100 + +ghc6 (6.4.1-2) unstable; urgency=low + + * Due to problems with xmltex's uninstallability and its long-standing + bugs with lists rendering some docs unbuildable: + * Set XMLDocWays to "html" in debian/rules, rather than "html dvi ps". + * Remove build-deps on jade, docbook-utils, xmltex, docbook-xml. + * Change ghc6-hopengl's dep on "libc6-dev" to + "libc6-dev | libc6.1-dev | libc-dev" + * Fix building cabal packages that build executables with HS-Source-Dir. + Closes: #337909. + * Use "tail -n +2" rather than the deprecated "tail +2" in debian/rules. + Closes: #339606. + * On the list of arches we build registerised: + * Add amd64. Closes: #354872. + * Remove sparc (it has bitrotted). + List now reads "i386 amd64". + * Remove ghc6.README.Debian (appeal for registerised ports). The problems + when they bitrot outweigh the advantages IMO, at least until we have a + testsuite we can run when building. + * Apply fix for ghci failing to start ("Unable to mmap( MAP_FIXED ) for + Jump Islands") from Ryan Lortie. Closes: #343428. + * Delete ".SECONDARY:" from mk/suffix.mk as make >3.80 was taking + forever due to bug #346248. Closes: #348633. + * Changed xlibs-dev build-dep to: + libx11-dev, libsm-dev, libice-dev, libxmu-dev, libxi-dev. + Closes: #346752. + * Add "GhcWithNativeCodeGen=NO" to mk/build.mk when we are building + unregisterised. + + -- Ian Lynagh (wibble) Fri, 03 Mar 2006 00:32:06 +0000 + +ghc6 (6.4.1-1) unstable; urgency=low + + * New upstream release. Closes: #329322. + * Relax the libgmp3-dev build-dep to make backporting easier. + * Don't force using gcc-3.3 to build; drop gcc-3.3 build-dep. + * Apply patch to add support for kfreebsdgnu to configure(.ac) and the + mangler. Closes: #332977. + * Add kfreebsd-i386 to ghc6_arches. + * Add missing deps on libx11-dev, libsm-dev, libice-dev, libxmu-dev, + libxi-dev, libc6-dev to ghc6-hopengl. Closes: #317069. + * Update (build-)dep xlibmesa-glu-dev to libglu1-xorg-dev | libglu-dev. + * Standards version 3.6.1 -> 3.6.2. + * Upstream fixed a panic to give a sensible error message. + Closes: #319294. + + -- Ian Lynagh (wibble) Fri, 14 Oct 2005 10:44:34 +0000 + +ghc6 (6.4-4.1) unstable; urgency=low + + * Non-maintainer upload. + * C++ ABI transition: Relink against new libgmp3c2 package. + This will require a manual bootstrapping on each arch since ghc6 + build depends on itself and the new and old version of gmp3 + conflict with each other. (Closes: #319222) + - Versioned build dependency on libgmp3-dev (>= 4.1.4-6) + * Build using gcc-3.3 since this version doesn't build/work using 4.0 + and a new upstream version that fixes it isn't available yet. + + See instructions in debian/bootstrap-extracted on how to build this. + + -- Kurt Roeckx Wed, 31 Aug 2005 19:08:22 +0200 + +ghc6 (6.4-4) unstable; urgency=low + + * Use &(arr->payload) instead of BYTE_ARR_CTS(arr) in Adjustor.c on + ia64 as we no longer have the definition of BYTE_ARR_CTS to hand. + * Use ASSIGN_DBL and PK_DBL in generated C code from CMM code to avoid + unaligned access SIGBUSes on some arches. Closes: #309025. + * Use the stage2 ghc-inplace when checking "hello world" works. + * Build-dep on xmltex, docbook-xsl and docbook-xml. + * Set XMLDocWays rather than SGMLDocWays. Closes: #309016. + * Disable dvi and ps docs as they don't build. + * Remove ps and dvi sections from debian/ghc6-doc.doc-base.users-guide. + + -- Ian Lynagh (wibble) Fri, 20 May 2005 12:42:52 +0000 + +ghc6 (6.4-3) unstable; urgency=low + + * Removed powerpc from the list of arches to do a registerised build with + object splitting as there are bootstrapping issues from earlier GHCs. + * Change a stray "6.4" to $(ProjectVersion) in debian/rules + * Fix "SOURCE:" lines in {pre,post}{inst,rm}.in files. + + -- Ian Lynagh (wibble) Wed, 04 May 2005 17:07:08 +0100 + +ghc6 (6.4-2) experimental; urgency=low + + * Don't create user package.conf if not modifying. + * Change "#ifdef darwin_REGS" to "#if darwin_REGS" in + ghc/includes/MachRegs.h to fix build on powerpc (from upstream CVS). + * Add powerpc to the list of arches to do a registerised build with + object splitting. + * Fix checkFEDArgs in ghc/compiler/typecheck/TcForeign.lhs so it compiles + again. + * Remove OpenGL and GLUT packages from package.conf.shipped. + Have the postinst/prerm add/remove them. + * ghc6-hopengl provides libghc6-{opengl,glut}-{dev,prof} + * Other exposed libraries are provided as libghc6-foo-dev by ghc6 and + libghc6-foo-prof by ghc6-prof. + + -- Ian Lynagh (wibble) Mon, 21 Mar 2005 03:26:35 +0000 + +ghc6 (6.4-1) experimental; urgency=low + + * New upstream release; just for experimental for now. + * Remove xmlise-flags.sgml as upstream now ships flags.xml. + * Rejig how files are put in the right packages to follow upstream changes. + * Separate build target into build and install. + * No longer allow ghc4 or ghc5 to be used for building as they are no longer + supported. + * Handle /usr/bin/ghc6 et al. and the alternatives without the 6 suffix + better. + * Add a /usr/bin/runhaskell alternative, priority 8600000600. + + -- Ian Lynagh (wibble) Sun, 13 Mar 2005 04:25:20 +0000 + +ghc6 (6.2.2-3) unstable; urgency=low + + * Backport runghc from CVS. + * Build-dep prefers libreadline5-dev rather than libreadline4-dev. + * Compiled with libreadline5-dev. Closes: #291126. + * Remove package.conf{,.old} when changing to a different upstream + version as well as when purging. Closes: #277606. + + -- Ian Lynagh (wibble) Fri, 28 Jan 2005 01:55:31 +0000 + +ghc6 (6.2.2-2) unstable; urgency=low + + * Add build-depends on autotools-dev. + + -- Ian Lynagh (wibble) Wed, 20 Oct 2004 14:40:47 +0100 + +ghc6 (6.2.2-1) unstable; urgency=low + + * Add "Modes of operation" flags to flag reference in the users guide, + and hence to the automatically generated manpage. + * Create /usr/bin/ghc-pkg6. + * Revert changes to support mips/mipsel. They need changes in + glibc/gcc to work, supported by different changes in ghc. + * Support the spirit of noopt and nostrip values of DEB_BUILD_OPTIONS + * Make symlinks for /usr/bin/{ghc,ghc-pkg,ghci}-$version into + /usr/lib/ghc-$version/bin/. + * Add manpage symlinks for {ghc,ghci}-$version. + * Bump Standards-Version to 3.6.1. + * Remove mention of threaded packages from the manpage as they no + longer exist. + * Add grep-dctrl to build-dep list and use grep-status to build a + depends line for the set of installed packages providing + libreadline-dev (should have cardinality 1). + Replaced libreadline4-dev dependency with ${readline}. + Switch order of libreadline4-dev and libreadline-dev in build-deps + so the concrete package is first. + * Change how configure/config.sub/config.guess are handled in line + with /usr/share/doc/autotools-dev/README.Debian.gz. + * Added varfile /usr/lib/haskell-utils/ghc6_vars. + * Remove docs/building/building.out and + ghc6-6.2.2/docs/docbook-cheat-sheet/docbook-cheat-sheet.out when + cleaning. + + -- Ian Lynagh (wibble) Tue, 19 Oct 2004 18:12:55 +0000 + +ghc6 (6.2.1-5) unstable; urgency=low + + * Join build-deps onto a single line. + * Eliminate {,} bashisms in debian/rules. + * Build-dep on xlibs-dev for building the X11 package. + * Additionally build the RTS the following ways: + debug_p thr_debug thr_debug_p + (which, together with those done by default, gives us all ways). + * Install initial /usr/lib/ghc-$version/package.conf as + /usr/lib/ghc-$version/package.conf.shipped and copy it to + /usr/lib/ghc-$version/package.conf in postinst if it doesn't exist. + This means other library information isn't lost across upgrades. + * Remove /usr/lib/ghc-$version/package.conf{,.old} in postrm purge. + + -- Ian Lynagh (wibble) Sat, 07 Aug 2004 12:03:31 +0000 + +ghc6 (6.2.1-4) unstable; urgency=low + + * Remove IA64 from the unregisterised arches list to try to fix the + unaligned accesses. + * Add -mlong-calls flag for mips* in both DriverFlags and SRC_CC_OPTS + in mk/config.mk.in. Fixes problem where a step in gdb on a call to + mp_set_memory_functions lands us in the middle of Show.hc. + + -- Ian Lynagh (wibble) Thu, 08 Jul 2004 17:19:06 +0000 + +ghc6 (6.2.1-3) unstable; urgency=low + + * Up gcc build-dep to "gcc-3.3 (>= 1:3.3.4)" to fix + "charToUtf8 1884139800" panic when compiling + 'module Foo where foo 5 = 6'. + + -- Ian Lynagh (wibble) Fri, 18 Jun 2004 18:09:15 -0400 + +ghc6 (6.2.1-2) unstable; urgency=low + + * Change the mangler to allow a tab before .section on sparc. + Fixes a problem which shows up as symbols not being made global + so not being defined when compiling with gcc >= 3.something. + + -- Ian Lynagh (wibble) Tue, 13 Apr 2004 12:26:41 +0000 + +ghc6 (6.2.1-1) unstable; urgency=low + + * New upstream (stable branch) release. + * Don't use -static on any arches (remove per-arch "-static"s in + ghc/compiler/main/DriverFlags.hs). + * Remove threaded packages (functionality now handled by main packages). + * We now depend and build-depend on "gcc-3.3 (>= 1:3.3.3-2)" which should + give correct code on all arches. + + -- Ian Lynagh (wibble) Tue, 23 Mar 2004 20:47:13 +0000 + +ghc6 (6.2-3) unstable; urgency=low + + * More HOpenGL example tweaking. + + -- Ian Lynagh (wibble) Sat, 24 Jan 2004 20:16:57 +0000 + +ghc6 (6.2-2) unstable; urgency=low + + * Apply fix so OpenGL docs build when the compiling compiler doesn't + support OpenGL. + * Tweaked HOpenGL example, including suggestions from Sven Panne (HOpenGL + author). + + -- Ian Lynagh (wibble) Wed, 21 Jan 2004 23:57:22 +0000 + +ghc6 (6.2-1) unstable; urgency=low + + * New upstream version. + * ghc/docs/users_guide/flags.sgml is now xmlised by a script rather + than by hand. + * Added an HOpenGL example. + * Removed build dependency on happy (it has been pre-run on the tarball). + * Build dependency on haddock is now >= 0.6 (we need some of its new + options). + * For the normal ghc6 deb pass GhcLibsWithOpenGL=NO GhcLibsWithGLUT=NO + rather than GhcLibsWithHOpenGL=NO + * Add config.status and libraries.txt to CLEAN_FILES and a rule to + remove the HTML directory for the extraclean target in + libraries/Makefile + + -- Ian Lynagh (wibble) Tue, 16 Dec 2003 18:09:11 +0000 + +ghc6 (6.0.1-10) unstable; urgency=low + + * Change #ifdef IN_STG_CODE to #if IN_STG_CODE in the alpha section of + ghc/includes/TailCalls.h + * Add __muldi3 to RTS_LIBGCC_SYMBOLS in ghc/rts/Linker.c (ghci was + complaining about it being unknown on sparc). + * Provide a /usr/bin/haskell-compiler alternative. + * Depend on haskell-utils + * Register /usr/bin/ghc6 and ghc6 with haskell-utils + * Register /usr/bin/ghc6-threaded and ghc6-threaded with haskell-utils + * Tidy up postinst/prerm. + * Add ghc6-threaded as an alternative for /usr/bin/ghc (priority 590, + i.e. between ghc5 and ghc6). + + -- Ian Lynagh (wibble) Sat, 11 Oct 2003 11:07:00 +0000 + +ghc6 (6.0.1-9) unstable; urgency=low + + * Move the TailCalls.h include in ghc/includes/Stg.h below the config.h + include. Fixes the undefined reference warnings in -8. Closes: #211430. + + -- Ian Lynagh (wibble) Wed, 17 Sep 2003 22:04:57 +0000 + +ghc6 (6.0.1-8) unstable; urgency=low + + * If we are not on an i386, sparc or ia64 machine then do an + unregisterised build. + * Unregisterised builds should be possible for any architecture, so + set the architecture to any. + * Add s390, m68k, mips, hppa, arm and powerpc Linux to configure{,.in} + * Write a README.Debian about the registerised/unregisterised deal. + * Change a couple of machine/foo.h includes on alpha to asm/foo.h + * Add the x86-64 hack from upstream to MBlock.h, generalising it to all + 8-bit arches. + * Add -optc-mbig-switch to SRC_HC_OPTS in libraries/OpenGL/Makefile + on hppa (fixes an assembler failure for at least + Graphics/Rendering/OpenGL/GL/QueryUtils.p_o). + * Tweak ghc/includes/TailCalls.h so it only steals a register for STG + code. + * Move the include of TailCalls.h in ghc/includes/Stg.h up so it is + before all the procedure definitions. + * Change an IF_OS_darwin to an IF_ARCH_powerpc in + ghc/compiler/nativeGen/MachCode.lhs + + -- Ian Lynagh (wibble) Tue, 16 Sep 2003 20:40:43 +0000 + +ghc6 (6.0.1-7) unstable; urgency=low + + * Add ia64 to Architecture field of the packages. + * Apply various IA64 fixes from upstream CVS. + + -- Ian Lynagh (wibble) Wed, 10 Sep 2003 13:47:56 +0000 + +ghc6 (6.0.1-6) unstable; urgency=low + + * We need docbook-utils even for a binary-only build as the build fails + if it can't build the documentation. + + -- Ian Lynagh (wibble) Mon, 08 Sep 2003 00:34:51 +0000 + +ghc6 (6.0.1-5) unstable; urgency=low + + * Add jade to the build-deps. + + -- Ian Lynagh (wibble) Sun, 07 Sep 2003 10:11:54 +0000 + +ghc6 (6.0.1-4) unstable; urgency=low + + * Remove unnecessary flex build-dep and comment it out of + configure{,.in}. + * Resurrect the "SGMLDocWays := html dvi ps" line in build.mk that + got lost. + * Do a test compilation+run after building to make sure things aren't + *completely* screwed up. + * make distclean rather than maintainer-clean + + -- Ian Lynagh (wibble) Sat, 06 Sep 2003 11:07:08 +0000 + +ghc6 (6.0.1-3) unstable; urgency=low + + * Put sparc-unknown-linux entry in configure and configure.in + * Add sparc Linux support to ghc/driver/mangler/ghc-asm.lprl + * Build depend on gcc-2.95 [sparc] + * Change ghc6's dependency on gcc to ${gcc}. + This is set to either gcc-2.95 (if we are on a sparc) or gcc + (otherwise) in debian/ghc6.substvars + * Removed quotes around ${WithGhc-ghc} in configure and aclocal.m4 so + arguments can be given (e.g. to point at a certain gcc) with the + flag + * Pass flags giving the location of ghc and, in the case of sparc, + gcc to ./configure + * Added sparc to Architecture field of the packages + * touch configure early in the build and clean targets to stop the + build system trying to regenerate it with autoconf. + + -- Ian Lynagh (wibble) Thu, 14 Aug 2003 07:24:18 -0400 + +ghc6 (6.0.1-2) unstable; urgency=low + + * Ask for the correct name to be removed by update-alternatives + * Have manpage variables substituted + * Fix problem with files not getting installed into ghc6-libsrc package + * Put ghc/{README,ANNOUNCE} in /usr/share/doc/ghc6 + + -- Ian Lynagh (wibble) Sat, 02 Aug 2003 20:27:44 +0000 + +ghc6 (6.0.1-1) unstable; urgency=low + + * New upstream version + * Now policy 3.6.0 compliant + * Fixed manpage alternatives to create a manpage for ghc, not ghc6. + * Added manpages for ghci, ghci6 and the -threaded variants of + these and ghc. Manpage now also mentions ghci. + * Reinstate the -libsrc package. + * Remove redundant build dependencies on autoconf and autotools-dev + * Comment out fix for compiling GL stuff with older GHCs as it really + uses the in-place compiler + * Have all packages (except ghc6-doc due to issues with an empty depends + line) depend on ${shlibs:Depends}, ${misc:Depends} + * Create a /usr/bin/ghc6 and /usr/bin/ghci6 + * Also build a threaded-rts binary and make various related -threaded files + and symlinks. Put in a separate package (ghc6-threaded-rts) due to size. + + -- Ian Lynagh (wibble) Wed, 30 Jul 2003 12:37:21 +0000 + +ghc6 (6.0-2) unstable; urgency=low + + * Fix GET_PROC_ADDRESS properly so opengl libraries can be used (from + upstream CVS) + * GLUT libraries are also installed in the hopengl deb + * Update build-depends and depends to libglut3-dev, xlibmesa-gl-dev + and xlibmesa-glu-dev from glutg3-dev and xlibmesa-dev. + * Require at least version 0.4.0 of haddock. + * Fix doc-base control file links. + * Policy 3.5.10 compliant. + * Create the hp2ps-ghc6.1 manpage correctly. Closes: #199786. + * Change glActiveTexture to glActiveTextureARB. ghci now loads with + the OpenGL and GLUT packages. + * Update build-depend on debhelper to >= 4. + * Correct "GHC5" to "GHC6" in the doc-base title. + + -- Ian Lynagh (wibble) Sun, 06 Jul 2003 14:42:40 +0000 + +ghc6 (6.0-1) unstable; urgency=low + + * New upstream version + * New maintainer, with the old maintainer's blessing + * changed package name to ghc6 + * Building process simplified as GHC's build system now handles multiple + stages itself + * Patches from upstream: + + Removed comments from cpp functions in a couple of source files to + counteract changes in 3.3 meaning they didn't compile + + Evil mangler tweaked to allow extra whitespace gcc 3.3 puts in + and for changes to generated assembly for _module_registered + + Rename "--list-packages-local" to "--list-local-packages" + * Added missing quotes to + libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Extensions.hs + so it compiles + * Removed fptags as it doesn't have a clear licence; should probably + be in its own package anyway as I imagine it is equally useful with + any Haskell compiler + * Changed libraries/OpenGL/specs/enumerant to use this compiler rather + than the installed one; in particular this means that the profiling + libraries don't need to be installed + + -- Ian Lynagh (wibble) Sat, 07 Jun 2003 17:16:25 +0000 + +ghc5 (5.04.2-1) unstable; urgency=low + + * CVS Version from 2002-12-05 (tag: ghc-5-04-2) + + fix for inet_ntoa linking error (upstream) + (closes: Bug#164573) + + export TimeLocale constructor (upstream) + (closes: Bug#167647) + * implemented proper auto* handling (config.*, autoconf) + * added autotools-dev to build-deps, bumped needed autoconf version to + >= 2.52 + * removed cpio from Build-Deps (no longer needed) + * added man page for ghc + (closes: Bug#110037) + * added links for user_guide/user-guide.html and hslibs/book-hslibs.html + (closes: Bug#153795) + * necessary adjustments for debian_libraries_hopengl.dpatch + * libdir adjustments (always in sync with Debian package version now) + * added notes in ghc5-hopengl.README.Debian + * removed cygnus-stylesheets from Build-Deps-Indep + (closes: Bug#170112) + * moved ghcprof icons to /usr/share/ tree + (debian_ghcprof_datadir.dpatch) + * edited debian/copyright to make lintian shut up ("Upstream Author(s)") + * backport of "*_stub.o link failure" fix from ghc-5-04-branch + (debian_compManager_findstubs.dpatch) + (closes: Bug#171518) + + -- Michael Weber Sat, 7 Dec 2002 19:38:10 +0100 + +ghc5 (5.04-1) unstable; urgency=low + + * CVS Version from 2002-07-15 (tag: ghc-5-04) + (closes: Bug#153020) + + spurious ghci dynamic linkage error solved by upstream update + (closes: Bug#151126) + * added Depends: libreadline4-dev (though I don't like it + and it just covers a technical issue), because too many people + get bitten by this :( + (closes: Bug#134950) + * build process revamped + + much easier to understand/maintain (KISS) + (it's a build script, no need to be too fancy) + + support for full bootstrap builds (needed for buildds) + + moved source to upstream-ghc/ + + adjusted patches; must contain `upstream-ghc/' in + the path from now on (new source layout) + + uses shadow trees (lndir) + + added "-e noidref" to docbook2* tool calls, so that they + don't barf on missing ids (there are 2 currently) + + use upstream doc install mechanism now that it's usable + for Debian (slight changes in the dir layout, though) + + removed support for `debian/rules cvs-update' + + removed ghc5-libsrc package, now that decent library + docs start to pop up + + removed debian_build.dpatch (now debian/build.mk-stage*) + * renamed ghc4_ghc_includes_gmp.dpatch debian_ghc_includes_gmp.dpatch + because it's Debian specific + * added Build-Depends: haddock + * adjusted *.doc-base.* again to reflect new doc layout + (only ghc5-doc.doc-base.users-guide left) + * _really_ changed CVS/Root to :pserver:anoncvs@cvs.haskell.org:/cvs + this time (no idea what happened to the last changes) + * updated CVS checkout instructions in copyright + * updated upstream authors in copyright + * updated README.Debian to reflect changes + * fixed missing "sec-concurrent-haskell" SGML id + * added hasktags program to update-alternatives + * new package ghc5-hopengl (finally!) + (closes: Bug#116984) + * added Build-Depends: xlibmesa-dev, glutg3-dev (for HOpenGL) + + -- Michael Weber Fri, 19 Jul 2002 15:34:43 +0200 + +ghc5 (5.02.2-1) unstable; urgency=low + + * CVS Version from 2002-02-14 (tag: ghc-5-02-2) + (closes: Bug#133595) + * buggy Makefile which prevented building with make-3.77 fixed + by update + (closes: Bug#117883) + * The "You Asked For It" release =) + * _NOT_ the "I Solved All Problems" release + * changed CVS/Root to :pserver:anoncvs@cvs.haskell.org:/cvs + * updated copyright + * removed lib6-dev from Depends: (no longer necessary) + * docbook build-deps now: docbook-utils | cygnus-stylesheets + (closes: Bug#123180) + * added time to Depends: (lost during backporting potato stuff) + * added build-deps: xutils (for lndir), time (used by build process) + * added build-deps: devscripts (for debchange, thanks to + Peter Gammie) + * readline build-deps now: libreadline-dev | libreadline4-dev + * priority: extra -> optional (as requested from the ftpmasters) + * for the -prof package, section: libs -> devel (as requested from + the ftpmasters) + * spelling correction in control file (cpu -> CPU) + (closes: Bug#124668) + * removed getSocketOption patch + (ghc5_getSocketOption.dpatch) + * added index.html symlinks for html docs + * adjusted *.doc-base.* + * removed ghc5-doc.doc-base.hslibs (accessible via + the user's guide) + * bumped Standards-Version to 3.5.6.0 + + -- Michael Weber Thu, 14 Feb 2002 21:01:14 +0100 + +ghc5 (5.02-1) unstable; urgency=low + + * CVS Version from 2001-10-15 (tag: ghc-5-02-branch) + * adjusted debian_glafp-utils_docbook.dpatch + * typo in docs fixed + (closes: Bug#110038) + * added hotfix for getSocketOption b0rkage (already fixed in CVS) + (ghc5_getSocketOption.dpatch) + + -- Michael Weber Mon, 15 Oct 2001 19:59:43 +0200 + +ghc5 (5.00.2-1) unstable; urgency=low + + * CVS Version from 2001-07-16 (tag: ghc-5-00-2) + (closes: Bug#106756) + * upstream fix for .ghci problem + (closes: Bug#94739) + * removed patches which went into upstream + (ghc5_glitches.dpatch) + + -- Michael Weber Tue, 31 Jul 2001 10:54:45 +0200 + +ghc5 (5.00-2) unstable; urgency=low + + * added dependency on libc6-dev as a workaround + (ghci needs the libm.so link) + * adjusted ghc5_glitches.dpatch slightly + + -- Michael Weber Thu, 26 Apr 2001 15:07:04 +0200 + +ghc5 (5.00-1) unstable; urgency=low + + * CVS Version from 2001-04-11 (tag: ghc-5-00) + * changed package name to ghc5 + * some more reorganizations to prepare dual ghc4/ghc5 installation + * added some missing build-deps + * now using libgmp3(-dev) + * removed some obsolete patches + (ghc4_hclose_bug.dpatch,ghc4_signal_bug.dpatch) + * added some other patches + (ghc5_glitches.dpatch) + * updated build.mk-patch once more + * DH_COMPAT=2 + * added more docs (ffi-art) + * added support for CVS happy's + + -- Michael Weber Wed, 18 Apr 2001 00:19:35 +0200 + +ghc4 (4.08.1-4) unstable; urgency=low + + * first upload as proper maintainer + * changed email address to @debian.org + + -- Michael Weber Sun, 14 Jan 2001 01:56:05 +0100 + +ghc4 (4.08.1-3) unstable; urgency=low + + * unofficial version + * backported signal-bug patch from CVS trunk + (ghc4_signal_bug.dpatch) + + -- Michael Weber Tue, 10 Oct 2000 13:34:28 +0200 + +ghc4 (4.08.1-2) unstable; urgency=low + + * unofficial version + * backported hClose-bug patch from CVS trunk + (ghc4_hclose_bug.dpatch) + + -- Michael Weber Tue, 10 Oct 2000 13:33:56 +0200 + +ghc4 (4.08.1-1) unstable; urgency=low + + * !!NOTE!! + This version replaced aaronv's upload of 4.04.19990916-3 (thanks + to wli@debian.org for the sponsor upload). All versions in + between were never officially available on the debian servers. + * CVS Version from 2000-09-02 (4.08.1) + * official 4.08.1 version + * uncommented `cvs upd' commands (accidently commented) + * changed `cvs-update' target again (first step of upcoming + "experimental" support) + * updated build.mk-patch + * set.{ps,dvi} accidently were not copied into the package, + (fixed now) + + -- Michael Weber Mon, 25 Sep 2000 14:02:52 +0200 + +ghc4 (4.08.0-1) unstable; urgency=low + + * CVS Version from 2000-06-29 (4.08.0) + * this is a snap of the official 4.08 release candidate + * need (happy >= 1.7) from now on + * unset DOCBOOK_PREFIX in order to use installed db tools + * an installed ghc4-prof pkg. must have the same version as the + corresponding ghc4 pkg. + * added option `-k' to make when cleaning, so it won't stumble over + errors + * ghc now understands option '--numeric-version', which will be + supported in the upcoming unstable version anyway... + (ghc4_numeric_version.dpatch) + * sync'ed base documents in doc-base entries with reality + * rearranged `docs',`build' targets + * rearranged documentation to sync with upstream + + -- Michael Weber Mon, 3 Jul 2000 14:52:12 +0200 + +ghc4 (4.07.20000526-1) unstable; urgency=low + + * CVS Version from 2000-05-26 (4.07) + * update to ghc-4-07-branch + * disabled debian_glafp-utils_docbook.dpatch, because it's not + necessary on this branch + * !! UNRELEASED due to building problem !! + + -- Michael Weber Fri, 26 May 2000 20:33:32 +0200 + +ghc4 (4.07.20000523-1) unstable; urgency=low + + * CVS Version from 2000-05-23 (4.07) + * removed ghc4_docbook.dpatch (incorporated by upstream, finally :-)) + * removed ghc4_hslibs_tools_clean.dpatch (incorporated by upstream) + * removed ghc4_hslibs_util_clean.dpatch (incorporated by upstream) + * removed building of docbook (Debian does have a working docbook + environment) + (debian_glafp-utils_docbook.dpatch) + * added fptags to distribution (in a really q'n'd way) + * added debian/rules options (UN)PATCHOPTS, default is now + `PATCHOPTS = --ignore-whitespace --forward' + * added notes about debian/rules options to README.Debian + * adjusted build depends + * added more hints in README.debian + * !! UNRELEASED due to building problem !! + + -- Michael Weber Fri, 26 May 2000 20:02:20 +0200 + +ghc4 (4.07.20000504-1) unstable; urgency=low + + * CVS Version from 2000-05-04 (4.07) + * hslibs/utils/Readline_stub.p_o not cleaned + (ghc4_hslibs_util_clean.dpatch) + * added DrIFT, DtdToHaskell, Xtract as update-alternatives + + -- Michael Weber Mon, 8 May 2000 01:05:37 +0200 + +ghc4 (4.07.20000429-1) unstable; urgency=low + + * CVS Version from 2000-04-29 (4.07) + * removed ghc4_hslibs_util_clean.dpatch (solved by upstream) + * Main.hi not cleaned in hslibs/tools/* dirs + (ghc4_hslibs_tools_clean.dpatch) + * changed clean targets from `realclean' to `maintainer-clean' + (due to upstream change) + * !! UNRELEASED due to stage1 problems !! + + -- Michael Weber Sun, 30 Apr 2000 01:06:47 +0200 + +ghc4 (4.07.20000411-1) unstable; urgency=low + + * CVS Version from 2000-04-11 (4.07) + * removed ghc4_configure_readline.dpatch (incorporated by upstream) + * adjusted Build-depends (this version can only be build with GHC 4.06) + * `debian/rules patch' now doesn't try to apply patches, if they're + already applied + * added option `StripLibraries = YES' + * !! UNRELEASED due to stage2 problems !! + + -- Michael Weber Thu, 13 Apr 2000 00:37:29 +0200 + +ghc4 (4.07.20000202-1) unstable; urgency=low + + * CVS Version from 2000-02-02 (4.07) + * added target `cvs-update' (see README.Debian) + * replaced sgml-tools by cygnus-stylesheets in Build-Depends + * removed ghc4_hslibs_cstring.dpatch (incorporated by upstream) + * removed ghc4_ghc_mk.dpatch (incorporated by upstream) + * removed debian_sgml.dpatch (no longer necessary) + * use autoreconf instead of autoconf (in debian/rules.local) + * html docs back in action + * renamed doc-base ID ghc4-installation to ghc4-building + * YARP [Just Another Readline Patch]: doesn't find termcap + (ghc4_configure_readline.dpatch) + * Readline_stub--stamp was not removed on clean + (ghc4_hslibs_util_clean.dpatch) + * removed hardcoded DTD paths in docs/fptools-both.dsl + (ghc4_docbook.dpatch) + * added `docs' target + * `debian/rules clean' again checks for root priv. (cf. packaging#3.2.1) + * added build option `-split-objs' (produces smaller executables) + * added build option `GhcLibHcOpts = -O' (won't compile otherwise, because + of a compiler bug in 4.06) + + -- Michael Weber Thu, 3 Feb 2000 17:47:00 +0100 + +ghc4 (4.06.20000109-1) unstable; urgency=low + + * CVS version from 2000-01-09 (4.06) + * debian/rules clean doesn't check for root priv. any more + * removed emacs local variable (add-log-mailing-address) in changelog. + (closes: Bug#54515) + * references to `haskell-doc' in control and debian/*doc-base*. + (closes: Bug#52729) + * Arch back to `i386' only, although sparc should be possible, too (with + minor changes, really). (closes: Bug#52794) + * bumped Standards-Version to 3.1.0 + * introduced build dependencies + * removed ghc4_clean.dpatch (incorporated by upstream) + * removed ghc4_makefiles.dpatch (incorporated by upstream) + * removed ghc4_mk.dpatch (incorporated by upstream) + * removed ghc4_readline.dpatch (incorporated by upstream) + * removed ghc4_stat2resid.dpatch (incorporated by upstream) + * autoconf changes to rules, rules.local + * corrected bug in ghc/mk/paths.mk (wrt. variable referencing) + (ghc4_ghc_mk.dpatch) + * corrected bug in hslibs/CString.lhs (ghc4_hslibs_cstring.dpatch) + * added patch for sgmltools, removed {html,txt} because of problems + + -- Michael Weber Sun, 9 Jan 2000 15:45:36 +0100 + +ghc4 (4.05.19991206-1) unstable; urgency=low + + * CVS version from 1999-12-06 (4.05) + * removed distrib/Makefile-bin.in patch (solved by upstream) + * removed ghc/compiler/Makefile patch (solved by upstream) + * adjusted mk/target.mk patch + * moved $(libdir)/ghc/$(version) -> $(libdir)/ghc-$(version) (upstream-like) + * dropped users-guide.info (wasn't complete, anyway) + * added postscript and plain text docs + * heap size back to 120M :-( + * changed the build process heavily + * fixed `missing symbol in libHSutil*.a' (formerly libHSmisc*.a) bug + * some cleanup patches + * updated URLs to the Haskell report in control and debian/*doc-base* + + -- Michael Weber Wed, 8 Dec 1999 23:37:37 +0100 + +ghc4 (4.04.19990916-3local1) unstable; urgency=low + + * added warning message about fragile `clean' target + * cut down memory req's for building GHC (100M heap should be ok) + * Arch: field back to ``i386'' + + -- Michael Weber Tue, 30 Nov 1999 23:32:36 +0100 + +ghc4 (4.04.19990916-3) unstable; urgency=low + + * First revision to be uploaded to Debian + * Changed maintainer fields where necessary + * Changed binary packages to Architecture: any + + -- Aaron Van Couwenberghe Tue, 30 Nov 1999 14:27:18 -0800 + +ghc4 (4.04.19990916-2) unstable; urgency=low + + * fixed typo in copyright + * bumped Standards-Version to 3.0.1 + * doc-base support + * moved (un)patch rules to debian/rules.local + + -- Michael Weber Wed, 17 Nov 1999 18:06:25 +0100 + +ghc4 (4.04.19990916-1) unstable; urgency=low + + * added haskell-doc, ghc4-prof to Suggests + * new version numbering scheme + * improved build process (targets stage1,clean) + + -- Michael Weber Sun, 19 Sep 1999 21:49:25 +0200 + +ghc4 (4.04-9) unstable; urgency=low + + * added libgmp2-dev to Depends + * CVS version from 1999/09/16 + + -- Michael Weber Thu, 16 Sep 1999 22:09:11 +0200 + +ghc4 (4.04-8) unstable; urgency=low + + * fixed manpage packaging bug in ghc4-prof + + -- Michael Weber Sat, 7 Aug 1999 21:59:05 +0200 + +ghc4 (4.04-7) unstable; urgency=low + + * Standards-Version 3.0.0.0 + * removed undocumented manpages (lintian complains) + * moved usr/info -> usr/share/info according to FHS + * added 'perl | perl5' to Depends + + -- Michael Weber Sat, 7 Aug 1999 21:54:39 +0200 + +ghc4 (4.04-6) unstable; urgency=low + + * removed patch for happy version check (now in upstream) + * GHC is working again + * CVS version from 1999/08/03 + + -- Michael Weber Wed, 4 Aug 1999 18:12:07 +0200 + +ghc4 (4.04-5) unstable; urgency=low + + * local version, GHC doesn't work + * removed hstags from alternatives because it's non-functional + * removed mkdependHS from alternatives because directly running it + is deprecated now (now 'ghc -M') + * re-added info file + * removed obsolete HAVE_READLINE variable in mk/build.mk + * removed patch for {hscpp,mkdependHS} "absolute path" fix (now in upstream) + * moved to patch system (taken from glibc package) + * CVS version from 1999/07/31 + + -- Michael Weber Sun, 1 Aug 1999 02:09:44 +0200 + +ghc4 (4.04-4) unstable; urgency=low + + * got rid of absolute cpp paths in {hscpp,mkdependHS} + * removed info files due to problem with sgmltools + * first glibc-2.1.1 version + + -- Michael Weber Tue, 13 Jul 1999 15:35:28 +0000 + +ghc4 (4.04-3) unstable; urgency=low + + * moved profiling libs into separate package + * added hscpp as alternative (useful for hugs) + * CVS version from 1999/07/10 + + -- Michael Weber Sat, 10 Jul 1999 19:20:49 +0200 + +ghc4 (4.04-2) unstable; urgency=low + + * compiled with use of happy-1.6 parser generator + * fixed some "unclean" directories + * added info entry + * added dwww index-file + + -- Michael Weber Sat, 3 Jul 1999 03:04:13 +0200 + +ghc4 (4.04-1) unstable; urgency=low + + * added missing *.prl files + * added mkdependHS as alternative + * new CVS version as of 1999/06/30 + + -- Michael Weber Wed, 30 Jun 1999 19:53:09 +0200 + +ghc4 (4.03-1) unstable; urgency=low + + * Initial Release. + + -- Michael Weber Sat, 26 Jun 1999 17:52:29 +0200 + + diff --git a/clean b/clean new file mode 100644 index 00000000..8d3ee002 --- /dev/null +++ b/clean @@ -0,0 +1,4 @@ +libraries/dph +libraries/primitive +libraries/vector +libraries/random diff --git a/compat b/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/compat @@ -0,0 +1 @@ +9 diff --git a/control b/control new file mode 100644 index 00000000..068cf4f6 --- /dev/null +++ b/control @@ -0,0 +1,130 @@ +Source: ghc +Section: haskell +Priority: extra +Maintainer: Debian Haskell Group +Uploaders: Joachim Breitner , + Erik de Castro Lopo +Standards-Version: 3.9.5 +Build-Depends: + debhelper (>= 9), + libgmp-dev, + devscripts, + ghc, + grep-dctrl, + dh-autoreconf, + autotools-dev, + llvm-3.4 [armel armhf], + libffi-dev, + pkg-config, + xsltproc, + docbook-xsl, + docbook-xml, + binutils [armel armhf], + libncurses5-dev, + dpkg-dev (>= 1.16.1.1) +Build-Depends-Indep: + hscolour, + fop +Build-Conflicts: + ccache +Homepage: http://haskell.org/ghc/ +Vcs-Darcs: http://darcs.debian.org/pkg-haskell/ghc +Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/ghc + +Package: ghc +Architecture: any +Depends: llvm-3.4 [armel armhf], gcc, libgmp-dev, libffi-dev, libbsd-dev, libc6-dev, ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: dpkg (>= 1.16.1) +Provides: haskell-compiler, ${provided-devs}, ${haskell:Provides}, ${ghci} +Replaces: ghc6 (<< 7) +Conflicts: ghc6 (<< 7), ${conflicting-devs} +Breaks: cabal-install (<< 0.8.0), haskell-devscripts (<< 0.8.13), ghc-doc (<= 6.12.1-8) +Suggests: perl, ghc-prof, ghc-doc, haskell-doc, llvm +Description: The Glasgow Haskell Compilation system + The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for + Haskell. + . + Haskell is "the" standard lazy functional programming language. The language + definition and additional documentation can be found in the `haskell-doc' + package. Alternatively, there is an online version at + http://haskell.org/onlinereport/. + +Package: ghc-prof +Architecture: any +Provides: ${provided-profs}, ${haskell:Provides} +Depends: ghc (= ${binary:Version}), ${misc:Depends} +Replaces: ghc6-prof (<< 7) +Conflicts: ghc6-prof (<< 7) +Description: Profiling libraries for the Glasgow Haskell Compilation system + The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for + Haskell. + . + Haskell is "the" standard lazy functional programming language. The language + definition and additional documentation can be found in the `haskell-doc' + package. Alternatively, there is an online version at + http://haskell.org/onlinereport/. + . + This package contains additional profiling libraries. They are only needed, + if you want to take a closer look on where exactly your program burns CPU + cycles. + +Package: ghc-doc +Section: doc +Architecture: all +Suggests: haskell-doc +Provides: ${provided-docs} +Replaces: ghc6-doc (<< 7) +Conflicts: ghc6-doc (<< 7), ghc (<= 7.0.3-1) +Depends: ${haddock:Depends}, ${misc:Depends}, perl +Pre-Depends: dpkg (>= 1.16.1) +Description: Documentation for the Glasgow Haskell Compilation system + The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for + Haskell. + . + Haskell is "the" standard lazy functional programming language. The language + definition and additional documentation can be found in the `haskell-doc' + package. Alternatively, there is an online version at + http://haskell.org/onlinereport/. + . + This package includes HTML, DVI and PS versions of the SGML-based + documentation around GHC. + +Package: ghc-dynamic +Architecture: i386 amd64 +Depends: ghc (= ${binary:Version}), ${misc:Depends} +Description: Dynamic libraries for the Glasgow Haskell Compilation system + The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for + Haskell. + . + Haskell is "the" standard lazy functional programming language. The language + definition and additional documentation can be found in the `haskell-doc' + package. Alternatively, there is an online version at + http://haskell.org/onlinereport/. + . + This package has dynamically linkable, shared versions of the + libraries included with GHC. Currently, they are available only on + i386 and amd64 architectures. + +Package: ghc-haddock +Architecture: any +Provides: haddock, ${haddock:Provides} +Conflicts: haddock +Depends: ghc (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} +Breaks: ghc-doc (<< 7.6.3-20~) +Homepage: http://www.haskell.org/haddock/ +Description: Documentation tool for annotated Haskell source code + Haddock is a tool for automatically generating documentation from + annotated Haskell source code. It is primary intended for documenting + libraries, but it should be useful for any kind of Haskell code. + . + Haddock lets you write documentation annotations next to the + definitions of functions and types in the source code, in a syntax + that is easy on the eye when writing the source code (no heavyweight + mark-up). The documentation generated by Haddock is fully hyperlinked: + click on a type name in a type signature to go straight to the + definition, and documentation, for that type. + . + Haddock can generate documentation in multiple formats; currently HTML + is implemented, and there is partial support for generating DocBook. + . + This package contains Haddock version 2.10.0. diff --git a/copyright b/copyright new file mode 100644 index 00000000..07b1ed96 --- /dev/null +++ b/copyright @@ -0,0 +1,135 @@ +This package was debianised by Ian Lynagh on +Sat, 07 Jun 2003. It was based on Michael Weber 's +ghc5 package. All of the Debian packaging scripts written by us are +released into the public domain. + +It was downloaded from +http://www.haskell.org/ghc/dist/ + +Upstream Authors: The GHC team + Simon Peyton Jones + Simon Marlow + +See http://www.haskell.org/ghc/contributors.html for more details. + + +Copyright: + +The Glasgow Haskell Compiler License + +Copyright 2002-2010, The University Court of the University of Glasgow. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither name of the University nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF +GLASGOW AND THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + + +GHC includes libffi. +libffi - Copyright (c) 1996-2008 Red Hat, Inc and others. +See source files for details. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +``Software''), to deal in 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: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +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 AUTHORS 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 IN THE SOFTWARE. + + +GHC includes mtl. +Copyright: The University of Glasgow 2001, + Jeff Newbern 2003-2007, + Andriy Palamarchuk 2006-2007, + Michael Weber 2001, + Andy Gill 2001, + Oregon Graduate Institute of Science and Technology, 2001 +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +- Neither name of the University nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF +GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + + +GHC includes haskeline and terminfo Haskell bindings. +Copyright: Judah Jacobson, 2007-2009 +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistribution of source code must retain the above copyright notice, +this list of conditions and the following disclamer. + +- Redistribution in binary form must reproduce the above copyright notice, +this list of conditions and the following disclamer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: debian/patches/cabal-bug-1087.patch +Copyright: 2012 Johan Tibell +License: BSD3-Clause diff --git a/dh_haskell_provides b/dh_haskell_provides new file mode 100644 index 00000000..2df0a699 --- /dev/null +++ b/dh_haskell_provides @@ -0,0 +1,99 @@ +#! /bin/sh +# +# Calculated provides substvars for haskell library packages. +# +# Copyright (C) 2006-2007 Arjan Oosting +# Copyright (C) 2009 Joachim Breitner +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of either: +# +# 1) The terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# 2) BSD 3-clause license. +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# * The names of contributors may not be used to endorse or promote +# products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -e + +if test -e debian/Dh_Haskell.sh +then + . debian/Dh_Haskell.sh +else + . /usr/share/haskell-devscripts/Dh_Haskell.sh +fi + +for pkg in `dh_listpackages $args`; do + sfile=debian/$pkg.substvars + touch $sfile + + case "$pkg" in + libghc-*-dev|libghc-*-prof|ghc|ghc-prof) + if [ -z "$files" ] ; then + cfiles=`find_config_for_ghc $pkg` + else + cfiles="$files" + fi + if [ -z "$cfiles" ] ; then + echo "No installed package description files can not be found" >&2 + exit 1 + fi + case "$pkg" in + libghc-*-dev|ghc) + grep -v \ + -e ^haskell:Provides \ + $sfile > $sfile.tmp || true + echo "haskell:Provides=`provides_for_ghc $cfiles`" >> $sfile.tmp + ;; + libghc-*-prof|ghc-prof) + grep -v \ + -e ^haskell:Provides \ + $sfile > $sfile.tmp || true + echo "haskell:Provides=`provides_for_ghc_prof $cfiles`" >> $sfile.tmp + ;; + esac + mv $sfile.tmp $sfile + ;; + *) + ;; + esac +done diff --git a/gen_contents_index b/gen_contents_index new file mode 100644 index 00000000..fad9e2d1 --- /dev/null +++ b/gen_contents_index @@ -0,0 +1,63 @@ +#! /usr/bin/perl +# gen_contents_index, written for Debian by Kari Pahula +# Copyright 2009 Kari Pahula +# Licensed under BSD3, see /usr/share/common-licenses/BSD + +my @ifaces; +my %pkgs; + +# Only do something if we actually have /usr/share/doc +exit 0 unless (-d "/usr/share/doc/ghc-doc/html/libraries/" and -r "/usr/share/doc/ghc-doc/html/libraries/prologue.txt"); + +# Add everything from the global Cabal registry to index. +if (-e '/usr/bin/ghc-pkg') { + open CABAL, 'ghc-pkg dump --global |' or warn "ghc-pkg dump failed: $!"; + addInfo (\*CABAL, \%pkgs, \@ifaces); + close CABAL; +} + +exec ('haddock', '--gen-index', '--gen-contents', + '-o', '/usr/share/doc/ghc-doc/html/libraries/', + '-t'. 'Haskell Hierarchical Libraries', + '-p', '/usr/share/doc/ghc-doc/html/libraries/prologue.txt', + @ifaces); + +sub addInfo { + my $fh = shift; + my %dat; + while (<$fh>) { + if (/^name: (.*)/) { + $dat{pkg} = $1; + } elsif (/^version: (.*)/) { + $dat{ver} = $1; + } elsif (/^haddock-interfaces: (.*)/) { + $dat{ifaces} = $1; + } elsif (/^haddock-html: (.*)/) { + $dat{html} = $1; + } elsif (/^---/) { + process(\%dat, @_); + %dat = (); + } + } + process(\%dat, @_); +} + +sub process { + my $dat = shift; + my $pkgs = shift; + my $ifaces = shift; + my $path; + return undef if $$dat{pkg} eq 'ghc'; + my $p = $$dat{pkg}.'-'.$$dat{ver}; + return undef if (exists $$pkgs{$p}); + if ($$dat{html} =~ m,^/usr/share/doc/ghc-doc/html/libraries/(.*),) { + $path = $1; + } elsif ($$dat{html} =~ m,^/usr/share/doc/([^/]*-doc/html/.*),) { + $path = "../../../$1"; + } + + if (defined $path && -r $$dat{ifaces}) { + $$pkgs{$p} = 1; + push @ifaces, "--read-interface=$path,$$dat{ifaces}"; + } +} diff --git a/ghc-doc.dirs b/ghc-doc.dirs new file mode 100644 index 00000000..d67e5c29 --- /dev/null +++ b/ghc-doc.dirs @@ -0,0 +1,4 @@ +# This is part of the haddock file work-around. By installing these directories +# also in ghc-doc, we ensure that they are removed eventually by dpkg. +/usr/lib/ghc-7.0.2/haddock +/usr/lib/ghc-7.0.3/haddock diff --git a/ghc-doc.doc-base.users-guide b/ghc-doc.doc-base.users-guide new file mode 100644 index 00000000..41742e1a --- /dev/null +++ b/ghc-doc.doc-base.users-guide @@ -0,0 +1,16 @@ +Document: ghc-users-guide +Title: GHC6 User's manual +Author: The GHC Team +Abstract: Glorious Glasgow Haskell Compilation system + (GHC). GHC is a compiler for Haskell98. +
+ Haskell is "the" standard lazy functional programming language. Haskell98 + is the current version of the language. The language definition and + additional documentation can be found in the `haskell-doc' package. + Alternatively, there is an online version at + http://haskell.org/onlinereport/. +Section: Programming/Haskell + +Format: HTML +Index: /usr/share/doc/ghc-doc/html/users_guide/index.html +Files: /usr/share/doc/ghc-doc/html/users_guide/*.html diff --git a/ghc-doc.links.in b/ghc-doc.links.in new file mode 100644 index 00000000..37dd53f1 --- /dev/null +++ b/ghc-doc.links.in @@ -0,0 +1 @@ +/usr/share/doc/ghc-doc/html/users_guide/prof_scc.png /usr/share/doc/ghc-doc/html/users_guide/prof_scc diff --git a/ghc-doc.postinst b/ghc-doc.postinst new file mode 100644 index 00000000..0eaf5f14 --- /dev/null +++ b/ghc-doc.postinst @@ -0,0 +1,41 @@ +#! /bin/sh +# postinst script for ghc-doc +# +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + triggered|configure) + if test -x /usr/lib/ghc/bin/ghc-pkg; then /usr/lib/ghc/bin/ghc-pkg recache --global; fi + /usr/lib/ghc-doc/gen_contents_index + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/ghc-doc.preinst b/ghc-doc.preinst new file mode 100644 index 00000000..257f5ca2 --- /dev/null +++ b/ghc-doc.preinst @@ -0,0 +1,21 @@ +#! /bin/sh + +set -e + +case "$1" in + upgrade|install) + if [ -e /usr/share/doc/ghc-doc/html/libraries/ ] ; then + rm -f /usr/share/doc/ghc-doc/html/libraries/index.html \ + /usr/share/doc/ghc-doc/html/libraries/index-frames.html \ + /usr/share/doc/ghc-doc/html/libraries/doc-index.html + rmdir --ignore-fail-on-non-empty /usr/share/doc/ghc-doc/html/libraries/ + rmdir --ignore-fail-on-non-empty /usr/share/doc/ghc-doc/html/ + fi + ;; + *) + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/ghc-doc.prerm b/ghc-doc.prerm new file mode 100644 index 00000000..025d0aba --- /dev/null +++ b/ghc-doc.prerm @@ -0,0 +1,43 @@ +#! /bin/sh +# prerm script for ghc-doc +# + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ + +case "$1" in + remove|upgrade|deconfigure|failed-upgrade) + # Remove files generated by the postinst trigger + rm -f /usr/share/doc/ghc-doc/html/libraries/index.html \ + /usr/share/doc/ghc-doc/html/libraries/doc-index*.html \ + /usr/share/doc/ghc-doc/html/libraries/frames.html \ + /usr/share/doc/ghc-doc/html/libraries/index-frames.html \ + /usr/share/doc/ghc-doc/html/libraries/haddock-util.js \ + /usr/share/doc/ghc-doc/html/libraries/hslogo-16.png \ + /usr/share/doc/ghc-doc/html/libraries/minus.gif \ + /usr/share/doc/ghc-doc/html/libraries/plus.gif \ + /usr/share/doc/ghc-doc/html/libraries/ocean.css \ + /usr/share/doc/ghc-doc/html/libraries/synopsis.png + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/ghc-doc.triggers b/ghc-doc.triggers new file mode 100644 index 00000000..3eee8bc2 --- /dev/null +++ b/ghc-doc.triggers @@ -0,0 +1,6 @@ +interest-noawait /usr/lib/ghc-doc/haddock +interest-noawait /usr/lib/ghc-7.0.2/haddock +interest-noawait /usr/lib/ghc-7.0.3/haddock +interest-noawait /var/lib/ghc/package.conf.d +interest-noawait /var/lib/ghc-7.0.3/package.conf.d +interest-noawait /var/lib/ghc-7.0.4/package.conf.d diff --git a/ghc-dynamic.dirs b/ghc-dynamic.dirs new file mode 100644 index 00000000..881ded8a --- /dev/null +++ b/ghc-dynamic.dirs @@ -0,0 +1 @@ +/usr/share/lintian/overrides diff --git a/ghc-haddock.manpages b/ghc-haddock.manpages new file mode 100644 index 00000000..263f3318 --- /dev/null +++ b/ghc-haddock.manpages @@ -0,0 +1 @@ +debian/haddock.1 diff --git a/ghc-pkg.man b/ghc-pkg.man new file mode 100644 index 00000000..ccac8e47 --- /dev/null +++ b/ghc-pkg.man @@ -0,0 +1,228 @@ +.TH ghc-pkg 1 "2010-01-27" +.SH NAME +ghc-pkg \- GHC Haskell Cabal package manager +.SH SYNOPSIS +.B ghc-pkg +.I action +.RI [ OPTION ]... +.SH DESCRIPTION +A package is a library of Haskell modules known to the compiler. The +.B ghc-pkg +tool allows adding or removing them from a package database. By +default, the system-wide package database is modified, but +alternatively the user's local package database or another specified +file can be used. +.PP +To make a package available for +.BR ghc , +.B ghc-pkg +can be used to register it. Unregistering it removes it from the +database. Also, packages can be hidden, to make +.B ghc +ignore the package by default, without uninstalling it. Exposing a +package makes a hidden package available. Additionally, +.B ghc-pkg +has various commands to query the package database. +.PP +Where a package name is required, the package can be named in full +including the version number (e.g. +.BR network-1.0 ), +or without the version number. Naming a package without the version +number matches all versions of the package; the specified action will +be applied to all the matching packages. A package specifier that +matches all version of the package can also be written +.BR pkg-* , +to make it clearer that multiple packages are being matched. +.SH ACTIONS +.TP +\fBregister\fP \fIfilename\fP|\fB-\fP +Register the package using the specified installed package +description. +.TP +\fBupdate\fP \fIfilename\fP|\fB-\fP +Register the package, overwriting any other package with the same +name. +.TP +\fBunregister\fP \fIpkg-id\fP +Unregister the specified package. +.TP +\fBexpose\fP \fIpkg-id\fP +Expose the specified package. +.TP +\fBhide\fP \fIpkg-id\fP +Hide the specified package +.TP +\fBlist\fP \fR[\fIpkg\fR]...\fP +List registered packages in the global database, and also the user +database if +.B --user +is given. If a package name is given all the registered versions will +be listed in ascending order. Accepts the +.B --simple-output +flag. +.TP +.B dot +Generate a graph of the package dependencies in a form suitable for +input for the graphviz tools. For example, to generate a PDF of the +dependency graph: +.br +\fB dot \| tred \| dot -Tpdf >pkgs.pdf\fP +.TP +\fBfind-module\fP \fImodule\fP +List registered packages exposing module +.I module +in the global database, and also the user database if +.B --user +is given. All the registered versions will be listed in ascending +order. Accepts the +.B --simple-output +flag. +.TP +\fBlatest\fP \fIpkg-id\fP +Prints the highest registered version of a package. +.TP +.B check +Check the consistency of package dependencies and list broken +packages. Accepts the +.B --simple-output +flag. +.TP +\fBdescribe\fP \fIpkg\fP +Give the registered description for the +specified package. The description is returned in precisely the syntax +required by ghc-pkg register. +.TP +\fBfield\fP \fIpkg field\fP +Extract the specified field of the package description for the +specified package. Accepts comma-separated multiple fields. +.TP +.B dump +Dump the registered description for every package. This is like +.BR ghc-pkg\ describe\ '*' , +expect that it is intended to be used by tools that parse the results, +rather than humans. +.TP +.B recache +Regenerate the package database cache. This command should only be +necessary if you added a package to the database by dropping a file +into the database directory manyally. By default, the global DB is +recached; to recache a different DB use +.B --user +or +.B --package-conf +as appropriate. +.SH OPTIONS +When asked to modify a database +.RB ( register ,\ unregister ,\ update ,\ hide ,\ expose ,\ and\ also\ check ), +.B ghc-pkg +modifies the global database by +default. Specifying +.B --user +causes it to act on the user database, +or +.B --package-conf +can be used to act on another database +entirely. When multiple of these options are given, the rightmost +one is used as the database to act upon. +.PP +Commands that query the package database +.RB ( list ,\ latest ,\ describe ,\ field ) +operate on the list of databases specified by the flags +.BR --user ,\ --global , +and +.BR --package-conf . +If none of these flags are +given, the default is +.BR --global\ --user . +.TP +.B --user +Use the current user's package database. +.TP +.B --global +Use the global package database. +.TP +\fB-f\fP \fIFILE\fP, \fB--package-conf=\fIFILE\fP +Use the specified package config file. +.TP +.BI --global-conf= FILE +Location of the global package config. +.TP +.B --force +Ignore missing dependencies, directories, and libraries. +.TP +.B --force-files +Ignore missing directories and libraries only. +.TP +.BR -g ,\ --auto-ghc-libs +Automatically build libs for GHCi (with register). +.TP +.BR -? ,\ --help +Display a help message and exit. +.TP +.BR -V ,\ --version +Output version information and exit. +.TP +.B --simple-output +Print output in easy-to-parse format for some commands. +.TP +.B --names-only +Only print package names, not versions; can only be used with +.BR list\ --simple-output . +.TP +.B --ignore-case +Ignore case for substring matching. +.SH ENVIRONMENT VARIABLES +.TP +.B GHC_PACKAGE_PATH +The +.B GHC_PACKAGE_PATH +environment variable may be set to a +.BR : -separated +list of files containing package databases. This list of package +databases is used by +.B ghc +and +.BR ghc-pkg , +with earlier databases in the list overriding later ones. This order +was chosen to match the behaviour of the +.B PATH +environment variable; think of it as a list of package databases that +are searched left-to-right for packages. + +If +.B GHC_PACKAGE_PATH +ends in a separator, then the default user and system package +databases are appended, in that order. e.g. to augment the usual set +of packages with a database of your own, you could say: + +.br +\fB export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:\fP +.br + +To check whether your +.B GHC_PACKAGE_PATH +setting is doing the right thing, +.B ghc-pkg list +will list all the databases in use, in the reverse order they are +searched. +.SH FILES +Both of these locations are changed for Debian. Upstream still keeps +these under +.IR /usr . +Some programs may refer to that, but look in +.I /var +instead. +.TP +.I /var/lib/ghc/package.conf +Global package.conf file. +.TP +.I /var/lib/ghc/package.conf.d/ +Directory for library specific package.conf files. These are added to +the global registry. +.SH "SEE ALSO" +.BR ghc (1), +.BR runghc (1), +.BR hugs (1). +.SH AUTHOR +This manual page was written by Kari Pahula , for the +Debian project (and may be used by others). diff --git a/ghc.docs b/ghc.docs new file mode 100644 index 00000000..3bcbd4bb --- /dev/null +++ b/ghc.docs @@ -0,0 +1,3 @@ +README +ANNOUNCE + diff --git a/ghc.postinst b/ghc.postinst new file mode 100644 index 00000000..16293be1 --- /dev/null +++ b/ghc.postinst @@ -0,0 +1,57 @@ +#! /bin/sh +# postinst script for ghc +# +set -e + +execdir=/usr/bin +libdir=/usr/lib/ghc +bindir=$libdir/bin +mandir=/usr/share/man +vardir=/var/lib/ghc + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure|abort-upgrade|abort-remove|abort-deconfigure) + if $libdir/bin/ghc --info | grep '"Have interpreter","YES"' >/dev/null ; then + update-alternatives \ + --install $execdir/runhaskell runhaskell $execdir/runghc 600 \ + --slave $mandir/man1/runhaskell.1.gz runhaskell.1.gz $mandir/man1/runghc.1.gz + fi + update-alternatives \ + --install $execdir/haskell-compiler haskell-compiler $execdir/ghc 600 \ + --slave $mandir/man1/haskell-compiler.1.gz haskell-compiler.1.gz $mandir/man1/ghc.1.gz + $bindir/ghc-pkg recache --global + $bindir/ghc-pkg check --global || true + ;; + triggered) + $bindir/ghc-pkg recache --global + $bindir/ghc-pkg check --global || true + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/ghc.preinst b/ghc.preinst new file mode 100644 index 00000000..9a99ab19 --- /dev/null +++ b/ghc.preinst @@ -0,0 +1,29 @@ +#! /bin/sh +# preinst script for ghc + +set -e + +case "$1" in + install) + if test -n "$2"; then + if dpkg --compare-versions "$2" "<<" "6.10.3" && dpkg --compare-versions "$2" ">>" "6.10.1"; then + rm -f /usr/lib/ghc-6.10.1/package.conf* + rmdir --ignore-fail-on-non-empty /usr/lib/ghc-6.10.1 + fi + fi + ;; + upgrade|abort-upgrade) + exit 0 + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/ghc.prerm b/ghc.prerm new file mode 100644 index 00000000..2293bbc6 --- /dev/null +++ b/ghc.prerm @@ -0,0 +1,41 @@ +#! /bin/sh +# prerm script for ghc +# +# SOURCE: ghc.prerm.in + +set -e + +execdir=/usr/bin +libdir=/usr/lib/ghc +bindir=$libdir/bin +vardir=/var/lib/ghc + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ + +case "$1" in + remove|upgrade|deconfigure|failed-upgrade) + update-alternatives --remove runhaskell $execdir/runghc + update-alternatives --remove haskell-compiler $execdir/ghc + rm -f $vardir/package.conf.d/package.cache + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/ghc.triggers b/ghc.triggers new file mode 100644 index 00000000..741e8505 --- /dev/null +++ b/ghc.triggers @@ -0,0 +1 @@ +interest-noawait /var/lib/ghc/package.conf.d diff --git a/ghc6-doc.prerm b/ghc6-doc.prerm new file mode 100644 index 00000000..38448357 --- /dev/null +++ b/ghc6-doc.prerm @@ -0,0 +1,39 @@ +#! /bin/sh +# prerm script for ghc6-doc + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ + +case "$1" in + remove|upgrade|deconfigure|failed-upgrade) + rm -f /usr/share/doc/ghc6-doc/libraries/doc-index*.html + rm -f /usr/share/doc/ghc6-doc/libraries/haddock.css + rm -f /usr/share/doc/ghc6-doc/libraries/haddock.js + rm -f /usr/share/doc/ghc6-doc/libraries/index.html + rm -f /usr/share/doc/ghc6-doc/libraries/libraries.txt + rm -f /usr/share/doc/ghc6-doc/libraries/haskell_icon.gif + rm -f /usr/share/doc/ghc6-doc/libraries/minus.gif + rm -f /usr/share/doc/ghc6-doc/libraries/plus.gif + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + diff --git a/ghc6.preinst b/ghc6.preinst new file mode 100644 index 00000000..6a38f63d --- /dev/null +++ b/ghc6.preinst @@ -0,0 +1,27 @@ +#! /bin/sh +# preinst script for ghc6 + +set -e + +case "$1" in + upgrade) + # Remove the .cache file of any previous ghc6 installation, to avoid dpkg warnings + # about non-empty directories to be remoed. + rm -f /var/lib/ghc-6.*/package.conf.d/package.cache || true + exit 0 + ;; + install|abort-upgrade) + exit 0 + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/haddock.man b/haddock.man new file mode 100644 index 00000000..a30106ba --- /dev/null +++ b/haddock.man @@ -0,0 +1,231 @@ +.TH HADDOCK 1 "July 2010" "Haddock, version 2.6.1" "Haddock documentation generator" + + +.SH NAME +haddock \- documentation tool for annotated Haskell source code + + +.SH SYNOPSIS +.B haddock +.RI [ options ] " file" ... + + +.SH DESCRIPTION +This manual page documents briefly the +.B haddock +command. +Extensive documentation is available in various other formats including DVI, +PostScript and HTML; see below. + +.PP +.I file +is a filename containing a Haskell source module. +All the modules specified on the command line will be processed together. +When one module refers to an entity in another module being processed, the +documentation will link directly to that entity. + +Entities that cannot be found, for example because they are in a module that +is not being processed as part of the current batch, simply will not be +hyperlinked in the generated documentation. +.B haddock +will emit warnings listing all the identifiers it could not resolve. + +The modules should not be mutually recursive, as +.B haddock +does not like swimming in circles. + + +.SH OPTIONS +The programs follow the usual GNU command line syntax, with long +options starting with two dashes (`--'). +A summary of options is included below. +For a complete description, see the other documentation. + +.TP +\fB\-o \fIDIR\fP, \-\-odir=\fIDIR\fP +directory in which to put the output files + +.TP +\fB\-i \fIFILE\fP, \-\-read-interface=\fIFILE\fP +read an interface from +.IR FILE . + +.TP +\fB\-D \fIFILE\fP, \-\-dump\-interface=\fIFILE\fP +dump an interface for these modules in +.IR FILE . + +.TP +\fB\-l \fIDIR\fP, \-\-lib=\fIDIR\fP +location of Haddock's auxiliary files + +.TP +.BR \-h ", " \-\-html +Generate documentation in HTML format. +Several files will be generated into the current directory (or the specified +directory if the +.B \-o +option is given), including the following: +.RS +.TP +.I index.html +The top level page of the documentation: +lists the modules available, using indentation to represent the hierarchy if +the modules are hierarchical. +.TP +.I haddock.css +The stylesheet used by the generated HTML. +Feel free to modify this to change the colors or layout, or even specify +your own stylesheet using the +.B \-\-css +option. +.TP +.I module.html +An HTML page for each module. +.TP +.IR doc-index.html ", " doc-index-XX.html +The index, split into two (functions/constructors and types/classes, as per +Haskell namespaces) and further split alphabetically. +.RE + +.TP +.B \-\-hoogle +output for Hoogle + +.TP +\fB\-\-html\-help=\fIformat +produce index and table of contents in mshelp, mshelp2 or devhelp format +(with \fI\-h\fP) + +.TP +\fB\-\-source\-base=\fPURL +Include links to the source files in the generated documentation, where URL +is the base URL where the source files can be found. + +.TP +\fB\-s \fPURL, \fB\-\-source\-module=\fPURL +Include links to the source files in the generated documentation, where URL +is a source code link for each module (using the %{FILE} or %{MODULE} vars). + +.TP +\fB\-\-source\-entity=\fPURL +Include links to the source files in the generated documentation, where URL +is a source code link for each entity (using the %{FILE}, %{MODULE} or %{NAME} vars). + +.TP +\fB\-\-comments\-base=\fPURL +URL for a comments link on the contents and index pages. +.TP +\fB\-\-comments\-module=\fPURL +URL for a comments link for each module (using the %{MODULE} var). +.TP +\fB\-\-comments\-entity=\fPURL +URL for a comments link for each entity (using the %{FILE}, %{MODULE} or %{NAME} vars). +.TP +.BI \-\-css= FILE +Use the CSS +.I FILE +instead of the default stylesheet that comes with +.B haddock +for HTML output. It should specify certain classes: see the default stylesheet for details. + +.TP +\fB\-p \fIFILE\fP, \-\-prologue=\fIFILE\fP +Specify a file containing prologue text. + +.TP +\fB\-t \fITITLE\fP, \-\-title=\fITITLE\fP +Use \fITITLE\fP as the page heading for each page in the documentation. +This will normally be the name of the library being documented. + +The title should be a plain string (no markup please!). + +.TP +\fB\-k \fINAME\fP, \-\-package=\fINAME\fP +Specify the package name (optional). + +.TP +.BR \-n ", " \-\-no\-implicit\-prelude +do not assume Prelude is imported + +.TP +.BR \-d ", " \-\-debug +Enable extra debugging output. + +.TP +.BR \-? ", " \-\-help +Display help. + +.TP +.BR \-V ", " \-\-version +Display version. + +.TP +.BR \-v ", " \-\-verbose +Verbose status reporting. + +.TP +\fB\-\-use\-contents=\fPURL +Use a separately-generated HTML contents page. + +.TP +.B \-\-gen\-contents +Generate an HTML contents from specified interfaces. + +.TP +\fB\-\-use\-index=\fPURL +Use a separately-generated HTML index. + +.TP +.B \-\-gen\-index +Generate an HTML index from specified interfaces. + +.TP +.B \-\-ignore\-all\-exports +Behave as if all modules have the ignore-exports atribute + +.TP +\fB\-\-hide=\fIMODULE +Behave as if \fIMODULE\fP has the hide attribute. + +.TP +\fB\-\-use\-package=\fIPACKAGE +The modules being processed depend on \fIPACKAGE\fP. + +.SH FILES +.I /usr/bin/haddock +.br +.I /usr/share/haddock-2.6.1/html/plus.gif +.br +.I /usr/share/haddock-2.6.1/html/minus.gif +.br +.I /usr/share/haddock-2.6.1/html/haskell_icon.gif +.br +.I /usr/share/haddock-2.6.1/html/haddock.js +.br +.I /usr/share/haddock-2.6.1/html/haddock.css +.br +.I /usr/share/haddock-2.6.1/html/haddock-DEBUG.css + +.SH SEE ALSO +.IR /usr/share/doc/haddock/ , +.br +the Haddock homepage +.UR http://haskell.org/haddock/ +(http://haskell.org/haddock/) +.UE + +.SH COPYRIGHT +Haddock version 2.6.1 + +Copyright 2006-2010 Simon Marlow , Dawid Waern . +All rights reserved. + + +.SH AUTHOR +This manual page was written by Michael Weber +for the Debian GNU/Linux system (but may be used by others). + +.\" Local variables: +.\" mode: nroff +.\" End: diff --git a/index.html b/index.html new file mode 100644 index 00000000..282d51e2 --- /dev/null +++ b/index.html @@ -0,0 +1,10 @@ + + + + GHC's documentation has moved + + + GHC's documentation's main page is no longer in this place. + Instead, see html/index.html. + + diff --git a/lintian-overrides/ghc-dynamic b/lintian-overrides/ghc-dynamic new file mode 100644 index 00000000..0d43dee8 --- /dev/null +++ b/lintian-overrides/ghc-dynamic @@ -0,0 +1,2 @@ +# the dep on ghc pulls in the needed libraries +ghc-dynamic: missing-dependency-on-libc diff --git a/patches/64-bit-big-endian b/patches/64-bit-big-endian new file mode 100644 index 00000000..8aca0f04 --- /dev/null +++ b/patches/64-bit-big-endian @@ -0,0 +1,63 @@ +commit a4b1a43542b11d09dd3b603d82c5a0e99da67d74 +Author: Austin Seipp +Date: Fri Nov 1 22:17:01 2013 -0500 + + Fix loop on 64bit Big-Endian platforms (#8134) + + This is a fun one. + + In the RTS, `cas` expects a pointer to StgWord which will translate to + unsigned long (8 bytes under LP64.) But we had previously declared + token_locked as *StgBool* - which evaluates to 'int' (4 bytes under + LP64.) That means we fail to provide enough storage for the cas + primitive, causing it to corrupt memory on a 64bit platform. + + Hilariously, this somehow did not affect little-endian platforms (ARM, + x86, etc) before. That's because to clear our lock token, we would say: + + token_locked = 0; + + But because token_locked is 32bits technically, this only writes to + half of the 64bit quantity. On a Big-Endian machine, this won't do + anything. That is, token_locked starts as 0: + + / token_locked + | + v + 0x00000000 + + and the first cas modifies the memory to: + + / valid / corrupted + | | + v v + 0x00000000 0x00000001 + + We then clear token_locked, but this doesn't change the corrupted 4 + bytes of memory. And then we try to lock the token again, spinning until + it is released - clearly a deadlock. + + Related: Windows (amd64) doesn't follow LP64, but LLP64, where both + int and long are 4 bytes, so this shouldn't change anything on these + platforms. + + Thanks to Reid Barton for helping the diagnosis. Also, thanks to Jens + Peterson who confirmed this also fixes building GHC on Fedora/ppc64 and + Fedora/s390x. + + Authored-by: Gustavo Luiz Duarte + Signed-off-by: Austin Seipp + +Index: ghc-7.6.3/rts/STM.c +=================================================================== +--- ghc-7.6.3.orig/rts/STM.c 2014-03-03 09:11:24.714692842 +0100 ++++ ghc-7.6.3/rts/STM.c 2014-03-03 09:11:24.714692842 +0100 +@@ -927,7 +927,7 @@ + static volatile StgInt64 max_commits = 0; + + #if defined(THREADED_RTS) +-static volatile StgBool token_locked = FALSE; ++static volatile StgWord token_locked = FALSE; + + static void getTokenBatch(Capability *cap) { + while (cas((void *)&token_locked, FALSE, TRUE) == TRUE) { /* nothing */ } diff --git a/patches/ARM-VFPv3D16 b/patches/ARM-VFPv3D16 new file mode 100644 index 00000000..45c627b3 --- /dev/null +++ b/patches/ARM-VFPv3D16 @@ -0,0 +1,16 @@ +Description: Use VFPv3-D16 FPU for ARM builds +Author: Jani Monoses + +Index: ghc-7.6.1/aclocal.m4 +=================================================================== +--- ghc-7.6.1.orig/aclocal.m4 2012-09-04 19:10:14.000000000 +0200 ++++ ghc-7.6.1/aclocal.m4 2012-10-08 13:12:33.055874894 +0200 +@@ -349,7 +349,7 @@ + ], + [changequote(, )dnl + ARM_ISA=ARMv7 +- ARM_ISA_EXT="[VFPv3,NEON]" ++ ARM_ISA_EXT="[VFPv3D16,NEON]" + changequote([, ])dnl + ]) + ]) diff --git a/patches/Handle-sign-bit-when-generating-veneer-for-ARM-Thumb.patch b/patches/Handle-sign-bit-when-generating-veneer-for-ARM-Thumb.patch new file mode 100644 index 00000000..5590f7c7 --- /dev/null +++ b/patches/Handle-sign-bit-when-generating-veneer-for-ARM-Thumb.patch @@ -0,0 +1,22 @@ +From c47c47a4afb3aea920a8006cd44ced5874664288 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Tue, 9 Apr 2013 00:02:27 +0100 +Subject: [PATCH] Handle sign bit when generating veneer for ARM Thumb branch + relocation + +--- + rts/Linker.c | 1 + + 1 file changed, 1 insertion(+) + +Index: ghc-7.6.3/rts/Linker.c +=================================================================== +--- ghc-7.6.3.orig/rts/Linker.c 2013-06-05 20:47:32.498881090 +0200 ++++ ghc-7.6.3/rts/Linker.c 2013-06-05 20:47:32.498881090 +0200 +@@ -4850,6 +4850,7 @@ + // Generate veneer + SymbolExtra *extra = makeArmSymbolExtra(oc, ELF_R_SYM(info), S+imm+4, 1, is_target_thm); + offset = (StgWord32) &extra->jumpIsland - P - 4; ++ sign = offset >> 31; + to_thm = 1; + } else if (!is_target_thm && ELF_R_TYPE(info) == R_ARM_THM_CALL) { + offset &= ~0x3; diff --git a/patches/arm64.patch b/patches/arm64.patch new file mode 100644 index 00000000..d246a003 --- /dev/null +++ b/patches/arm64.patch @@ -0,0 +1,1717 @@ +Description: Add arm64 support +Author: Karel Gardas +Author: Colin Watson +Bug: https://ghc.haskell.org/trac/ghc/ticket/7942 +Last-Update: 2014-04-04 + +Index: b/aclocal.m4 +=================================================================== +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -173,7 +173,7 @@ + GET_ARM_ISA() + test -z "[$]2" || eval "[$]2=\"ArchARM {armISA = \$ARM_ISA, armISAExt = \$ARM_ISA_EXT, armABI = \$ARM_ABI}\"" + ;; +- alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax) ++ aarch64|alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax) + test -z "[$]2" || eval "[$]2=ArchUnknown" + ;; + *) +@@ -1835,6 +1835,9 @@ + # converts cpu from gnu to ghc naming, and assigns the result to $target_var + AC_DEFUN([GHC_CONVERT_CPU],[ + case "$1" in ++ aarch64*) ++ $2="aarch64" ++ ;; + alpha*) + $2="alpha" + ;; +Index: b/includes/stg/MachRegs.h +=================================================================== +--- a/includes/stg/MachRegs.h ++++ b/includes/stg/MachRegs.h +@@ -43,6 +43,7 @@ + #define powerpc_REGS (powerpc_TARGET_ARCH || powerpc64_TARGET_ARCH || rs6000_TARGET_ARCH) + #define sparc_REGS sparc_TARGET_ARCH + #define arm_REGS arm_TARGET_ARCH ++#define aarch64_REGS aarch64_TARGET_ARCH + #define darwin_REGS darwin_TARGET_OS + #else + #define i386_REGS i386_HOST_ARCH +@@ -50,6 +51,7 @@ + #define powerpc_REGS (powerpc_HOST_ARCH || powerpc64_HOST_ARCH || rs6000_HOST_ARCH) + #define sparc_REGS sparc_HOST_ARCH + #define arm_REGS arm_HOST_ARCH ++#define aarch64_REGS aarch64_HOST_ARCH + #define darwin_REGS darwin_HOST_OS + #endif + +@@ -461,6 +463,63 @@ + + #endif /* arm */ + ++/* ----------------------------------------------------------------------------- ++ The ARMv8/AArch64 ABI register mapping ++ ++ The AArch64 provides 31 64-bit general purpose registers ++ and 32 128-bit SIMD/floating point registers. ++ ++ General purpose registers (see Chapter 5.1.1 in ARM IHI 0055B) ++ ++ Register | Special | Role in the procedure call standard ++ ---------+---------+------------------------------------ ++ SP | | The Stack Pointer ++ r30 | LR | The Link Register ++ r29 | FP | The Frame Pointer ++ r19-r28 | | Callee-saved registers ++ r18 | | The Platform Register, if needed; ++ | | or temporary register ++ r17 | IP1 | The second intra-procedure-call temporary register ++ r16 | IP0 | The first intra-procedure-call scratch register ++ r9-r15 | | Temporary registers ++ r8 | | Indirect result location register ++ r0-r7 | | Parameter/result registers ++ ++ ++ FPU/SIMD registers ++ ++ s/d/q/v0-v7 Argument / result/ scratch registers ++ s/d/q/v8-v15 callee-saved registers (must be preserved across subrutine calls, ++ but only bottom 64-bit value needs to be preserved) ++ s/d/q/v16-v31 temporary registers ++ ++ ----------------------------------------------------------------------------- */ ++ ++#if aarch64_REGS ++ ++#define REG(x) __asm__(#x) ++ ++#define REG_Base r19 ++#define REG_Sp r20 ++#define REG_Hp r21 ++#define REG_R1 r22 ++#define REG_R2 r23 ++#define REG_R3 r24 ++#define REG_R4 r25 ++#define REG_R5 r26 ++#define REG_R6 r27 ++#define REG_SpLim r28 ++ ++#define REG_F1 s8 ++#define REG_F2 s9 ++#define REG_F3 s10 ++#define REG_F4 s11 ++ ++#define REG_D1 d12 ++#define REG_D2 d13 ++ ++#endif /* aarch64 */ ++ + #endif /* NO_REGS */ + + /* ----------------------------------------------------------------------------- +Index: b/libffi/aarch64.patch +=================================================================== +--- /dev/null ++++ b/libffi/aarch64.patch +@@ -0,0 +1,1511 @@ ++2012-10-30 James Greenhalgh ++ Marcus Shawcroft ++ ++ * src/aarch64/ffi.c: New. ++ * src/aarch64/ffitarget.h: Likewise. ++ * src/aarch64/sysv.S: Likewise. ++ * Makefile.am: Support aarch64. ++ * configure.ac: Support aarch64. ++ ++Index: b/Makefile.am ++=================================================================== ++--- a/Makefile.am +++++ b/Makefile.am ++@@ -5,6 +5,7 @@ ++ SUBDIRS = include testsuite man ++ ++ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \ +++ src/aarch64/ffi.c src/aarch64/ffitarget.h src/aarch64/sysv.S \ ++ src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \ ++ src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \ ++ src/avr32/ffi.c src/avr32/sysv.S src/avr32/ffitarget.h \ ++@@ -147,6 +148,9 @@ ++ if POWERPC_FREEBSD ++ nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S ++ endif +++if AARCH64 +++nodist_libffi_la_SOURCES += src/aarch64/sysv.S src/aarch64/ffi.c +++endif ++ if ARM ++ nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c ++ if FFI_EXEC_TRAMPOLINE_TABLE ++Index: b/configure.ac ++=================================================================== ++--- a/configure.ac +++++ b/configure.ac ++@@ -53,6 +53,10 @@ ++ ++ TARGETDIR="unknown" ++ case "$host" in +++ aarch64*-*-*) +++ TARGET=AARCH64; TARGETDIR=aarch64 +++ ;; +++ ++ alpha*-*-*) ++ TARGET=ALPHA; TARGETDIR=alpha; ++ # Support 128-bit long double, changeable via command-line switch. ++@@ -228,6 +232,7 @@ ++ AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX) ++ AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN) ++ AM_CONDITIONAL(POWERPC_FREEBSD, test x$TARGET = xPOWERPC_FREEBSD) +++AM_CONDITIONAL(AARCH64, test x$TARGET = xAARCH64) ++ AM_CONDITIONAL(ARM, test x$TARGET = xARM) ++ AM_CONDITIONAL(AVR32, test x$TARGET = xAVR32) ++ AM_CONDITIONAL(LIBFFI_CRIS, test x$TARGET = xLIBFFI_CRIS) ++Index: b/src/aarch64/ffi.c ++=================================================================== ++--- /dev/null +++++ b/src/aarch64/ffi.c ++@@ -0,0 +1,1076 @@ +++/* Copyright (c) 2009, 2010, 2011, 2012 ARM Ltd. +++ +++Permission is hereby granted, free of charge, to any person obtaining +++a copy of this software and associated documentation files (the +++``Software''), to deal in 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: +++ +++The above copyright notice and this permission notice shall be +++included in all copies or substantial portions of the Software. +++ +++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 AUTHORS 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 IN THE SOFTWARE. */ +++ +++#include +++ +++#include +++#include +++ +++#include +++ +++/* Stack alignment requirement in bytes */ +++#define AARCH64_STACK_ALIGN 16 +++ +++#define N_X_ARG_REG 8 +++#define N_V_ARG_REG 8 +++ +++#define AARCH64_FFI_WITH_V (1 << AARCH64_FFI_WITH_V_BIT) +++ +++union _d +++{ +++ UINT64 d; +++ UINT32 s[2]; +++}; +++ +++struct call_context +++{ +++ UINT64 x [AARCH64_N_XREG]; +++ struct +++ { +++ union _d d[2]; +++ } v [AARCH64_N_VREG]; +++}; +++ +++static void * +++get_x_addr (struct call_context *context, unsigned n) +++{ +++ return &context->x[n]; +++} +++ +++static void * +++get_s_addr (struct call_context *context, unsigned n) +++{ +++#if defined __AARCH64EB__ +++ return &context->v[n].d[1].s[1]; +++#else +++ return &context->v[n].d[0].s[0]; +++#endif +++} +++ +++static void * +++get_d_addr (struct call_context *context, unsigned n) +++{ +++#if defined __AARCH64EB__ +++ return &context->v[n].d[1]; +++#else +++ return &context->v[n].d[0]; +++#endif +++} +++ +++static void * +++get_v_addr (struct call_context *context, unsigned n) +++{ +++ return &context->v[n]; +++} +++ +++/* Return the memory location at which a basic type would reside +++ were it to have been stored in register n. */ +++ +++static void * +++get_basic_type_addr (unsigned short type, struct call_context *context, +++ unsigned n) +++{ +++ switch (type) +++ { +++ case FFI_TYPE_FLOAT: +++ return get_s_addr (context, n); +++ case FFI_TYPE_DOUBLE: +++ return get_d_addr (context, n); +++ case FFI_TYPE_LONGDOUBLE: +++ return get_v_addr (context, n); +++ case FFI_TYPE_UINT8: +++ case FFI_TYPE_SINT8: +++ case FFI_TYPE_UINT16: +++ case FFI_TYPE_SINT16: +++ case FFI_TYPE_UINT32: +++ case FFI_TYPE_SINT32: +++ case FFI_TYPE_INT: +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_UINT64: +++ case FFI_TYPE_SINT64: +++ return get_x_addr (context, n); +++ default: +++ FFI_ASSERT (0); +++ return NULL; +++ } +++} +++ +++/* Return the alignment width for each of the basic types. */ +++ +++static size_t +++get_basic_type_alignment (unsigned short type) +++{ +++ switch (type) +++ { +++ case FFI_TYPE_FLOAT: +++ case FFI_TYPE_DOUBLE: +++ return sizeof (UINT64); +++ case FFI_TYPE_LONGDOUBLE: +++ return sizeof (long double); +++ case FFI_TYPE_UINT8: +++ case FFI_TYPE_SINT8: +++ case FFI_TYPE_UINT16: +++ case FFI_TYPE_SINT16: +++ case FFI_TYPE_UINT32: +++ case FFI_TYPE_INT: +++ case FFI_TYPE_SINT32: +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_UINT64: +++ case FFI_TYPE_SINT64: +++ return sizeof (UINT64); +++ +++ default: +++ FFI_ASSERT (0); +++ return 0; +++ } +++} +++ +++/* Return the size in bytes for each of the basic types. */ +++ +++static size_t +++get_basic_type_size (unsigned short type) +++{ +++ switch (type) +++ { +++ case FFI_TYPE_FLOAT: +++ return sizeof (UINT32); +++ case FFI_TYPE_DOUBLE: +++ return sizeof (UINT64); +++ case FFI_TYPE_LONGDOUBLE: +++ return sizeof (long double); +++ case FFI_TYPE_UINT8: +++ return sizeof (UINT8); +++ case FFI_TYPE_SINT8: +++ return sizeof (SINT8); +++ case FFI_TYPE_UINT16: +++ return sizeof (UINT16); +++ case FFI_TYPE_SINT16: +++ return sizeof (SINT16); +++ case FFI_TYPE_UINT32: +++ return sizeof (UINT32); +++ case FFI_TYPE_INT: +++ case FFI_TYPE_SINT32: +++ return sizeof (SINT32); +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_UINT64: +++ return sizeof (UINT64); +++ case FFI_TYPE_SINT64: +++ return sizeof (SINT64); +++ +++ default: +++ FFI_ASSERT (0); +++ return 0; +++ } +++} +++ +++extern void +++ffi_call_SYSV (unsigned (*)(struct call_context *context, unsigned char *, +++ extended_cif *), +++ struct call_context *context, +++ extended_cif *, +++ unsigned, +++ void (*fn)(void)); +++ +++extern void +++ffi_closure_SYSV (ffi_closure *); +++ +++/* Test for an FFI floating point representation. */ +++ +++static unsigned +++is_floating_type (unsigned short type) +++{ +++ return (type == FFI_TYPE_FLOAT || type == FFI_TYPE_DOUBLE +++ || type == FFI_TYPE_LONGDOUBLE); +++} +++ +++/* Test for a homogeneous structure. */ +++ +++static unsigned short +++get_homogeneous_type (ffi_type *ty) +++{ +++ if (ty->type == FFI_TYPE_STRUCT && ty->elements) +++ { +++ unsigned i; +++ unsigned short candidate_type +++ = get_homogeneous_type (ty->elements[0]); +++ for (i =1; ty->elements[i]; i++) +++ { +++ unsigned short iteration_type = 0; +++ /* If we have a nested struct, we must find its homogeneous type. +++ If that fits with our candidate type, we are still +++ homogeneous. */ +++ if (ty->elements[i]->type == FFI_TYPE_STRUCT +++ && ty->elements[i]->elements) +++ { +++ iteration_type = get_homogeneous_type (ty->elements[i]); +++ } +++ else +++ { +++ iteration_type = ty->elements[i]->type; +++ } +++ +++ /* If we are not homogeneous, return FFI_TYPE_STRUCT. */ +++ if (candidate_type != iteration_type) +++ return FFI_TYPE_STRUCT; +++ } +++ return candidate_type; +++ } +++ +++ /* Base case, we have no more levels of nesting, so we +++ are a basic type, and so, trivially homogeneous in that type. */ +++ return ty->type; +++} +++ +++/* Determine the number of elements within a STRUCT. +++ +++ Note, we must handle nested structs. +++ +++ If ty is not a STRUCT this function will return 0. */ +++ +++static unsigned +++element_count (ffi_type *ty) +++{ +++ if (ty->type == FFI_TYPE_STRUCT && ty->elements) +++ { +++ unsigned n; +++ unsigned elems = 0; +++ for (n = 0; ty->elements[n]; n++) +++ { +++ if (ty->elements[n]->type == FFI_TYPE_STRUCT +++ && ty->elements[n]->elements) +++ elems += element_count (ty->elements[n]); +++ else +++ elems++; +++ } +++ return elems; +++ } +++ return 0; +++} +++ +++/* Test for a homogeneous floating point aggregate. +++ +++ A homogeneous floating point aggregate is a homogeneous aggregate of +++ a half- single- or double- precision floating point type with one +++ to four elements. Note that this includes nested structs of the +++ basic type. */ +++ +++static int +++is_hfa (ffi_type *ty) +++{ +++ if (ty->type == FFI_TYPE_STRUCT +++ && ty->elements[0] +++ && is_floating_type (get_homogeneous_type (ty))) +++ { +++ unsigned n = element_count (ty); +++ return n >= 1 && n <= 4; +++ } +++ return 0; +++} +++ +++/* Test if an ffi_type is a candidate for passing in a register. +++ +++ This test does not check that sufficient registers of the +++ appropriate class are actually available, merely that IFF +++ sufficient registers are available then the argument will be passed +++ in register(s). +++ +++ Note that an ffi_type that is deemed to be a register candidate +++ will always be returned in registers. +++ +++ Returns 1 if a register candidate else 0. */ +++ +++static int +++is_register_candidate (ffi_type *ty) +++{ +++ switch (ty->type) +++ { +++ case FFI_TYPE_VOID: +++ case FFI_TYPE_FLOAT: +++ case FFI_TYPE_DOUBLE: +++ case FFI_TYPE_LONGDOUBLE: +++ case FFI_TYPE_UINT8: +++ case FFI_TYPE_UINT16: +++ case FFI_TYPE_UINT32: +++ case FFI_TYPE_UINT64: +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_SINT8: +++ case FFI_TYPE_SINT16: +++ case FFI_TYPE_SINT32: +++ case FFI_TYPE_INT: +++ case FFI_TYPE_SINT64: +++ return 1; +++ +++ case FFI_TYPE_STRUCT: +++ if (is_hfa (ty)) +++ { +++ return 1; +++ } +++ else if (ty->size > 16) +++ { +++ /* Too large. Will be replaced with a pointer to memory. The +++ pointer MAY be passed in a register, but the value will +++ not. This test specifically fails since the argument will +++ never be passed by value in registers. */ +++ return 0; +++ } +++ else +++ { +++ /* Might be passed in registers depending on the number of +++ registers required. */ +++ return (ty->size + 7) / 8 < N_X_ARG_REG; +++ } +++ break; +++ +++ default: +++ FFI_ASSERT (0); +++ break; +++ } +++ +++ return 0; +++} +++ +++/* Test if an ffi_type argument or result is a candidate for a vector +++ register. */ +++ +++static int +++is_v_register_candidate (ffi_type *ty) +++{ +++ return is_floating_type (ty->type) +++ || (ty->type == FFI_TYPE_STRUCT && is_hfa (ty)); +++} +++ +++/* Representation of the procedure call argument marshalling +++ state. +++ +++ The terse state variable names match the names used in the AARCH64 +++ PCS. */ +++ +++struct arg_state +++{ +++ unsigned ngrn; /* Next general-purpose register number. */ +++ unsigned nsrn; /* Next vector register number. */ +++ unsigned nsaa; /* Next stack offset. */ +++}; +++ +++/* Initialize a procedure call argument marshalling state. */ +++static void +++arg_init (struct arg_state *state, unsigned call_frame_size) +++{ +++ state->ngrn = 0; +++ state->nsrn = 0; +++ state->nsaa = 0; +++} +++ +++/* Return the number of available consecutive core argument +++ registers. */ +++ +++static unsigned +++available_x (struct arg_state *state) +++{ +++ return N_X_ARG_REG - state->ngrn; +++} +++ +++/* Return the number of available consecutive vector argument +++ registers. */ +++ +++static unsigned +++available_v (struct arg_state *state) +++{ +++ return N_V_ARG_REG - state->nsrn; +++} +++ +++static void * +++allocate_to_x (struct call_context *context, struct arg_state *state) +++{ +++ FFI_ASSERT (state->ngrn < N_X_ARG_REG) +++ return get_x_addr (context, (state->ngrn)++); +++} +++ +++static void * +++allocate_to_s (struct call_context *context, struct arg_state *state) +++{ +++ FFI_ASSERT (state->nsrn < N_V_ARG_REG) +++ return get_s_addr (context, (state->nsrn)++); +++} +++ +++static void * +++allocate_to_d (struct call_context *context, struct arg_state *state) +++{ +++ FFI_ASSERT (state->nsrn < N_V_ARG_REG) +++ return get_d_addr (context, (state->nsrn)++); +++} +++ +++static void * +++allocate_to_v (struct call_context *context, struct arg_state *state) +++{ +++ FFI_ASSERT (state->nsrn < N_V_ARG_REG) +++ return get_v_addr (context, (state->nsrn)++); +++} +++ +++/* Allocate an aligned slot on the stack and return a pointer to it. */ +++static void * +++allocate_to_stack (struct arg_state *state, void *stack, unsigned alignment, +++ unsigned size) +++{ +++ void *allocation; +++ +++ /* Round up the NSAA to the larger of 8 or the natural +++ alignment of the argument's type. */ +++ state->nsaa = ALIGN (state->nsaa, alignment); +++ state->nsaa = ALIGN (state->nsaa, alignment); +++ state->nsaa = ALIGN (state->nsaa, 8); +++ +++ allocation = stack + state->nsaa; +++ +++ state->nsaa += size; +++ return allocation; +++} +++ +++static void +++copy_basic_type (void *dest, void *source, unsigned short type) +++{ +++ /* This is neccessary to ensure that basic types are copied +++ sign extended to 64-bits as libffi expects. */ +++ switch (type) +++ { +++ case FFI_TYPE_FLOAT: +++ *(float *) dest = *(float *) source; +++ break; +++ case FFI_TYPE_DOUBLE: +++ *(double *) dest = *(double *) source; +++ break; +++ case FFI_TYPE_LONGDOUBLE: +++ *(long double *) dest = *(long double *) source; +++ break; +++ case FFI_TYPE_UINT8: +++ *(ffi_arg *) dest = *(UINT8 *) source; +++ break; +++ case FFI_TYPE_SINT8: +++ *(ffi_sarg *) dest = *(SINT8 *) source; +++ break; +++ case FFI_TYPE_UINT16: +++ *(ffi_arg *) dest = *(UINT16 *) source; +++ break; +++ case FFI_TYPE_SINT16: +++ *(ffi_sarg *) dest = *(SINT16 *) source; +++ break; +++ case FFI_TYPE_UINT32: +++ *(ffi_arg *) dest = *(UINT32 *) source; +++ break; +++ case FFI_TYPE_INT: +++ case FFI_TYPE_SINT32: +++ *(ffi_sarg *) dest = *(SINT32 *) source; +++ break; +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_UINT64: +++ *(ffi_arg *) dest = *(UINT64 *) source; +++ break; +++ case FFI_TYPE_SINT64: +++ *(ffi_sarg *) dest = *(SINT64 *) source; +++ break; +++ +++ default: +++ FFI_ASSERT (0); +++ } +++} +++ +++static void +++copy_hfa_to_reg_or_stack (void *memory, +++ ffi_type *ty, +++ struct call_context *context, +++ unsigned char *stack, +++ struct arg_state *state) +++{ +++ unsigned elems = element_count (ty); +++ if (available_v (state) < elems) +++ { +++ /* There are insufficient V registers. Further V register allocations +++ are prevented, the NSAA is adjusted (by allocate_to_stack ()) +++ and the argument is copied to memory at the adjusted NSAA. */ +++ state->nsrn = N_V_ARG_REG; +++ memcpy (allocate_to_stack (state, stack, ty->alignment, ty->size), +++ memory, +++ ty->size); +++ } +++ else +++ { +++ int i; +++ unsigned short type = get_homogeneous_type (ty); +++ unsigned elems = element_count (ty); +++ for (i = 0; i < elems; i++) +++ { +++ void *reg = allocate_to_v (context, state); +++ copy_basic_type (reg, memory, type); +++ memory += get_basic_type_size (type); +++ } +++ } +++} +++ +++/* Either allocate an appropriate register for the argument type, or if +++ none are available, allocate a stack slot and return a pointer +++ to the allocated space. */ +++ +++static void * +++allocate_to_register_or_stack (struct call_context *context, +++ unsigned char *stack, +++ struct arg_state *state, +++ unsigned short type) +++{ +++ size_t alignment = get_basic_type_alignment (type); +++ size_t size = alignment; +++ switch (type) +++ { +++ case FFI_TYPE_FLOAT: +++ /* This is the only case for which the allocated stack size +++ should not match the alignment of the type. */ +++ size = sizeof (UINT32); +++ /* Fall through. */ +++ case FFI_TYPE_DOUBLE: +++ if (state->nsrn < N_V_ARG_REG) +++ return allocate_to_d (context, state); +++ state->nsrn = N_V_ARG_REG; +++ break; +++ case FFI_TYPE_LONGDOUBLE: +++ if (state->nsrn < N_V_ARG_REG) +++ return allocate_to_v (context, state); +++ state->nsrn = N_V_ARG_REG; +++ break; +++ case FFI_TYPE_UINT8: +++ case FFI_TYPE_SINT8: +++ case FFI_TYPE_UINT16: +++ case FFI_TYPE_SINT16: +++ case FFI_TYPE_UINT32: +++ case FFI_TYPE_SINT32: +++ case FFI_TYPE_INT: +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_UINT64: +++ case FFI_TYPE_SINT64: +++ if (state->ngrn < N_X_ARG_REG) +++ return allocate_to_x (context, state); +++ state->ngrn = N_X_ARG_REG; +++ break; +++ default: +++ FFI_ASSERT (0); +++ } +++ +++ return allocate_to_stack (state, stack, alignment, size); +++} +++ +++/* Copy a value to an appropriate register, or if none are +++ available, to the stack. */ +++ +++static void +++copy_to_register_or_stack (struct call_context *context, +++ unsigned char *stack, +++ struct arg_state *state, +++ void *value, +++ unsigned short type) +++{ +++ copy_basic_type ( +++ allocate_to_register_or_stack (context, stack, state, type), +++ value, +++ type); +++} +++ +++/* Marshall the arguments from FFI representation to procedure call +++ context and stack. */ +++ +++static unsigned +++aarch64_prep_args (struct call_context *context, unsigned char *stack, +++ extended_cif *ecif) +++{ +++ int i; +++ struct arg_state state; +++ +++ arg_init (&state, ALIGN(ecif->cif->bytes, 16)); +++ +++ for (i = 0; i < ecif->cif->nargs; i++) +++ { +++ ffi_type *ty = ecif->cif->arg_types[i]; +++ switch (ty->type) +++ { +++ case FFI_TYPE_VOID: +++ FFI_ASSERT (0); +++ break; +++ +++ /* If the argument is a basic type the argument is allocated to an +++ appropriate register, or if none are available, to the stack. */ +++ case FFI_TYPE_FLOAT: +++ case FFI_TYPE_DOUBLE: +++ case FFI_TYPE_LONGDOUBLE: +++ case FFI_TYPE_UINT8: +++ case FFI_TYPE_SINT8: +++ case FFI_TYPE_UINT16: +++ case FFI_TYPE_SINT16: +++ case FFI_TYPE_UINT32: +++ case FFI_TYPE_INT: +++ case FFI_TYPE_SINT32: +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_UINT64: +++ case FFI_TYPE_SINT64: +++ copy_to_register_or_stack (context, stack, &state, +++ ecif->avalue[i], ty->type); +++ break; +++ +++ case FFI_TYPE_STRUCT: +++ if (is_hfa (ty)) +++ { +++ copy_hfa_to_reg_or_stack (ecif->avalue[i], ty, context, +++ stack, &state); +++ } +++ else if (ty->size > 16) +++ { +++ /* If the argument is a composite type that is larger than 16 +++ bytes, then the argument has been copied to memory, and +++ the argument is replaced by a pointer to the copy. */ +++ +++ copy_to_register_or_stack (context, stack, &state, +++ &(ecif->avalue[i]), FFI_TYPE_POINTER); +++ } +++ else if (available_x (&state) >= (ty->size + 7) / 8) +++ { +++ /* If the argument is a composite type and the size in +++ double-words is not more than the number of available +++ X registers, then the argument is copied into consecutive +++ X registers. */ +++ int j; +++ for (j = 0; j < (ty->size + 7) / 8; j++) +++ { +++ memcpy (allocate_to_x (context, &state), +++ &(((UINT64 *) ecif->avalue[i])[j]), +++ sizeof (UINT64)); +++ } +++ } +++ else +++ { +++ /* Otherwise, there are insufficient X registers. Further X +++ register allocations are prevented, the NSAA is adjusted +++ (by allocate_to_stack ()) and the argument is copied to +++ memory at the adjusted NSAA. */ +++ state.ngrn = N_X_ARG_REG; +++ +++ memcpy (allocate_to_stack (&state, stack, ty->alignment, +++ ty->size), ecif->avalue + i, ty->size); +++ } +++ break; +++ +++ default: +++ FFI_ASSERT (0); +++ break; +++ } +++ } +++ +++ return ecif->cif->aarch64_flags; +++} +++ +++ffi_status +++ffi_prep_cif_machdep (ffi_cif *cif) +++{ +++ /* Round the stack up to a multiple of the stack alignment requirement. */ +++ cif->bytes = +++ (cif->bytes + (AARCH64_STACK_ALIGN - 1)) & ~ (AARCH64_STACK_ALIGN - 1); +++ +++ /* Initialize our flags. We are interested if this CIF will touch a +++ vector register, if so we will enable context save and load to +++ those registers, otherwise not. This is intended to be friendly +++ to lazy float context switching in the kernel. */ +++ cif->aarch64_flags = 0; +++ +++ if (is_v_register_candidate (cif->rtype)) +++ { +++ cif->aarch64_flags |= AARCH64_FFI_WITH_V; +++ } +++ else +++ { +++ int i; +++ for (i = 0; i < cif->nargs; i++) +++ if (is_v_register_candidate (cif->arg_types[i])) +++ { +++ cif->aarch64_flags |= AARCH64_FFI_WITH_V; +++ break; +++ } +++ } +++ +++ return FFI_OK; +++} +++ +++/* Call a function with the provided arguments and capture the return +++ value. */ +++void +++ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) +++{ +++ extended_cif ecif; +++ +++ ecif.cif = cif; +++ ecif.avalue = avalue; +++ ecif.rvalue = rvalue; +++ +++ switch (cif->abi) +++ { +++ case FFI_SYSV: +++ { +++ struct call_context context; +++ unsigned stack_bytes; +++ +++ /* Figure out the total amount of stack space we need, the +++ above call frame space needs to be 16 bytes aligned to +++ ensure correct alignment of the first object inserted in +++ that space hence the ALIGN applied to cif->bytes.*/ +++ stack_bytes = ALIGN(cif->bytes, 16); +++ +++ memset (&context, 0, sizeof (context)); +++ if (is_register_candidate (cif->rtype)) +++ { +++ ffi_call_SYSV (aarch64_prep_args, &context, &ecif, stack_bytes, fn); +++ switch (cif->rtype->type) +++ { +++ case FFI_TYPE_VOID: +++ case FFI_TYPE_FLOAT: +++ case FFI_TYPE_DOUBLE: +++ case FFI_TYPE_LONGDOUBLE: +++ case FFI_TYPE_UINT8: +++ case FFI_TYPE_SINT8: +++ case FFI_TYPE_UINT16: +++ case FFI_TYPE_SINT16: +++ case FFI_TYPE_UINT32: +++ case FFI_TYPE_SINT32: +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_UINT64: +++ case FFI_TYPE_INT: +++ case FFI_TYPE_SINT64: +++ { +++ void *addr = get_basic_type_addr (cif->rtype->type, +++ &context, 0); +++ copy_basic_type (rvalue, addr, cif->rtype->type); +++ break; +++ } +++ +++ case FFI_TYPE_STRUCT: +++ if (is_hfa (cif->rtype)) +++ { +++ int j; +++ unsigned short type = get_homogeneous_type (cif->rtype); +++ unsigned elems = element_count (cif->rtype); +++ for (j = 0; j < elems; j++) +++ { +++ void *reg = get_basic_type_addr (type, &context, j); +++ copy_basic_type (rvalue, reg, type); +++ rvalue += get_basic_type_size (type); +++ } +++ } +++ else if ((cif->rtype->size + 7) / 8 < N_X_ARG_REG) +++ { +++ unsigned size = ALIGN (cif->rtype->size, sizeof (UINT64)); +++ memcpy (rvalue, get_x_addr (&context, 0), size); +++ } +++ else +++ { +++ FFI_ASSERT (0); +++ } +++ break; +++ +++ default: +++ FFI_ASSERT (0); +++ break; +++ } +++ } +++ else +++ { +++ memcpy (get_x_addr (&context, 8), &rvalue, sizeof (UINT64)); +++ ffi_call_SYSV (aarch64_prep_args, &context, &ecif, +++ stack_bytes, fn); +++ } +++ break; +++ } +++ +++ default: +++ FFI_ASSERT (0); +++ break; +++ } +++} +++ +++static unsigned char trampoline [] = +++{ 0x70, 0x00, 0x00, 0x58, /* ldr x16, 1f */ +++ 0x91, 0x00, 0x00, 0x10, /* adr x17, 2f */ +++ 0x00, 0x02, 0x1f, 0xd6 /* br x16 */ +++}; +++ +++/* Build a trampoline. */ +++ +++#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX,FLAGS) \ +++ ({unsigned char *__tramp = (unsigned char*)(TRAMP); \ +++ UINT64 __fun = (UINT64)(FUN); \ +++ UINT64 __ctx = (UINT64)(CTX); \ +++ UINT64 __flags = (UINT64)(FLAGS); \ +++ memcpy (__tramp, trampoline, sizeof (trampoline)); \ +++ memcpy (__tramp + 12, &__fun, sizeof (__fun)); \ +++ memcpy (__tramp + 20, &__ctx, sizeof (__ctx)); \ +++ memcpy (__tramp + 28, &__flags, sizeof (__flags)); \ +++ __clear_cache(__tramp, __tramp + FFI_TRAMPOLINE_SIZE); \ +++ }) +++ +++ffi_status +++ffi_prep_closure_loc (ffi_closure* closure, +++ ffi_cif* cif, +++ void (*fun)(ffi_cif*,void*,void**,void*), +++ void *user_data, +++ void *codeloc) +++{ +++ if (cif->abi != FFI_SYSV) +++ return FFI_BAD_ABI; +++ +++ FFI_INIT_TRAMPOLINE (&closure->tramp[0], &ffi_closure_SYSV, codeloc, +++ cif->aarch64_flags); +++ +++ closure->cif = cif; +++ closure->user_data = user_data; +++ closure->fun = fun; +++ +++ return FFI_OK; +++} +++ +++/* Primary handler to setup and invoke a function within a closure. +++ +++ A closure when invoked enters via the assembler wrapper +++ ffi_closure_SYSV(). The wrapper allocates a call context on the +++ stack, saves the interesting registers (from the perspective of +++ the calling convention) into the context then passes control to +++ ffi_closure_SYSV_inner() passing the saved context and a pointer to +++ the stack at the point ffi_closure_SYSV() was invoked. +++ +++ On the return path the assembler wrapper will reload call context +++ regsiters. +++ +++ ffi_closure_SYSV_inner() marshalls the call context into ffi value +++ desriptors, invokes the wrapped function, then marshalls the return +++ value back into the call context. */ +++ +++void +++ffi_closure_SYSV_inner (ffi_closure *closure, struct call_context *context, +++ void *stack) +++{ +++ ffi_cif *cif = closure->cif; +++ void **avalue = (void**) alloca (cif->nargs * sizeof (void*)); +++ void *rvalue = NULL; +++ int i; +++ struct arg_state state; +++ +++ arg_init (&state, ALIGN(cif->bytes, 16)); +++ +++ for (i = 0; i < cif->nargs; i++) +++ { +++ ffi_type *ty = cif->arg_types[i]; +++ +++ switch (ty->type) +++ { +++ case FFI_TYPE_VOID: +++ FFI_ASSERT (0); +++ break; +++ +++ case FFI_TYPE_UINT8: +++ case FFI_TYPE_SINT8: +++ case FFI_TYPE_UINT16: +++ case FFI_TYPE_SINT16: +++ case FFI_TYPE_UINT32: +++ case FFI_TYPE_SINT32: +++ case FFI_TYPE_INT: +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_UINT64: +++ case FFI_TYPE_SINT64: +++ case FFI_TYPE_FLOAT: +++ case FFI_TYPE_DOUBLE: +++ case FFI_TYPE_LONGDOUBLE: +++ avalue[i] = allocate_to_register_or_stack (context, stack, +++ &state, ty->type); +++ break; +++ +++ case FFI_TYPE_STRUCT: +++ if (is_hfa (ty)) +++ { +++ unsigned n = element_count (ty); +++ if (available_v (&state) < n) +++ { +++ state.nsrn = N_V_ARG_REG; +++ avalue[i] = allocate_to_stack (&state, stack, ty->alignment, +++ ty->size); +++ } +++ else +++ { +++ switch (get_homogeneous_type (ty)) +++ { +++ case FFI_TYPE_FLOAT: +++ { +++ /* Eeek! We need a pointer to the structure, +++ however the homogeneous float elements are +++ being passed in individual S registers, +++ therefore the structure is not represented as +++ a contiguous sequence of bytes in our saved +++ register context. We need to fake up a copy +++ of the structure layed out in memory +++ correctly. The fake can be tossed once the +++ closure function has returned hence alloca() +++ is sufficient. */ +++ int j; +++ UINT32 *p = avalue[i] = alloca (ty->size); +++ for (j = 0; j < element_count (ty); j++) +++ memcpy (&p[j], +++ allocate_to_s (context, &state), +++ sizeof (*p)); +++ break; +++ } +++ +++ case FFI_TYPE_DOUBLE: +++ { +++ /* Eeek! We need a pointer to the structure, +++ however the homogeneous float elements are +++ being passed in individual S registers, +++ therefore the structure is not represented as +++ a contiguous sequence of bytes in our saved +++ register context. We need to fake up a copy +++ of the structure layed out in memory +++ correctly. The fake can be tossed once the +++ closure function has returned hence alloca() +++ is sufficient. */ +++ int j; +++ UINT64 *p = avalue[i] = alloca (ty->size); +++ for (j = 0; j < element_count (ty); j++) +++ memcpy (&p[j], +++ allocate_to_d (context, &state), +++ sizeof (*p)); +++ break; +++ } +++ +++ case FFI_TYPE_LONGDOUBLE: +++ memcpy (&avalue[i], +++ allocate_to_v (context, &state), +++ sizeof (*avalue)); +++ break; +++ +++ default: +++ FFI_ASSERT (0); +++ break; +++ } +++ } +++ } +++ else if (ty->size > 16) +++ { +++ /* Replace Composite type of size greater than 16 with a +++ pointer. */ +++ memcpy (&avalue[i], +++ allocate_to_register_or_stack (context, stack, +++ &state, FFI_TYPE_POINTER), +++ sizeof (avalue[i])); +++ } +++ else if (available_x (&state) >= (ty->size + 7) / 8) +++ { +++ avalue[i] = get_x_addr (context, state.ngrn); +++ state.ngrn += (ty->size + 7) / 8; +++ } +++ else +++ { +++ state.ngrn = N_X_ARG_REG; +++ +++ avalue[i] = allocate_to_stack (&state, stack, ty->alignment, +++ ty->size); +++ } +++ break; +++ +++ default: +++ FFI_ASSERT (0); +++ break; +++ } +++ } +++ +++ /* Figure out where the return value will be passed, either in +++ registers or in a memory block allocated by the caller and passed +++ in x8. */ +++ +++ if (is_register_candidate (cif->rtype)) +++ { +++ /* Register candidates are *always* returned in registers. */ +++ +++ /* Allocate a scratchpad for the return value, we will let the +++ callee scrible the result into the scratch pad then move the +++ contents into the appropriate return value location for the +++ call convention. */ +++ rvalue = alloca (cif->rtype->size); +++ (closure->fun) (cif, rvalue, avalue, closure->user_data); +++ +++ /* Copy the return value into the call context so that it is returned +++ as expected to our caller. */ +++ switch (cif->rtype->type) +++ { +++ case FFI_TYPE_VOID: +++ break; +++ +++ case FFI_TYPE_UINT8: +++ case FFI_TYPE_UINT16: +++ case FFI_TYPE_UINT32: +++ case FFI_TYPE_POINTER: +++ case FFI_TYPE_UINT64: +++ case FFI_TYPE_SINT8: +++ case FFI_TYPE_SINT16: +++ case FFI_TYPE_INT: +++ case FFI_TYPE_SINT32: +++ case FFI_TYPE_SINT64: +++ case FFI_TYPE_FLOAT: +++ case FFI_TYPE_DOUBLE: +++ case FFI_TYPE_LONGDOUBLE: +++ { +++ void *addr = get_basic_type_addr (cif->rtype->type, context, 0); +++ copy_basic_type (addr, rvalue, cif->rtype->type); +++ break; +++ } +++ case FFI_TYPE_STRUCT: +++ if (is_hfa (cif->rtype)) +++ { +++ int i; +++ unsigned short type = get_homogeneous_type (cif->rtype); +++ unsigned elems = element_count (cif->rtype); +++ for (i = 0; i < elems; i++) +++ { +++ void *reg = get_basic_type_addr (type, context, i); +++ copy_basic_type (reg, rvalue, type); +++ rvalue += get_basic_type_size (type); +++ } +++ } +++ else if ((cif->rtype->size + 7) / 8 < N_X_ARG_REG) +++ { +++ unsigned size = ALIGN (cif->rtype->size, sizeof (UINT64)) ; +++ memcpy (get_x_addr (context, 0), rvalue, size); +++ } +++ else +++ { +++ FFI_ASSERT (0); +++ } +++ break; +++ default: +++ FFI_ASSERT (0); +++ break; +++ } +++ } +++ else +++ { +++ memcpy (&rvalue, get_x_addr (context, 8), sizeof (UINT64)); +++ (closure->fun) (cif, rvalue, avalue, closure->user_data); +++ } +++} +++ ++Index: b/src/aarch64/ffitarget.h ++=================================================================== ++--- /dev/null +++++ b/src/aarch64/ffitarget.h ++@@ -0,0 +1,59 @@ +++/* Copyright (c) 2009, 2010, 2011, 2012 ARM Ltd. +++ +++Permission is hereby granted, free of charge, to any person obtaining +++a copy of this software and associated documentation files (the +++``Software''), to deal in 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: +++ +++The above copyright notice and this permission notice shall be +++included in all copies or substantial portions of the Software. +++ +++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 AUTHORS 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 IN THE SOFTWARE. */ +++ +++#ifndef LIBFFI_TARGET_H +++#define LIBFFI_TARGET_H +++ +++#ifndef LIBFFI_H +++#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." +++#endif +++ +++#ifndef LIBFFI_ASM +++typedef unsigned long ffi_arg; +++typedef signed long ffi_sarg; +++ +++typedef enum ffi_abi +++ { +++ FFI_FIRST_ABI = 0, +++ FFI_SYSV, +++ FFI_LAST_ABI, +++ FFI_DEFAULT_ABI = FFI_SYSV +++ } ffi_abi; +++#endif +++ +++/* ---- Definitions for closures ----------------------------------------- */ +++ +++#define FFI_CLOSURES 1 +++#define FFI_TRAMPOLINE_SIZE 36 +++#define FFI_NATIVE_RAW_API 0 +++ +++/* ---- Internal ---- */ +++ +++ +++#define FFI_EXTRA_CIF_FIELDS unsigned aarch64_flags +++ +++#define AARCH64_FFI_WITH_V_BIT 0 +++ +++#define AARCH64_N_XREG 32 +++#define AARCH64_N_VREG 32 +++#define AARCH64_CALL_CONTEXT_SIZE (AARCH64_N_XREG * 8 + AARCH64_N_VREG * 16) +++ +++#endif ++Index: b/src/aarch64/sysv.S ++=================================================================== ++--- /dev/null +++++ b/src/aarch64/sysv.S ++@@ -0,0 +1,307 @@ +++/* Copyright (c) 2009, 2010, 2011, 2012 ARM Ltd. +++ +++Permission is hereby granted, free of charge, to any person obtaining +++a copy of this software and associated documentation files (the +++``Software''), to deal in 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: +++ +++The above copyright notice and this permission notice shall be +++included in all copies or substantial portions of the Software. +++ +++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 AUTHORS 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 IN THE SOFTWARE. */ +++ +++#define LIBFFI_ASM +++#include +++#include +++ +++#define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off +++#define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off +++#define cfi_restore(reg) .cfi_restore reg +++#define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg +++ +++ .text +++ .globl ffi_call_SYSV +++ .type ffi_call_SYSV, #function +++ +++/* ffi_call_SYSV() +++ +++ Create a stack frame, setup an argument context, call the callee +++ and extract the result. +++ +++ The maximum required argument stack size is provided, +++ ffi_call_SYSV() allocates that stack space then calls the +++ prepare_fn to populate register context and stack. The +++ argument passing registers are loaded from the register +++ context and the callee called, on return the register passing +++ register are saved back to the context. Our caller will +++ extract the return value from the final state of the saved +++ register context. +++ +++ Prototype: +++ +++ extern unsigned +++ ffi_call_SYSV (void (*)(struct call_context *context, unsigned char *, +++ extended_cif *), +++ struct call_context *context, +++ extended_cif *, +++ unsigned required_stack_size, +++ void (*fn)(void)); +++ +++ Therefore on entry we have: +++ +++ x0 prepare_fn +++ x1 &context +++ x2 &ecif +++ x3 bytes +++ x4 fn +++ +++ This function uses the following stack frame layout: +++ +++ == +++ saved x30(lr) +++ x29(fp)-> saved x29(fp) +++ saved x24 +++ saved x23 +++ saved x22 +++ sp' -> saved x21 +++ ... +++ sp -> (constructed callee stack arguments) +++ == +++ +++ Voila! */ +++ +++#define ffi_call_SYSV_FS (8 * 4) +++ +++ .cfi_startproc +++ffi_call_SYSV: +++ stp x29, x30, [sp, #-16]! +++ cfi_adjust_cfa_offset (16) +++ cfi_rel_offset (x29, 0) +++ cfi_rel_offset (x30, 8) +++ +++ mov x29, sp +++ cfi_def_cfa_register (x29) +++ sub sp, sp, #ffi_call_SYSV_FS +++ +++ stp x21, x22, [sp, 0] +++ cfi_rel_offset (x21, 0 - ffi_call_SYSV_FS) +++ cfi_rel_offset (x22, 8 - ffi_call_SYSV_FS) +++ +++ stp x23, x24, [sp, 16] +++ cfi_rel_offset (x23, 16 - ffi_call_SYSV_FS) +++ cfi_rel_offset (x24, 24 - ffi_call_SYSV_FS) +++ +++ mov x21, x1 +++ mov x22, x2 +++ mov x24, x4 +++ +++ /* Allocate the stack space for the actual arguments, many +++ arguments will be passed in registers, but we assume +++ worst case and allocate sufficient stack for ALL of +++ the arguments. */ +++ sub sp, sp, x3 +++ +++ /* unsigned (*prepare_fn) (struct call_context *context, +++ unsigned char *stack, extended_cif *ecif); +++ */ +++ mov x23, x0 +++ mov x0, x1 +++ mov x1, sp +++ /* x2 already in place */ +++ blr x23 +++ +++ /* Preserve the flags returned. */ +++ mov x23, x0 +++ +++ /* Figure out if we should touch the vector registers. */ +++ tbz x23, #AARCH64_FFI_WITH_V_BIT, 1f +++ +++ /* Load the vector argument passing registers. */ +++ ldp q0, q1, [x21, #8*32 + 0] +++ ldp q2, q3, [x21, #8*32 + 32] +++ ldp q4, q5, [x21, #8*32 + 64] +++ ldp q6, q7, [x21, #8*32 + 96] +++1: +++ /* Load the core argument passing registers. */ +++ ldp x0, x1, [x21, #0] +++ ldp x2, x3, [x21, #16] +++ ldp x4, x5, [x21, #32] +++ ldp x6, x7, [x21, #48] +++ +++ /* Don't forget x8 which may be holding the address of a return buffer. +++ */ +++ ldr x8, [x21, #8*8] +++ +++ blr x24 +++ +++ /* Save the core argument passing registers. */ +++ stp x0, x1, [x21, #0] +++ stp x2, x3, [x21, #16] +++ stp x4, x5, [x21, #32] +++ stp x6, x7, [x21, #48] +++ +++ /* Note nothing useful ever comes back in x8! */ +++ +++ /* Figure out if we should touch the vector registers. */ +++ tbz x23, #AARCH64_FFI_WITH_V_BIT, 1f +++ +++ /* Save the vector argument passing registers. */ +++ stp q0, q1, [x21, #8*32 + 0] +++ stp q2, q3, [x21, #8*32 + 32] +++ stp q4, q5, [x21, #8*32 + 64] +++ stp q6, q7, [x21, #8*32 + 96] +++1: +++ /* All done, unwind our stack frame. */ +++ ldp x21, x22, [x29, # - ffi_call_SYSV_FS] +++ cfi_restore (x21) +++ cfi_restore (x22) +++ +++ ldp x23, x24, [x29, # - ffi_call_SYSV_FS + 16] +++ cfi_restore (x23) +++ cfi_restore (x24) +++ +++ mov sp, x29 +++ cfi_def_cfa_register (sp) +++ +++ ldp x29, x30, [sp], #16 +++ cfi_adjust_cfa_offset (-16) +++ cfi_restore (x29) +++ cfi_restore (x30) +++ +++ ret +++ +++ .cfi_endproc +++ .size ffi_call_SYSV, .-ffi_call_SYSV +++ +++#define ffi_closure_SYSV_FS (8 * 2 + AARCH64_CALL_CONTEXT_SIZE) +++ +++/* ffi_closure_SYSV +++ +++ Closure invocation glue. This is the low level code invoked directly by +++ the closure trampoline to setup and call a closure. +++ +++ On entry x17 points to a struct trampoline_data, x16 has been clobbered +++ all other registers are preserved. +++ +++ We allocate a call context and save the argument passing registers, +++ then invoked the generic C ffi_closure_SYSV_inner() function to do all +++ the real work, on return we load the result passing registers back from +++ the call context. +++ +++ On entry +++ +++ extern void +++ ffi_closure_SYSV (struct trampoline_data *); +++ +++ struct trampoline_data +++ { +++ UINT64 *ffi_closure; +++ UINT64 flags; +++ }; +++ +++ This function uses the following stack frame layout: +++ +++ == +++ saved x30(lr) +++ x29(fp)-> saved x29(fp) +++ saved x22 +++ saved x21 +++ ... +++ sp -> call_context +++ == +++ +++ Voila! */ +++ +++ .text +++ .globl ffi_closure_SYSV +++ .cfi_startproc +++ffi_closure_SYSV: +++ stp x29, x30, [sp, #-16]! +++ cfi_adjust_cfa_offset (16) +++ cfi_rel_offset (x29, 0) +++ cfi_rel_offset (x30, 8) +++ +++ mov x29, sp +++ +++ sub sp, sp, #ffi_closure_SYSV_FS +++ cfi_adjust_cfa_offset (ffi_closure_SYSV_FS) +++ +++ stp x21, x22, [x29, #-16] +++ cfi_rel_offset (x21, 0) +++ cfi_rel_offset (x22, 8) +++ +++ /* Load x21 with &call_context. */ +++ mov x21, sp +++ /* Preserve our struct trampoline_data * */ +++ mov x22, x17 +++ +++ /* Save the rest of the argument passing registers. */ +++ stp x0, x1, [x21, #0] +++ stp x2, x3, [x21, #16] +++ stp x4, x5, [x21, #32] +++ stp x6, x7, [x21, #48] +++ /* Don't forget we may have been given a result scratch pad address. +++ */ +++ str x8, [x21, #64] +++ +++ /* Figure out if we should touch the vector registers. */ +++ ldr x0, [x22, #8] +++ tbz x0, #AARCH64_FFI_WITH_V_BIT, 1f +++ +++ /* Save the argument passing vector registers. */ +++ stp q0, q1, [x21, #8*32 + 0] +++ stp q2, q3, [x21, #8*32 + 32] +++ stp q4, q5, [x21, #8*32 + 64] +++ stp q6, q7, [x21, #8*32 + 96] +++1: +++ /* Load &ffi_closure.. */ +++ ldr x0, [x22, #0] +++ mov x1, x21 +++ /* Compute the location of the stack at the point that the +++ trampoline was called. */ +++ add x2, x29, #16 +++ +++ bl ffi_closure_SYSV_inner +++ +++ /* Figure out if we should touch the vector registers. */ +++ ldr x0, [x22, #8] +++ tbz x0, #AARCH64_FFI_WITH_V_BIT, 1f +++ +++ /* Load the result passing vector registers. */ +++ ldp q0, q1, [x21, #8*32 + 0] +++ ldp q2, q3, [x21, #8*32 + 32] +++ ldp q4, q5, [x21, #8*32 + 64] +++ ldp q6, q7, [x21, #8*32 + 96] +++1: +++ /* Load the result passing core registers. */ +++ ldp x0, x1, [x21, #0] +++ ldp x2, x3, [x21, #16] +++ ldp x4, x5, [x21, #32] +++ ldp x6, x7, [x21, #48] +++ /* Note nothing usefull is returned in x8. */ +++ +++ /* We are done, unwind our frame. */ +++ ldp x21, x22, [x29, #-16] +++ cfi_restore (x21) +++ cfi_restore (x22) +++ +++ mov sp, x29 +++ cfi_adjust_cfa_offset (-ffi_closure_SYSV_FS) +++ +++ ldp x29, x30, [sp], #16 +++ cfi_adjust_cfa_offset (-16) +++ cfi_restore (x29) +++ cfi_restore (x30) +++ +++ ret +++ .cfi_endproc +++ .size ffi_closure_SYSV, .-ffi_closure_SYSV +Index: b/libffi/ghc.mk +=================================================================== +--- a/libffi/ghc.mk ++++ b/libffi/ghc.mk +@@ -53,6 +53,8 @@ + $(call removeTrees,$(LIBFFI_DIR) libffi/build) + cat ghc-tarballs/libffi/libffi*.tar.gz | $(GZIP_CMD) -d | { cd libffi && $(TAR_CMD) -xf - ; } + mv libffi/libffi-* libffi/build ++ patch -d libffi/build -p1 +Origin: https://github.com/haskell/cabal/commit/dd691fa6791d67981388ec044b28343879d8c2b1 +diff --git a/libraries/Cabal/Cabal/Distribution/Simple/PreProcess.hs b/libraries/Cabal/Cabal/Distribution/Simple/PreProcess.hs +index 0c6cb3e..ad9df9f 100644 +--- a/libraries/Cabal/Cabal/Distribution/Simple/PreProcess.hs ++++ b/libraries/Cabal/Cabal/Distribution/Simple/PreProcess.hs +@@ -232,7 +232,7 @@ preprocessComponent pd comp lbi isSrcDist verbosity handlers = case comp of + preProcessComponent bi modules exePath dir = do + let biHandlers = localHandlers bi + sourceDirs = hsSourceDirs bi ++ [ autogenModulesDir lbi ] +- sequence_ [ preprocessFile sourceDirs (buildDir lbi) isSrcDist ++ sequence_ [ preprocessFile sourceDirs dir isSrcDist + (ModuleName.toFilePath modu) verbosity builtinSuffixes + biHandlers + | modu <- modules ] diff --git a/patches/ghc-ignore-ANN-annotation.patch b/patches/ghc-ignore-ANN-annotation.patch new file mode 100644 index 00000000..98909b05 --- /dev/null +++ b/patches/ghc-ignore-ANN-annotation.patch @@ -0,0 +1,35 @@ +diff -uNr ghc-7.6.3.orig/compiler/typecheck/TcAnnotations.lhs ghc-7.6.3/compiler/typecheck/TcAnnotations.lhs +--- ghc-7.6.3.orig/compiler/typecheck/TcAnnotations.lhs 2013-04-18 21:22:46.000000000 +0000 ++++ ghc-7.6.3/compiler/typecheck/TcAnnotations.lhs 2014-06-26 08:23:10.000000000 +0000 +@@ -18,19 +16,26 @@ + import Module + import TcExpr + import {-# SOURCE #-} TcSplice ( runAnnotation ) +-import FastString + #endif ++ ++import FastString + \end{code} + + \begin{code} + tcAnnotations :: [LAnnDecl Name] -> TcM [Annotation] +-tcAnnotations = mapM tcAnnotation + +-tcAnnotation :: LAnnDecl Name -> TcM Annotation + #ifndef GHCI +--- TODO: modify lexer so ANN pragmas are parsed as comments in a stage1 compiler, so developers don't see this error +-tcAnnotation (L _ (HsAnnotation _ expr)) = pprPanic "Cant do annotations without GHCi" (ppr expr) ++-- No GHCI; emit a warning (not an error) and ignore. cf Trac #4268 ++tcAnnotations [] = return [] ++tcAnnotations anns@(L loc _ : _) ++ = do { setSrcSpan loc $ addWarnTc $ ++ (ptext (sLit "Ignoring ANN annotation") <> plural anns <> comma ++ <+> ptext (sLit "because this is a stage-1 compiler or doesn't support GHCi")) ++ ; return [] } + #else ++tcAnnotations = mapM tcAnnotation ++ ++tcAnnotation :: LAnnDecl Name -> TcM Annotation + tcAnnotation ann@(L loc (HsAnnotation provenance expr)) = do + -- Work out what the full target of this annotation was + mod <- getModule diff --git a/patches/haddock-hardcode-ghc-paths b/patches/haddock-hardcode-ghc-paths new file mode 100644 index 00000000..603b0b29 --- /dev/null +++ b/patches/haddock-hardcode-ghc-paths @@ -0,0 +1,53 @@ +Index: ghc-7.6.1.20121207/utils/haddock/haddock.cabal +=================================================================== +--- ghc-7.6.1.20121207.orig/utils/haddock/haddock.cabal 2012-12-11 23:38:48.259705093 +0100 ++++ ghc-7.6.1.20121207/utils/haddock/haddock.cabal 2012-12-11 23:38:54.615704866 +0100 +@@ -118,10 +118,6 @@ + + library + default-language: Haskell2010 +- -- In a GHC tree - in particular, in a source tarball - we don't +- -- require alex or happy +- if !flag(in-ghc-tree) +- build-tools: alex >= 2.3, happy >= 1.18 + build-depends: + base >= 4.3 && < 4.7, + filepath, +@@ -135,8 +131,6 @@ + + if flag(in-ghc-tree) + cpp-options: -DIN_GHC_TREE +- else +- build-depends: ghc-paths + + hs-source-dirs: src + if flag(dev) +Index: ghc-7.6.1.20121207/utils/haddock/src/Haddock.hs +=================================================================== +--- ghc-7.6.1.20121207.orig/utils/haddock/src/Haddock.hs 2012-12-11 23:38:45.183705205 +0100 ++++ ghc-7.6.1.20121207/utils/haddock/src/Haddock.hs 2012-12-11 23:38:54.615704866 +0100 +@@ -50,7 +50,6 @@ + #ifdef IN_GHC_TREE + import System.FilePath + #else +-import qualified GHC.Paths as GhcPaths + import Paths_haddock + #endif + +@@ -349,14 +348,14 @@ + libDir <- getInTreeDir + return (ghcPath, libDir) + #else +- return (ghcPath, GhcPaths.libdir) ++ return (ghcPath, "/usr/lib/ghc") + #endif + xs -> return (ghcPath, last xs) + where + #ifdef IN_GHC_TREE + ghcPath = "not available" + #else +- ghcPath = GhcPaths.ghc ++ ghcPath = "/usr/bin/ghc" + #endif + + diff --git a/patches/llvm-3.3-compat b/patches/llvm-3.3-compat new file mode 100644 index 00000000..178ab76e --- /dev/null +++ b/patches/llvm-3.3-compat @@ -0,0 +1,47 @@ +From: Geoffrey Mainland +Date: Wed, 12 Jun 2013 13:31:49 +0000 (+0100) +Subject: Avoid generating empty llvm.used definitions. +X-Git-Url: http://git.haskell.org/ghc.git/commitdiff_plain/db9b63105a54 + +Avoid generating empty llvm.used definitions. + +LLVM 3.3rc3 complains when the llvm.used global is an empty array, so don't +define llvm.used at all when it would be empty. +--- + +Index: ghc-7.6.3/compiler/llvmGen/LlvmCodeGen.hs +=================================================================== +--- ghc-7.6.3.orig/compiler/llvmGen/LlvmCodeGen.hs 2013-12-08 17:13:46.119975151 +0000 ++++ ghc-7.6.3/compiler/llvmGen/LlvmCodeGen.hs 2013-12-08 17:13:46.119975151 +0000 +@@ -112,19 +112,19 @@ + -> [[LlvmVar]] -- ^ info tables that need to be marked as 'used' + -> IO () + +-cmmProcLlvmGens _ _ _ _ [] _ [] +- = return () +- + cmmProcLlvmGens dflags h _ _ [] _ ivars +- = let ivars' = concat ivars +- cast x = LMBitc (LMStaticPointer (pVarLift x)) i8Ptr +- ty = (LMArray (length ivars') i8Ptr) +- usedArray = LMStaticArray (map cast ivars') ty +- lmUsed = (LMGlobalVar (fsLit "llvm.used") ty Appending +- (Just $ fsLit "llvm.metadata") Nothing False, Just usedArray) +- in Prt.bufLeftRender h $ {-# SCC "llvm_used_ppr" #-} +- withPprStyleDoc dflags (mkCodeStyle CStyle) $ +- pprLlvmData ([lmUsed], []) ++ | null ivars' = return () ++ | otherwise = Prt.bufLeftRender h $ ++ {-# SCC "llvm_used_ppr" #-} ++ withPprStyleDoc dflags (mkCodeStyle CStyle) $ ++ pprLlvmData ([lmUsed], []) ++ where ++ ivars' = concat ivars ++ cast x = LMBitc (LMStaticPointer (pVarLift x)) i8Ptr ++ ty = (LMArray (length ivars') i8Ptr) ++ usedArray = LMStaticArray (map cast ivars') ty ++ lmUsed = (LMGlobalVar (fsLit "llvm.used") ty Appending ++ (Just $ fsLit "llvm.metadata") Nothing False, Just usedArray) + + cmmProcLlvmGens dflags h us env ((CmmData _ _) : cmms) count ivars + = cmmProcLlvmGens dflags h us env cmms count ivars diff --git a/patches/no-missing-haddock-file-warning b/patches/no-missing-haddock-file-warning new file mode 100644 index 00000000..29384a73 --- /dev/null +++ b/patches/no-missing-haddock-file-warning @@ -0,0 +1,22 @@ +Description: Do not emit a warning if the .haddock file is missing + As it is quite common on Debian installations to install the -dev package + without the -doc package. +Author: Joachim Breitner + +Index: ghc-7.6.1/utils/ghc-pkg/Main.hs +=================================================================== +--- ghc-7.6.1.orig/utils/ghc-pkg/Main.hs 2012-09-04 19:10:15.000000000 +0200 ++++ ghc-7.6.1/utils/ghc-pkg/Main.hs 2012-10-08 13:13:25.447872995 +0200 +@@ -1362,8 +1362,10 @@ + mapM_ (checkDir True "library-dirs") (libraryDirs pkg) + mapM_ (checkDir True "include-dirs") (includeDirs pkg) + mapM_ (checkDir True "framework-dirs") (frameworkDirs pkg) +- mapM_ (checkFile True "haddock-interfaces") (haddockInterfaces pkg) +- mapM_ (checkDirURL True "haddock-html") (haddockHTMLs pkg) ++ -- In Debian, it is quite normal that the package is installed without the ++ -- documentation. Do not print a warning there. ++ -- mapM_ (checkFile True "haddock-interfaces") (haddockInterfaces pkg) ++ -- mapM_ (checkDirURL True "haddock-html") (haddockHTMLs pkg) + checkModules pkg + mapM_ (checkHSLib verbosity (libraryDirs pkg) auto_ghci_libs) (hsLibraries pkg) + -- ToDo: check these somehow? diff --git a/patches/ppc64el.patch b/patches/ppc64el.patch new file mode 100644 index 00000000..fed4404b --- /dev/null +++ b/patches/ppc64el.patch @@ -0,0 +1,41 @@ +Description: Add ppc64el support +Author: Colin Watson +Bug: https://ghc.haskell.org/trac/ghc/ticket/8965 +Last-Update: 2014-04-12 + +Index: b/aclocal.m4 +=================================================================== +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -173,7 +173,7 @@ + GET_ARM_ISA() + test -z "[$]2" || eval "[$]2=\"ArchARM {armISA = \$ARM_ISA, armISAExt = \$ARM_ISA_EXT, armABI = \$ARM_ABI}\"" + ;; +- aarch64|alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax) ++ aarch64|alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|powerpc64le|rs6000|s390|s390x|sparc64|vax) + test -z "[$]2" || eval "[$]2=ArchUnknown" + ;; + *) +@@ -1868,6 +1868,9 @@ + mips*) + $2="mips" + ;; ++ powerpc64le*) ++ $2="powerpc64le" ++ ;; + powerpc64*) + $2="powerpc64" + ;; +Index: b/includes/Stg.h +=================================================================== +--- a/includes/Stg.h ++++ b/includes/Stg.h +@@ -213,7 +213,7 @@ + #define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8)) + #define IF_(f) static StgFunPtr GNUC3_ATTRIBUTE(used) f(void) + #define FN_(f) StgFunPtr f(void) +-#define EF_(f) extern StgFunPtr f(void) ++#define EF_(f) extern StgFunPtr f() + + /* ----------------------------------------------------------------------------- + Tail calls diff --git a/patches/series b/patches/series new file mode 100644 index 00000000..17d6f9ac --- /dev/null +++ b/patches/series @@ -0,0 +1,12 @@ +ghc-ignore-ANN-annotation.patch +cabal-bug-1087.patch +system-libffi +haddock-hardcode-ghc-paths +use-debian-gen_contents_index +ARM-VFPv3D16 +no-missing-haddock-file-warning +Handle-sign-bit-when-generating-veneer-for-ARM-Thumb.patch +llvm-3.3-compat +64-bit-big-endian +arm64.patch +ppc64el.patch diff --git a/patches/system-libffi b/patches/system-libffi new file mode 100644 index 00000000..fb6d90ac --- /dev/null +++ b/patches/system-libffi @@ -0,0 +1,73 @@ +This patch could be replaced by a configure call if +http://hackage.haskell.org/trac/ghc/ticket/5743 were fixed. + +Index: ghc-7.6.1/rts/package.conf.in +=================================================================== +--- ghc-7.6.1.orig/rts/package.conf.in 2012-09-04 19:10:15.000000000 +0200 ++++ ghc-7.6.1/rts/package.conf.in 2012-10-08 13:06:55.167887121 +0200 +@@ -24,8 +24,9 @@ + hs-libraries: "HSrts" + + extra-libraries: ++ "ffi" + #ifdef HAVE_LIBM +- "m" /* for ldexp() */ ++ , "m" /* for ldexp() */ + #endif + #ifdef HAVE_LIBRT + , "rt" +Index: ghc-7.6.1/ghc.mk +=================================================================== +--- ghc-7.6.1.orig/ghc.mk 2012-09-04 19:10:15.000000000 +0200 ++++ ghc-7.6.1/ghc.mk 2012-10-08 13:06:55.171887120 +0200 +@@ -600,7 +600,6 @@ + $(MAYBE_GHCI) \ + driver/ghc \ + driver/haddock \ +- libffi \ + includes \ + rts + +Index: ghc-7.6.1/rts/ghc.mk +=================================================================== +--- ghc-7.6.1.orig/rts/ghc.mk 2012-09-04 19:10:15.000000000 +0200 ++++ ghc-7.6.1/rts/ghc.mk 2012-10-08 13:08:52.019882891 +0200 +@@ -177,12 +177,12 @@ + # Making a shared library for the RTS. + ifneq "$$(findstring dyn, $1)" "" + ifeq "$$(HostOS_CPP)" "mingw32" +-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/$$(LIBFFI_DLL) ++$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend + "$$(RM)" $$(RM_OPTS) $$@ + "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \ + -no-auto-link-packages -Lrts/dist/build -l$(LIBFFI_WINDOWS_LIB) `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@ + else +-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext) ++$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend + "$$(RM)" $$(RM_OPTS) $$@ + "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \ + -no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \ +@@ -193,9 +193,9 @@ + endif + endif + else +-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp) ++$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) + "$$(RM)" $$(RM_OPTS) $$@ +- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \ ++ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \ + $$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@ + endif + +@@ -509,10 +509,8 @@ + # installing + + INSTALL_LIBS += $(ALL_RTS_LIBS) +-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*) +-INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL)) + +-install: install_libffi_headers ++install: + + .PHONY: install_libffi_headers + install_libffi_headers : diff --git a/patches/use-debian-gen_contents_index b/patches/use-debian-gen_contents_index new file mode 100644 index 00000000..b8b2bc01 --- /dev/null +++ b/patches/use-debian-gen_contents_index @@ -0,0 +1,34 @@ +Index: ghc-7.6.3/ghc.mk +=================================================================== +--- ghc-7.6.3.orig/ghc.mk 2013-04-21 19:15:42.879976671 +0200 ++++ ghc-7.6.3/ghc.mk 2013-04-21 19:16:05.491975805 +0200 +@@ -701,7 +701,6 @@ + # Build the Haddock contents and index + ifeq "$(HADDOCK_DOCS)" "YES" + libraries/dist-haddock/index.html: inplace/bin/haddock$(exeext) $(ALL_HADDOCK_FILES) +- cd libraries && sh gen_contents_index --intree + ifeq "$(phase)" "final" + $(eval $(call all-target,library_doc_index,libraries/dist-haddock/index.html)) + endif +@@ -864,12 +863,8 @@ + $(call INSTALL_DIR,"$(DESTDIR)$(docdir)/html") + $(call INSTALL_DOC,$(INSTALL_OPTS),docs/index.html,"$(DESTDIR)$(docdir)/html") + ifneq "$(INSTALL_LIBRARY_DOCS)" "" +- $(call INSTALL_DIR,"$(DESTDIR)$(docdir)/html/libraries") +- for i in $(INSTALL_LIBRARY_DOCS); do \ +- $(call INSTALL_DOC,$(INSTALL_OPTS),$$i,"$(DESTDIR)$(docdir)/html/libraries/"); \ +- done ++ mkdir -p $(DESTDIR)$(docdir)/html/libraries/ + $(call INSTALL_DATA,$(INSTALL_OPTS),libraries/prologue.txt,"$(DESTDIR)$(docdir)/html/libraries/") +- $(call INSTALL_SCRIPT,$(INSTALL_OPTS),libraries/gen_contents_index,"$(DESTDIR)$(docdir)/html/libraries/") + endif + ifneq "$(INSTALL_HTML_DOC_DIRS)" "" + for i in $(INSTALL_HTML_DOC_DIRS); do \ +@@ -980,7 +975,6 @@ + mk/project.mk \ + mk/install.mk.in \ + bindist.mk \ +- libraries/gen_contents_index \ + libraries/prologue.txt \ + $(wildcard libraries/dph/LICENSE \ + libraries/dph/ghc-packages \ diff --git a/provided_substvars b/provided_substvars new file mode 100755 index 00000000..203a9109 --- /dev/null +++ b/provided_substvars @@ -0,0 +1,58 @@ +#! /usr/bin/perl + +-x 'inplace/bin/ghc-pkg' or die "inplace ghc-pkg not executable or present"; + +open PKG, 'inplace/bin/ghc-pkg list --simple-output |' + or die "ghc-pkg list failed: $!"; + +my @ignored = ('ghc', 'mtl', 'transformers', 'terminfo', 'haskeline', 'utf8-string', 'xhtml', 'rts'); +my %ignored; +$ignored{$_}++ for @ignored; + +my @no_conflict = ('cabal', 'binary'); +my %no_conflict; +$no_conflict{$_}++ for @no_conflict; + +my @pkgs; +while () { + y/A-Z/a-z/; + my $pkgstring = $_; + LOOP: while ($pkgstring =~ m,([^ ]*?)-\d.*? ?,g) { + my $pkg = $1; + next if exists $ignored{$pkg}; + push @pkgs, $1; + } +} +close PKG; + +my $buf; +open DEV, '>debian/ghc.substvars'; +$buf = "provided-devs="; +foreach (sort @pkgs) {$buf .= "libghc-$_-dev, ";} +$buf =~ s#(.*), #$1#; +print DEV $buf."\n"; + +$buf = "conflicting-devs="; +foreach (sort @pkgs) { + next if $no_conflict{$_}; + $buf .= "libghc-$_-dev, "; +} +$buf =~ s#(.*), #$1#; +print DEV $buf."\n"; +close DEV; + +open PROF, '>debian/ghc-prof.substvars'; +print PROF 'provided-profs='; +$buf = ""; +foreach (@pkgs) {$buf .= "libghc-$_-prof, ";} +$buf =~ s#(.*), #$1#; +print PROF $buf."\n"; +close PROF; + +open DOC, '>debian/ghc-doc.substvars'; +print DOC 'provided-docs='; +$buf = ""; +foreach (@pkgs) {$buf .= "libghc-$_-doc, ";} +$buf =~ s#(.*), #$1#; +print DOC $buf."\n"; +close DOC; diff --git a/rules b/rules new file mode 100755 index 00000000..13c54b03 --- /dev/null +++ b/rules @@ -0,0 +1,392 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. +# +# This version is for a multibinary package. It also allows you to build any +# of the binary packages independantly, via binary- targets. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# Set default flags with dpkg-buildflags +# This might also close #712228 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +# Set a dummy HOME variable upon build. Some build daemons do not set HOME, but +# ghc-cabal expects it to be available. +export HOME = /homedoesnotexistatbuildtime + +# From /usr/share/doc/autotools-dev/examples/rules.gz: +export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +# Commented out for now. The build scripts don't recognise i486 as an +# architecture and cross compiling isn't supported anyway. +#ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) +# confflags += --build $(DEB_HOST_GNU_TYPE) +#else +# confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +#endif + +ifneq (,$(findstring $(DEB_HOST_ARCH), armel armhf)) +# Force use of a specific llvm package, the same version that ghc +# depends (and build-depends) on. +LLVM_PATH=/usr/lib/llvm-3.4/bin +export PATH:=$(LLVM_PATH):$(PATH) +endif + +ProjectVersion=$(shell cat VERSION) + +GHC=$(firstword $(shell bash -c "type -p ghc")) +EXTRA_CONFIGURE_FLAGS=--with-ghc="$(GHC)" +BUILD_HADDOCK_DOCS=YES +DEB_HOOGLE_TXT_DIR = /usr/lib/ghc-doc/hoogle/ + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + +autoreconf: + autoreconf -fi + for c_g in $$(find -type f -name config.guess); do \ + cp -f /usr/share/misc/config.guess "$$c_g"; \ + done + for c_s in $$(find -type f -name config.sub); do \ + cp -f /usr/share/misc/config.sub "$$c_s"; \ + done + +configure: configure-stamp +configure-stamp: + dh_testdir + dh_autoreconf debian/rules -- autoreconf + + rm -f mk/build.mk + echo "SRC_HC_OPTS += -lffi -optl-pthread" >> mk/build.mk + echo "HADDOCK_DOCS := YES" >> mk/build.mk + echo "XSLTPROC_OPTS += --nonet" >> mk/build.mk +ifneq (,$(findstring $(DEB_HOST_ARCH), arm armel armhf)) + echo "SRC_HC_OPTS += -optc-mlong-calls" >> mk/build.mk +endif +ifeq (armhf,$(DEB_HOST_ARCH)) + echo "SRC_HC_OPTS += -D__ARM_PCS_VFP" >> mk/build.mk +endif +# proper fix for #360177 +ifeq (ppc64,$(DEB_HOST_ARCH)) + echo "SRC_HC_OPTS += -optc-mminimal-toc" >> mk/build.mk +endif +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) +# echo "GhcStage1HcOpts += -DDEBUG" >> mk/build.mk +# echo "GhcStage2HcOpts += -DDEBUG" >> mk/build.mk + echo "SRC_HC_OPTS += -H32m -O0" >> mk/build.mk + echo "GhcHcOpts += -Rghc-timing -DDEBUG" >> mk/build.mk +# echo "GhcLibHcOpts += -O -dcore-lint -keep-hc-files " >> mk/build.mk + echo "SplitObjs = NO" >> mk/build.mk + echo "STRIP = :" >> mk/build.mk +endif +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + echo "SRC_HC_OPTS += -H32m -O0" >> mk/build.mk + echo "GhcHcOpts += -O0" >> mk/build.mk + # This breaks the build - to be investigated: + # echo "GhcLibHcOpts += -O0" >> mk/build.mk + echo "GhcRtsCcOpts += -O0" >> mk/build.mk +endif + # We also want to build the threaded profiling-enabled debug runtime, + # because it does no harm + echo 'GhcRTSWays += $$(if $$(findstring p, $$(GhcLibWays)),thr_debug_p,)' >> mk/build.mk +ifneq (,$(findstring $(DEB_HOST_ARCH),armel armhf)) + # GHCi is too badly broken on ARM; see + # http://hackage.haskell.org/trac/ghc/ticket/7794 + echo "GhcWithInterpreter = NO" >> mk/build.mk +endif + + # We can't do this with a configure flag in 6.8.1 as libdir is not + # defined at the point at which we := it + echo 'ghclibdir := $${libdir}/ghc' >> mk/build.mk + echo 'bindir := $${ghclibdir}/bin' >> mk/build.mk + echo 'ghclibexecdir := $${ghclibdir}/lib' >> mk/build.mk + # docdir doesn't have a configure flag, and unfortunately + # we also need to explicitly define all of its dependents as they + # are set with := + echo 'docdir := $$(datarootdir)/doc/ghc-doc' >> mk/build.mk + echo 'htmldir := $$(docdir)' >> mk/build.mk + echo 'dvidir := $$(docdir)' >> mk/build.mk + echo 'pdfdir := $$(docdir)' >> mk/build.mk + echo 'psdir := $$(docdir)' >> mk/build.mk + # We want verbose builds + echo 'V=1' >> mk/build.mk + rm -f config.sub + rm -f config.guess + ln -s /usr/share/misc/config.sub . + ln -s /usr/share/misc/config.guess . + ./configure $(confflags) --prefix=/usr \ + $(EXTRA_CONFIGURE_FLAGS) \ + --with-ld=ld.bfd \ + --with-llc=llc \ + --with-opt=opt + + touch $@ + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + $(MAKE) $(MAKEFLAGS) + + # Do some very simple tests that the compiler actually works + rm -rf debian/testghc + mkdir debian/testghc + echo 'main = putStrLn "Foo"' > debian/testghc/foo.hs + inplace/bin/ghc-stage2 debian/testghc/foo.hs -o debian/testghc/foo + [ "$$(debian/testghc/foo)" = "Foo" ] + rm debian/testghc/* + echo 'main = putStrLn "Foo"' > debian/testghc/foo.hs + inplace/bin/ghc-stage2 debian/testghc/foo.hs -o debian/testghc/foo -O2 + [ "$$(debian/testghc/foo)" = "Foo" ] + rm debian/testghc/* + +# build haddock separately and hard code paths according to install paths + mkdir -p debian/haddock-build + cp -r utils/haddock debian/haddock-build + cd debian/haddock-build/haddock; \ + rm -rf dist; \ + ../../../inplace/bin/ghc-stage2 --make Setup.lhs; \ + ./Setup configure --prefix=/usr --with-compiler=../../../inplace/bin/ghc-stage2 \ + --package-db=../../../inplace/lib/package.conf.d/ \ + --htmldir=/usr/share/doc/ghc-haddock/html/ ; \ + ./Setup build + + touch $@ + +FILES = \( -type f -o -type l \) +PROF_FILE = \( -name "*.p_*" -o -name "lib*_p.a" \) +DYNAMIC_FILE = \( -name "*.dyn_hi" -o -name lib*.so \) + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_prep + + # Install the basic stuff + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + + # Delete all the library LICENSE files + rm -f debian/tmp/usr/share/doc/ghc-doc/html/libraries/*/LICENSE + + # Generate lintian overrides + mkdir -p debian/tmp/usr/share/lintian/overrides + echo "ghc binary: extra-license-file `cd debian/tmp && echo usr/lib/ghc-*/Cabal-*/Distribution/License.hi`" >> debian/tmp/usr/share/lintian/overrides/ghc + echo "ghc: extra-license-file `cl debian/tmp && echo usr/lib/ghc-*/Cabal-*/Distribution/License.dyn_hi`" >> debian/tmp/usr/share/lintian/overrides/ghc + echo "ghc-prof binary: extra-license-file `cd debian/tmp && echo usr/lib/ghc-*/Cabal-*/Distribution/License.p_hi`" >> debian/tmp/usr/share/lintian/overrides/ghc-prof + + # Sort out the package.conf files + mkdir -p debian/tmp/var/lib/ghc + # Old directories for symlink-workaround. Remove once all libraries use new path + mv debian/tmp/usr/lib/ghc/package.conf.d \ + debian/tmp/var/lib/ghc/ + rm debian/tmp/var/lib/ghc/package.conf.d/package.cache + chmod +x debian/provided_substvars + debian/provided_substvars + sed -ri 's,^haddock-interfaces: /.*?/libraries/,haddock-interfaces: /usr/lib/ghc-doc/haddock/,' debian/tmp/var/lib/ghc/package.conf.d/*.conf + + # Remove haddock as built within the ghc tree + rm -f debian/tmp/usr/lib/ghc/bin/haddock \ + debian/tmp/usr/lib/ghc/bin/haddock-$(ProjectVersion) \ + debian/tmp/usr/lib/ghc/lib/haddock + rm -rf debian/tmp/usr/lib/ghc/html + + # Sort out the binaries + mkdir -p debian/tmp/usr/bin + if inplace/bin/ghc-stage2 --info | grep '"Have interpreter","NO"'; then \ + cd debian/tmp/usr/lib/ghc ;rm -f bin/ghci* bin/runghc* bin/runhaskell*; \ + fi + cd debian/tmp/usr/lib/ghc/bin && \ + for f in *; \ + do ln -s /usr/lib/ghc/bin/$$f \ + ../../../bin/$${f}; \ + done + sed -i 's,topdir="/usr/lib,topdir="/var/lib,' debian/tmp/usr/lib/ghc/bin/ghc-pkg-$(ProjectVersion) + cd debian/haddock-build/haddock; ./Setup copy --dest=../../tmp + + # Check if we have a ghci binary + if test -e debian/tmp/usr/lib/ghc/bin/ghci-$(ProjectVersion); then \ + echo 'ghci=ghc-ghci' >> debian/ghc.substvars ; fi + + # Add haddock substvars + echo "haddock:Depends=haddock-interface-$$(debian/tmp/usr/bin/haddock --interface-version)" >> debian/ghc-doc.substvars + # Hardcode that 22 supports 21, until http://trac.haskell.org/haddock/ticket/231 is fixed + if [ $$(debian/tmp/usr/bin/haddock --interface-version) -eq 22 ] ; then \ + echo "haddock:Provides=haddock-interface-21, haddock-interface-22" >> debian/ghc-haddock.substvars; \ + else \ + echo "haddock:Provides=haddock-interface-$$(debian/tmp/usr/bin/haddock --interface-version)" >> debian/ghc-haddock.substvars ;\ + fi + +ifeq (YES,$(BUILD_HADDOCK_DOCS)) + mkdir -p debian/tmp/usr/lib/ghc-doc + cp debian/gen_contents_index debian/tmp/usr/lib/ghc-doc/ + chmod +x debian/tmp/usr/lib/ghc-doc/gen_contents_index + mkdir debian/tmp/usr/lib/ghc-doc/haddock/ + for f in `find debian/tmp/usr/share/doc/ghc-doc/html/libraries/ -maxdepth 1 -mindepth 1 -type d`; do \ + mkdir debian/tmp/usr/lib/ghc-doc/haddock/`basename $$f` ; \ + mv $$f/*.haddock debian/tmp/usr/lib/ghc-doc/haddock/`basename $$f` ; done + cd debian/tmp/usr/share/doc/ghc-doc/html/libraries/; ln -s ghc-$(ProjectVersion) ghc + install -Dm 644 debian/index.html debian/tmp/usr/share/doc/ghc-doc/index.html +endif + +ifeq (ia64,$(DEB_HOST_ARCH)) # Tested and seen to be necessary with 6.12.1 + sed -i "s/exec /unset LC_ALL\nexport LC_CTYPE=en_US\nexec /" debian/tmp/usr/lib/ghc/bin/ghc-$(ProjectVersion) +endif + +ifneq (,$(findstring $(DEB_HOST_ARCH), armel armhf)) + # Ensure that the same llvm used to build ghc is used at runtime. + sed -i "s,exec ,PATH=\"$(LLVM_PATH):\$$PATH\"\nexport PATH\nexec ," \ + debian/tmp/usr/lib/ghc/bin/ghc-$(ProjectVersion) \ + debian/tmp/usr/lib/ghc/bin/ghc-pkg-$(ProjectVersion) \ + debian/tmp/usr/lib/ghc/bin/hsc2hs \ + debian/tmp/usr/lib/ghc/bin/haddock-ghc-$(ProjectVersion) +endif + + # manpages + rm -f debian/*.1 + echo ".so man1/ghc.1" > debian/ghc-$(ProjectVersion).1 + if test -e debian/tmp/usr/bin/ghci-$(ProjectVersion); then \ + echo ".so man1/ghc.1" > debian/ghci.1 ;\ + echo ".so man1/ghc.1" > debian/ghci-$(ProjectVersion).1 ;\ + cp debian/runghc.man debian/runghc.1 ; fi + mv debian/tmp/usr/share/man/man1/ghc.1 debian/ghc.1 + cp utils/hp2ps/hp2ps.1 debian/hp2ps.1 + cp debian/ghc-pkg.man debian/ghc-pkg.1 + echo ".so man1/ghc-pkg.1" > debian/ghc-pkg-$(ProjectVersion).1 + + echo debian/*.1 > debian/ghc.manpages + cp debian/haddock.man debian/haddock.1 + echo debian/haddock.1 >debian/ghc-haddock.manpages + + # #################### + # Now all the files are sorted, create the package filelists + + # ghc + find debian/tmp/usr/bin $(FILES) ! -name haddock > debian/ghc.install +# find debian/tmp/usr/share/ghc* $(FILES) >> debian/ghc.install + find debian/tmp/usr/share/man $(FILES) >> debian/ghc.install + find debian/tmp/usr/lib/ghc $(FILES) ! $(PROF_FILE) ! $(DYNAMIC_FILE) >> debian/ghc.install + find debian/tmp/var >> debian/ghc.install + echo debian/tmp/usr/share/lintian/overrides/ghc >> debian/ghc.install + # ghc-prof + find debian/tmp/usr/lib $(FILES) $(PROF_FILE) > debian/ghc-prof.install + echo debian/tmp/usr/share/lintian/overrides/ghc-prof >> debian/ghc-prof.install + # ghc-dynamic + find debian/tmp/usr/lib $(FILES) $(DYNAMIC_FILE) > debian/ghc-dynamic.install + echo debian/lintian-overrides/ghc-dynamic /usr/share/lintian/overrides >> debian/ghc-dynamic.install + # haddock + echo usr/bin/haddock > debian/ghc-haddock.install + find debian/tmp/usr/share/haddock-* $(FILES) >> debian/ghc-haddock.install + # ghc-doc +ifeq (YES,$(BUILD_HADDOCK_DOCS)) + mkdir -p debian/tmp/$(DEB_HOOGLE_TXT_DIR) + cat debian/ghc-doc.links.in > debian/ghc-doc.links + find debian/tmp/usr/share/doc/ghc-doc/html/libraries/*/ -name "*.txt" \ + -printf "%p $(DEB_HOOGLE_TXT_DIR)/%f\n" >> debian/ghc-doc.links + find debian/tmp/usr/share/doc/ghc-doc $(FILES) > debian/ghc-doc.install + find debian/tmp/usr/lib/ghc-doc $(FILES) >> debian/ghc-doc.install +endif + sed -i s,^debian/tmp,, debian/*.install debian/*.links + rm -f debian/ghc.links + echo "/var/lib/ghc/package.conf.d /usr/lib/ghc/package.conf.d" >> debian/ghc.links + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f configure-stamp build-stamp install-stamp binary-arch-stamp binary-indep-stamp + rm -f configure + + # Temporary, while the released tarball by accident contains the dph + # libraries + rm -rf libraries/dph libraries/primitive libraries/vector libraries/random + + $(MAKE) distclean + rm -f config.sub config.guess + rm -f debian/*.install + rm -f debian/*.1 + rm -f debian/ghc.manpages + rm -f debian/ghc.links + rm -f debian/ghc-doc.links + rm -f mk/build.mk + rm -rf debian/testghc + rm -f ch01.html ch02.html index.html + rm -rf debian/haddock-build + + # Hacks: + rm -f config.log + rm -f libraries/ghc-prim/GHC/PrimopWrappers.hs + rm -f libraries/ghc-prim/GHC/Prim.hs + rm -f libraries/ghc-prim/GHC/Generics.hc + rm -f libraries/ghc-prim/GHC/Generics.dyn_hc + rm -f libraries/ghc-prim/GHC/IntWord32.hc + rm -f libraries/integer-gmp/GHC/Integer/Type.hc + rm -f libraries/base/GHC/ConsoleHandler.hc + rm -f libraries/base/GHC/IO/Encoding/CodePage.hc + rm -f libraries/base/Unsafe/Coerce.hc + rm -f rts/libs.depend mk/install.mk + rm -f rts/package.conf.install.raw + rm -f rts/package.conf.inplace.raw + rm -f utils/ghc-pwd/dist-boot/Main.hi + rm -f utils/ghc-pwd/dist-boot/Main.o + rm -f utils/ghc-pwd/dist-boot/ghc-pwd + + rm -f libraries/haskeline/a.out + + dh_autoreconf_clean + dh_clean + +binary-arch: binary-arch-stamp +binary-arch-stamp: install-stamp + dh_testdir + dh_testroot + dh_installchangelogs -a + dh_installdocs -a + dh_installexamples -a + dh_install -a + dh_installmenu -a + dh_installman -a + dh_strip + dh_link -a + dh_compress -X.haddock -X.txt -a + dh_fixperms -a + sh debian/dh_haskell_provides + dh_installdeb -a + dh_shlibdeps -XlibHS + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + touch $@ + +# binary-indep and binary-arch both build everything, as otherwise +# "dh_install --fail-missing" falls over + +# Build architecture independant packages using the common target. +binary-indep: binary-indep-stamp +binary-indep-stamp: install-stamp + dh_testdir + dh_testroot + dh_installchangelogs -i + dh_installdocs -i + dh_installexamples -i + dh_installdirs -i + dh_install -i + dh_installmenu -i + dh_installman -i + dh_link -i + dh_compress -X.haddock -X.txt -i + dh_fixperms -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + touch $@ + +binary: binary-indep binary-arch +.PHONY: build install clean binary-indep binary-arch binary-common binary patch diff --git a/runghc.man b/runghc.man new file mode 100644 index 00000000..61a90760 --- /dev/null +++ b/runghc.man @@ -0,0 +1,45 @@ +.TH RUNGHC 1 "28 NOVEMBER 2007" +.SH NAME +runghc \- program to run Haskell programs without first having to compile them. +.SH SYNOPSIS +.B runghc +.RI +[runghc|flags] [GHC|flags] module [program|flags]... +.br +.SH DESCRIPTION +.B runghc +is considered a non-interactive interpreter and part of The Glasgow Haskell Compiler. +.B runghc +is a compiler that automatically runs its results at the end. +.PP +.SH OPTIONS +.TP +the flags are: +.TP +.B \-f +it tells runghc which GHC to use to run the program. If it is not given then runghc will search for GHC in the directories in the system search path. runghc -f /path/to/ghc +.TP +.B \-- +runghc will try to work out where the boundaries between [runghc flags] and [GHC flags], and [GHC flags] and module are, but you can use a -- flag if it doesn't get it right. For example, runghc -- -fglasgow-exts Foo +means runghc won't try to use glasgow-exts as the path to GHC, but instead will pass the flag to GHC. + +.SH EXAMPLES +.TP +.B runghc foo +.PP +.B runghc -f /path/to/ghc foo +.TP +.B runghc -- -fglasgow-exts Foo + +.SH SEE ALSO +.BR ghc (1), +.BR ghci (1). +.br + +.SH COPYRIGHT +Copyright 2002, The University Court of the University of Glasgow. All rights reserved. + +.SH AUTHOR +This manual page was written by Efrain Valles Pulgar . This is free documentation; see the GNU +General Public Licence version 2 or later for copying conditions. There is NO WARRANTY. + diff --git a/source/format b/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/watch b/watch new file mode 100644 index 00000000..ad5430de --- /dev/null +++ b/watch @@ -0,0 +1,2 @@ +version=3 +http://downloads.haskell.org/~ghc/(\d[\d.]*)/ghc-(\d[\d.]*)-src.tar.bz2