Package: ghc6
Version: 6.4-4.1+kbsd
Severity: important
Tags: patch

Hi,

ghc6 is missing support for GNU/kFreeBSD. I have successfully added
support for kfreebsd-i386 and bootstrapped ghc6.

Please find attached a patch to make the build of ghc6 possible on this
architecture. Could you please add it in the next upload? It would also
be nice if you can forward it to upstream.

Thanks,
Aurelien

-- System Information:
Debian Release: testing/unstable
Architecture: kfreebsd-i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: GNU/kFreeBSD 5.4-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages ghc6 depends on:
ii  gcc-3.3                 1:3.3.6-10       The GNU C compiler
ii  haskell-utils           1.6.0.1          Utilities used by the Debian Haske
ii  libc0.1                 2.3-1+kbsd.11    GNU C Library: Shared libraries an
ii  libgmp3-dev             4.1.4-10+libtool Multiprecision arithmetic library 
ii  libgmp3c2               4.1.4-10+libtool Multiprecision arithmetic library
ii  libreadline5-dev        5.0-11           GNU readline and history libraries
ii  perl [perl5]            5.8.7-5          Larry Wall's Practical Extraction 

ghc6 recommends no packages.

-- no debconf information
Author: aurel32
Status: in BTS

--- ghc6-6.4.orig/ghc/driver/mangler/ghc-asm.lprl
+++ ghc6-6.4/ghc/driver/mangler/ghc-asm.lprl
@@ -160,7 +160,7 @@
     $T_HDR_vector   = "\.text\n\t\.align 2\n"; # NB: requires padding
 
     #--------------------------------------------------------#
-    } elsif ( $TargetPlatform =~ 
/^i386-.*-(solaris2|linux|freebsd|netbsd|openbsd)$/ ) {
+    } elsif ( $TargetPlatform =~ 
/^i386-.*-(solaris2|linux|freebsd|netbsd|openbsd|kfreebsdgnu)$/ ) {
 
     $T_STABBY      = 0; # 1 iff .stab things (usually if a.out format)
     $T_US          = ''; # _ if symbols have an underscore on the front
--- ghc6-6.4.orig/configure.ac
+++ ghc6-6.4/configure.ac
@@ -188,6 +188,15 @@
         HostVendor_CPP='unknown'
         HostOS_CPP='linux'
         ;;
+i[3456]86-*-kfreebsd*-gnu)
+       HostPlatform=i386-unknown-kfreebsdgnu # hack again
+       TargetPlatform=i386-unknown-kfreebsdgnu
+       BuildPlatform=i386-unknown-kfreebsdgnu
+       HostPlatform_CPP='i386_unknown_kfreebsdgnu'
+       HostArch_CPP='i386'
+       HostVendor_CPP='unknown'
+       HostOS_CPP='kfreebsdgnu'
+       ;;
 i[[3456]]86-*-freebsd[[3-9]]*) # FreeBSD 3.0+ uses ELF
        HostPlatform=i386-unknown-freebsd # hack again
        TargetPlatform=i386-unknown-freebsd
--- ghc6-6.4.orig/configure
+++ ghc6-6.4/configure
@@ -1577,6 +1577,15 @@
         HostVendor_CPP='unknown'
         HostOS_CPP='linux'
         ;;
+i[3456]86-*-kfreebsd*-gnu)
+       HostPlatform=i386-unknown-kfreebsdgnu # hack again
+       TargetPlatform=i386-unknown-kfreebsdgnu
+       BuildPlatform=i386-unknown-kfreebsdgnu
+       HostPlatform_CPP='i386_unknown_kfreebsdgnu'
+       HostArch_CPP='i386'
+       HostVendor_CPP='unknown'
+       HostOS_CPP='kfreebsdgnu'
+       ;;
 i[3456]86-*-freebsd[3-9]*) # FreeBSD 3.0+ uses ELF
        HostPlatform=i386-unknown-freebsd # hack again
        TargetPlatform=i386-unknown-freebsd

Reply via email to