Hi,

On 2015-04-28 13:19, Samuel Thibault wrote:
I called for help some time ago, but nobody moved. Now it'll hit us if nobody takes care to fix it, and quite badly: it's like 5% of the Debian
packages. It shouldn't be hard, it's probably a matter of taking the
Linux code and fix a couple of bits, but somebody has to do it:

https://buildd.debian.org/status/package.php?p=ghc

howToAccessLabel: PIC not defined for this platform

A couple of months ago, I gave the ghc in experimental (7.8.20141223-1)
a try; while with the attached patch (configure was included for my own
convenience) it passed the aforementioned issue by recognizing Hurd as
ELF platform, it fails in a later stage because binaries (like ghc-pkg)
have RPATH set to build paths using $ORIGIN, which we don't support.

$ORIGIN really needs to be supported sooner or later, it is biting us
now and then...

Anyway, I'm providing the patch I had, feel free to pick it up,
I cannot work on it at the moment.

--
Pino Toscano
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -271,12 +271,15 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_V
         nto-qnx)
             test -z "[$]2" || eval "[$]2=OSQNXNTO"
             ;;
-        
dragonfly|osf1|hpux|linuxaout|freebsd2|cygwin32|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix)
+        
dragonfly|osf1|hpux|linuxaout|freebsd2|cygwin32|nextstep2|nextstep3|sunos4|ultrix|irix|aix)
             test -z "[$]2" || eval "[$]2=OSUnknown"
             ;;
         linux-android)
             test -z "[$]2" || eval "[$]2=OSAndroid"
             ;;
+        gnu)
+            test -z "[$]2" || eval "[$]2=OSHurd"
+            ;;
         *)
             echo "Unknown OS '[$]1'"
             exit 1
--- a/configure
+++ b/configure
@@ -7752,12 +7752,15 @@ rm -f core conftest.err conftest.$ac_obj
         nto-qnx)
             test -z "$2" || eval "$2=OSQNXNTO"
             ;;
-        
dragonfly|osf1|hpux|linuxaout|freebsd2|cygwin32|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix)
+        
dragonfly|osf1|hpux|linuxaout|freebsd2|cygwin32|nextstep2|nextstep3|sunos4|ultrix|irix|aix)
             test -z "$2" || eval "$2=OSUnknown"
             ;;
         linux-android)
             test -z "$2" || eval "$2=OSAndroid"
             ;;
+        gnu)
+            test -z "$2" || eval "$2=OSHurd"
+            ;;
         *)
             echo "Unknown OS '$1'"
             exit 1
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -81,6 +81,7 @@ data OS
         | OSOsf3
         | OSQNXNTO
         | OSAndroid
+        | OSHurd
         deriving (Read, Show, Eq)
 
 -- | ARM Instruction Set Architecture, Extensions and ABI
@@ -125,6 +126,7 @@ osElfTarget OSOsf3      = False -- I don
                                 -- per comment below it's safe
 osElfTarget OSQNXNTO    = False
 osElfTarget OSAndroid   = True
+osElfTarget OSHurd      = True
 osElfTarget OSUnknown   = False
  -- Defaulting to False is safe; it means don't rely on any
  -- ELF-specific functionality.  It is important to have a default for

Reply via email to