[commit: ghc] master: Add support for nto-qnx (BlackBerry 10) (629ae2a)

Simon Marlow marlowsd at gmail.com
Wed Jan 23 10:46:35 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/629ae2a7108092010d44788e22b50828add84ab6

>---------------------------------------------------------------

commit 629ae2a7108092010d44788e22b50828add84ab6
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Wed Jan 23 09:21:39 2013 +0000

    Add support for nto-qnx (BlackBerry 10)
    
    Submitted by: Stephen Paul Weber <singpolyma at singpolyma.net>

>---------------------------------------------------------------

 aclocal.m4                      |    6 ++++++
 compiler/main/DriverPipeline.hs |    2 +-
 compiler/utils/Platform.hs      |    2 ++
 3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index fca602f..57e35a2 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -245,6 +245,9 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
         osf3)
             test -z "[$]2" || eval "[$]2=OSOsf3"
             ;;
+        nto-qnx)
+            test -z "[$]2" || eval "[$]2=OSQNXNTO"
+            ;;
         dragonfly|osf1|hpux|linuxaout|freebsd2|cygwin32|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix)
             test -z "[$]2" || eval "[$]2=OSUnknown"
             ;;
@@ -1830,6 +1833,9 @@ case "$1" in
             #      i686-gentoo-freebsd8.2
     $2="freebsd"
     ;;
+  nto-qnx*)
+    $2="nto-qnx"
+    ;;
   *)
     echo "Unknown OS $1"
     exit 1
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 4daaca3..f47aea7 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1819,7 +1819,7 @@ linkBinary dflags o_files dep_packages = do
             let os = platformOS (targetPlatform dflags)
             in if os == OSOsf3 then ["-lpthread", "-lexc"]
                else if os `elem` [OSMinGW32, OSFreeBSD, OSOpenBSD,
-                                  OSNetBSD, OSHaiku]
+                                  OSNetBSD, OSHaiku, OSQNXNTO]
                then []
                else ["-lpthread"]
          | otherwise               = []
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index 76c9fa3..661e03a 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -69,6 +69,7 @@ data OS
         | OSKFreeBSD
         | OSHaiku
         | OSOsf3
+        | OSQNXNTO
         deriving (Read, Show, Eq)
 
 -- | ARM Instruction Set Architecture, Extensions and ABI
@@ -110,6 +111,7 @@ osElfTarget OSKFreeBSD  = True
 osElfTarget OSHaiku     = True
 osElfTarget OSOsf3      = False -- I don't know if this is right, but as
                                 -- per comment below it's safe
+osElfTarget OSQNXNTO    = False
 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





More information about the ghc-commits mailing list