pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Initial support for the MIPSpro ucode compilers fou...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/97e3c3f4d781
branches:  trunk
changeset: 468975:97e3c3f4d781
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Feb 18 11:18:42 2004 +0000

description:
Initial support for the MIPSpro ucode compilers found on IRIX 5.3.  The
ucode compilers only support building the "o32" ABI.

diffstat:

 mk/buildlink3/mipspro-ucode-cc-post-cache |  12 +++++++++
 mk/buildlink3/mipspro-ucode-cc-post-logic |  41 +++++++++++++++++++++++++++++++
 mk/compiler/bsd.compiler.mk               |   5 ++-
 mk/compiler/mipspro-ucode.mk              |  18 +++++++++++++
 4 files changed, 74 insertions(+), 2 deletions(-)

diffs (102 lines):

diff -r a5979f035269 -r 97e3c3f4d781 mk/buildlink3/mipspro-ucode-cc-post-cache
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/buildlink3/mipspro-ucode-cc-post-cache Wed Feb 18 11:18:42 2004 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: mipspro-ucode-cc-post-cache,v 1.1 2004/02/18 11:18:42 jlam Exp $
+#
+# This file implements the default action of the "cc" private cache
+# for the MIPSpro ucode suite of compilers, and tells the wrapper to skip
+# the common cache lookup for all GCC arguments that the MIPSpro compiler
+# can't handle; they will instead by handled directly by
+# mipspro-cc-post-logic.
+
+-[OW]*|-f[pP][iI][cC])
+       skipcache=yes
+       ;;
+esac
diff -r a5979f035269 -r 97e3c3f4d781 mk/buildlink3/mipspro-ucode-cc-post-logic
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/buildlink3/mipspro-ucode-cc-post-logic Wed Feb 18 11:18:42 2004 +0000
@@ -0,0 +1,41 @@
+# $NetBSD: mipspro-ucode-cc-post-logic,v 1.1 2004/02/18 11:18:42 jlam Exp $
+#
+# Silently accept some GCC compiler arguments by silently converting
+# them to the MIPSpro compiler equivalents.  This makes the MIPSpro
+# compiler wrappers work with more software that seems to assume GCC
+# nowadays.
+
+case $arg in
+-O[0123])
+       # MIPSpro can handle -O[0123] so just pass them on through.
+       ;;
+-O*)
+       # Ignore all other -O* options.
+       arg=
+       addtoprivatecache=yes
+       ;;
+-Wl,-R*)
+       # Directories for the runtime library search path are passed
+       # via "-Wl,-rpath,<dir>", not "-Wl,-R<dir>".
+       #
+       arg=`$echo "X$arg" | $Xsed -e "s|^-Wl,-R|-Wl,-rpath,|g"`
+       addtoprivatecache=yes
+       ;;
+-Wl,*)
+       # The MIPSpro compiler accepts these -W* directives, so just
+       # accept them and pass them on through.
+       ;;
+-W*)
+       # Ignore all of the other -W* directives, which are likely to
+       # be GCCisms.
+       #
+       arg=
+       addtoprivatecache=yes
+       ;;
+-f[Pp][Ii][Cc])
+        # The MIPSpro compiler uses -KPIC to create position independent code.
+        #
+        arg=-KPIC
+        addtoprivatecache=yes
+        ;;
+esac
diff -r a5979f035269 -r 97e3c3f4d781 mk/compiler/bsd.compiler.mk
--- a/mk/compiler/bsd.compiler.mk       Wed Feb 18 11:13:54 2004 +0000
+++ b/mk/compiler/bsd.compiler.mk       Wed Feb 18 11:18:42 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.compiler.mk,v 1.9 2004/02/05 21:26:16 jlam Exp $
+# $NetBSD: bsd.compiler.mk,v 1.10 2004/02/18 11:18:43 jlam Exp $
 #
 # This Makefile fragment implements handling for supported C/C++/Fortran
 # compilers.
@@ -14,7 +14,8 @@
 #              distcc          distributed C/C++ (chainable)
 #              ccache          compiler cache (chainable)
 #              gcc             GNU
-#              mipspro         Silicon Graphics, Inc. MIPSpro
+#              mipspro         Silicon Graphics, Inc. MIPSpro (n32/n64)
+#              mipspro-ucode   Silicon Graphics, Inc. MIPSpro (o32)
 #              sunpro          Sun Microsystems, Inc. WorkShip/Forte/Sun
 #                              ONE Studio
 #
diff -r a5979f035269 -r 97e3c3f4d781 mk/compiler/mipspro-ucode.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/compiler/mipspro-ucode.mk      Wed Feb 18 11:18:42 2004 +0000
@@ -0,0 +1,18 @@
+# $NetBSD: mipspro-ucode.mk,v 1.1 2004/02/18 11:18:43 jlam Exp $
+
+.if !defined(COMPILER_MIPSPRO_UCODE_MK)
+COMPILER_MIPSPRO_UCODE_MK=     one
+
+CC_VERSION=    MIPSpro Compilers: Version 4.x (ucode)
+.  include "../../mk/compilers/mipspro.mk"
+.endif # COMPILER_MIPSPRO_UCODE_MK
+
+# The following section is included only if we're not being included by
+# bsd.prefs.mk.
+#
+.if empty(BSD_PREFS_MK)
+.  if empty(COMPILER_MIPSPRO_UCODE_MK:Mtwo)
+COMPILER_MIPSPRO_UCODE_MK+=    two
+.    include "../../mk/compilers/mipspro.mk"
+.  endif # COMPILER_MIPSPRO_UCODE_MK
+.endif  # BSD_PREFS_MK



Home | Main Index | Thread Index | Old Index