Hello,
I recently installed ghc-2.03 on IRIX 6.2. It works also on IRIX
6.3. The build was done using ghc-0.29 (which I compiled from .hc files
some time ago) and gcc-2.7.2.1 for the following fptools/mk/build.mk
configuration:
ProjectsToBuild=glafp-utils literate ghc hslibs
GhcWithNativeCodeGen=NO
MKDEPENDHS_1_2=mkdependHS-0.29
GhcCompilerWays=p
GhcHcOpts=-O
HsLibsWithReadline=YES
ReadlineIncludePath=/usr/contrib/include
Profiling seems to work, though I didn't test it too extensively.
The following patch shows most of the changes I had to introduce to make
the compilation work. I also needed to modify paths at the top of the
fptools/literate/mkdependlit Perl script and increase the heap size to
compile several files.
If anybody is interested I can prepare binary distributions of ghc-0.29
and ghc-2.03.
Tom
===============
diff -urd fptools/ghc/includes/stgdefs.h ghc-2.03/ghc/includes/stgdefs.h
--- fptools/ghc/includes/stgdefs.h Mon Apr 21 15:48:54 1997
+++ ghc-2.03/ghc/includes/stgdefs.h Wed Apr 23 02:44:58 1997
@@ -50,7 +50,14 @@
#undef _POSIX_C_SOURCE
#else
#define _POSIX_SOURCE 1
+/* tjc */
+#if irix_TARGET_OS
+#define _POSIX_C_SOURCE 199309L
+#define __EXTENSIONS__
+#else
#define _POSIX_C_SOURCE 199301L
+#endif
+
/* Alphas set _POSIX_VERSION (unistd.h) */
/* ditto _POSIX2_C_VERSION
_POSIX2_VERSION
diff -urd fptools/ghc/runtime/main/Signals.lc ghc-2.03/ghc/runtime/main/Signals.lc
--- fptools/ghc/runtime/main/Signals.lc Wed Mar 26 17:25:06 1997
+++ ghc-2.03/ghc/runtime/main/Signals.lc Wed Apr 23 02:50:38 1997
@@ -174,10 +174,6 @@
# else /* Not SunOS 4, FreeBSD, or Linux(a.out) */
-# if defined(irix_TARGET_OS)
- /* certainly BOGUS (WDP 94/05) -- copied from /usr/include/sys/siginfo.h */
-# define si_addr _data._fault._addr
-# endif
#if defined(cygwin32_TARGET_OS)
/*
--- fptools/hslibs/ghc/src/SocketPrim.lhs Mon Apr 21 14:56:01 1997
+++ ghc-2.03/hslibs/ghc/src/SocketPrim.lhs Wed Apr 23 23:24:01 1997
@@ -537,6 +537,7 @@
\item SPARC/Solaris
\item Alpha/OSF
\item HPPA/HPUX9
+\item MIPS/IRIX6.2
\end{itemize}
\begin{code}
@@ -567,11 +568,11 @@
| AF_HYLINK -- NSC Hyperchannel
| AF_APPLETALK -- Apple Talk
| AF_NIT -- Network Interface Tap
- | AF_802 -- IEEE 80.2, also ISO 8802
- | AF_OSI -- umberella of all families used by OSI
+ | AF_802 -- IEEE 802.2, also ISO 8802
+ | AF_OSI -- umbrella for all families used by OSI
| AF_X25 -- CCITT X.25
| AF_OSINET -- AFI
- | AF_GOSSIP -- US Government OSI
+ | AF_GOSIP -- US Government OSI
| AF_IPX -- Novell Internet Protocol
deriving (Eq, Ord, Ix, Show)
@@ -657,6 +658,49 @@
#endif
+#if irix_TARGET_OS
+
+data Family =
+ AF_UNSPEC -- unspecified
+ | AF_UNIX -- backward compatibility
+ | AF_INET -- internetwork: UDP, TCP, etc.
+ | AF_IMPLINK -- arpanet imp addresses
+ | AF_PUP -- pup protocols: e.g. BSP
+ | AF_CHAOS -- mit CHAOS protocols
+ | AF_NS -- XEROX NS protocols
+ | AF_ISO -- ISO protocols
+ | AF_ECMA -- european computer manufacturers
+ | AF_DATAKIT -- datakit protocols
+ | AF_CCITT -- CCITT protocols, X.25 etc
+ | AF_SNA -- IBM SNA
+ | AF_DECnet -- DECnet
+ | AF_DLI -- DEC Direct data link interface
+ | AF_LAT -- LAT
+ | AF_HYLINK -- NSC Hyperchannel
+ | AF_APPLETALK -- Apple Talk
+ | AF_ROUTE -- Internal Routing Protocol
+ | AF_RAW -- Link layer interface
+
+-- these two overlap AF_ROUTE and AF_RAW
+-- | AF_NIT -- Network Interface Tap
+-- | AF_802 -- IEEE 802.2, also ISO 8802
+
+ | AF_OSI -- umbrella for all families used by OSI
+ | AF_X25 -- CCITT X.25
+ | AF_OSINET -- AFI
+ | AF_GOSIP -- US Government OSI
+
+ | AF_SDL -- SGI Data Link for DLPI
+ | AF_INET6 -- Internet Protocol version 6
+ | AF_LINK -- Link layer interface
+ deriving (Eq, Ord, Ix, Show)
+
+packFamily = index (AF_UNSPEC, AF_LINK)
+unpackFamily family = (range (AF_UNSPEC, AF_LINK))!!family
+
+#endif
+
+
-- Alpha running OSF or a SPARC with SunOS, rather than Solaris.
#if osf1_TARGET_OS || sunos4_TARGET_OS || hpux_TARGET_OS
@@ -671,9 +715,9 @@
packSocketType stype = 1 + (index (Stream, SeqPacket) stype)
#endif
--- This is a Sun running Solaris rather than SunOS
+-- This is a Sun running Solaris rather than SunOS or SGI running IRIX
-#if solaris2_TARGET_OS
+#if solaris2_TARGET_OS || irix_TARGET_OS
data SocketType =
Datagram
| Stream