[Python-checkins] remove IRIX support (closes bpo-31341) (#3310)

Benjamin Peterson webhook-mailer at python.org
Mon Sep 4 19:36:08 EDT 2017


https://github.com/python/cpython/commit/069306312addf87252e2dbf250fc7632fc8b7da3
commit: 069306312addf87252e2dbf250fc7632fc8b7da3
branch: master
author: Benjamin Peterson <benjamin at python.org>
committer: GitHub <noreply at github.com>
date: 2017-09-04T16:36:05-07:00
summary:

remove IRIX support (closes bpo-31341) (#3310)

See PEP 11.

files:
A Misc/NEWS.d/next/Build/2017-09-04-14-43-46.bpo-31341.XLuZFk.rst
M Doc/distutils/apiref.rst
M Doc/library/sysconfig.rst
M Lib/distutils/tests/test_unixccompiler.py
M Lib/distutils/unixccompiler.py
M Lib/distutils/util.py
M Lib/sysconfig.py
M Lib/test/test_pty.py
M Lib/uuid.py
M Modules/Setup.dist
M Modules/fpectlmodule.c
M Modules/socketmodule.c
M Tools/scripts/objgraph.py
M configure
M configure.ac
M pyconfig.h.in

diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst
index b5b7731074c..622c7d1708f 100644
--- a/Doc/distutils/apiref.rst
+++ b/Doc/distutils/apiref.rst
@@ -1086,19 +1086,16 @@ other utility module.
 
    Return a string that identifies the current platform.  This is used mainly to
    distinguish platform-specific build directories and platform-specific built
-   distributions.  Typically includes the OS name and version and the architecture
-   (as supplied by 'os.uname()'), although the exact information included depends
-   on the OS; eg. for IRIX the architecture isn't particularly important (IRIX only
-   runs on SGI hardware), but for Linux the kernel version isn't particularly
-   important.
+   distributions.  Typically includes the OS name and version and the
+   architecture (as supplied by 'os.uname()'), although the exact information
+   included depends on the OS; e.g., on Linux, the kernel version isn't
+   particularly important.
 
    Examples of returned values:
 
    * ``linux-i586``
    * ``linux-alpha``
    * ``solaris-2.6-sun4u``
-   * ``irix-5.3``
-   * ``irix64-6.2``
 
    For non-POSIX platforms, currently just returns ``sys.platform``.
 
diff --git a/Doc/library/sysconfig.rst b/Doc/library/sysconfig.rst
index f066a765d00..84f56463a11 100644
--- a/Doc/library/sysconfig.rst
+++ b/Doc/library/sysconfig.rst
@@ -173,18 +173,15 @@ Other functions
 
    This is used mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name and
-   version and the architecture (as supplied by :func:`os.uname`), although the
-   exact information included depends on the OS; e.g. for IRIX the architecture
-   isn't particularly important (IRIX only runs on SGI hardware), but for Linux
-   the kernel version isn't particularly important.
+   version and the architecture (as supplied by 'os.uname()'), although the
+   exact information included depends on the OS; e.g., on Linux, the kernel
+   version isn't particularly important.
 
    Examples of returned values:
 
    - linux-i586
    - linux-alpha (?)
    - solaris-2.6-sun4u
-   - irix-5.3
-   - irix64-6.2
 
    Windows will return one of:
 
diff --git a/Lib/distutils/tests/test_unixccompiler.py b/Lib/distutils/tests/test_unixccompiler.py
index efba27e1c8a..eef702cf018 100644
--- a/Lib/distutils/tests/test_unixccompiler.py
+++ b/Lib/distutils/tests/test_unixccompiler.py
@@ -51,14 +51,6 @@ def gcv(v):
 
         sysconfig.get_config_var = old_gcv
 
-        # irix646
-        sys.platform = 'irix646'
-        self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo'])
-
-        # osf1V5
-        sys.platform = 'osf1V5'
-        self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo'])
-
         # GCC GNULD
         sys.platform = 'bar'
         def gcv(v):
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index 3f321c28dc3..ab4d4de1566 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -233,8 +233,6 @@ def runtime_library_dir_option(self, dir):
             if self._is_gcc(compiler):
                 return ["-Wl,+s", "-L" + dir]
             return ["+s", "-L" + dir]
-        elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
-            return ["-rpath", dir]
         else:
             if self._is_gcc(compiler):
                 # gcc on non-GNU systems does not need -Wl, but can
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index fdcf6fabae2..b8a69114c8f 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -16,21 +16,17 @@
 from distutils.errors import DistutilsByteCompileError
 
 def get_platform ():
-    """Return a string that identifies the current platform.  This is used
-    mainly to distinguish platform-specific build directories and
-    platform-specific built distributions.  Typically includes the OS name
-    and version and the architecture (as supplied by 'os.uname()'),
-    although the exact information included depends on the OS; eg. for IRIX
-    the architecture isn't particularly important (IRIX only runs on SGI
-    hardware), but for Linux the kernel version isn't particularly
-    important.
+    """Return a string that identifies the current platform.  This is used mainly to
+    distinguish platform-specific build directories and platform-specific built
+    distributions.  Typically includes the OS name and version and the
+    architecture (as supplied by 'os.uname()'), although the exact information
+    included depends on the OS; eg. on Linux, the kernel version isn't
+    particularly important.
 
     Examples of returned values:
        linux-i586
        linux-alpha (?)
        solaris-2.6-sun4u
-       irix-5.3
-       irix64-6.2
 
     Windows will return one of:
        win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
@@ -38,6 +34,7 @@ def get_platform ():
        win32 (all others - specifically, sys.platform is returned)
 
     For other non-POSIX platforms, currently just returns 'sys.platform'.
+
     """
     if os.name == 'nt':
         # sniff sys.version for architecture.
@@ -87,8 +84,6 @@ def get_platform ():
             bitness = {2147483647:"32bit", 9223372036854775807:"64bit"}
             machine += ".%s" % bitness[sys.maxsize]
         # fall through to standard osname-release-machine representation
-    elif osname[:4] == "irix":              # could be "irix64"!
-        return "%s-%s" % (osname, release)
     elif osname[:3] == "aix":
         return "%s-%s.%s" % (osname, version, release)
     elif osname[:6] == "cygwin":
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index e6618b1d518..fc3e03b2a2d 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -599,19 +599,15 @@ def get_platform():
     """Return a string that identifies the current platform.
 
     This is used mainly to distinguish platform-specific build directories and
-    platform-specific built distributions.  Typically includes the OS name
-    and version and the architecture (as supplied by 'os.uname()'),
-    although the exact information included depends on the OS; eg. for IRIX
-    the architecture isn't particularly important (IRIX only runs on SGI
-    hardware), but for Linux the kernel version isn't particularly
-    important.
+    platform-specific built distributions.  Typically includes the OS name and
+    version and the architecture (as supplied by 'os.uname()'), although the
+    exact information included depends on the OS; on Linux, the kernel version
+    isn't particularly important.
 
     Examples of returned values:
        linux-i586
        linux-alpha (?)
        solaris-2.6-sun4u
-       irix-5.3
-       irix64-6.2
 
     Windows will return one of:
        win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
@@ -619,6 +615,7 @@ def get_platform():
        win32 (all others - specifically, sys.platform is returned)
 
     For other non-POSIX platforms, currently just returns 'sys.platform'.
+
     """
     if os.name == 'nt':
         # sniff sys.version for architecture.
@@ -666,8 +663,6 @@ def get_platform():
             bitness = {2147483647:"32bit", 9223372036854775807:"64bit"}
             machine += ".%s" % bitness[sys.maxsize]
         # fall through to standard osname-release-machine representation
-    elif osname[:4] == "irix":              # could be "irix64"!
-        return "%s-%s" % (osname, release)
     elif osname[:3] == "aix":
         return "%s-%s.%s" % (osname, version, release)
     elif osname[:6] == "cygwin":
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py
index 15f88e4fcd7..b6e2ed51f61 100644
--- a/Lib/test/test_pty.py
+++ b/Lib/test/test_pty.py
@@ -24,12 +24,12 @@ def debug(msg):
 
 
 def normalize_output(data):
-    # Some operating systems do conversions on newline.  We could possibly
-    # fix that by doing the appropriate termios.tcsetattr()s.  I couldn't
-    # figure out the right combo on Tru64 and I don't have an IRIX box.
-    # So just normalize the output and doc the problem O/Ses by allowing
-    # certain combinations for some platforms, but avoid allowing other
-    # differences (like extra whitespace, trailing garbage, etc.)
+    # Some operating systems do conversions on newline.  We could possibly fix
+    # that by doing the appropriate termios.tcsetattr()s.  I couldn't figure out
+    # the right combo on Tru64.  So, just normalize the output and doc the
+    # problem O/Ses by allowing certain combinations for some platforms, but
+    # avoid allowing other differences (like extra whitespace, trailing garbage,
+    # etc.)
 
     # This is about the best we can do without getting some feedback
     # from someone more knowledgable.
@@ -38,7 +38,6 @@ def normalize_output(data):
     if data.endswith(b'\r\r\n'):
         return data.replace(b'\r\r\n', b'\n')
 
-    # IRIX apparently turns \n into \r\n.
     if data.endswith(b'\r\n'):
         return data.replace(b'\r\n', b'\n')
 
diff --git a/Lib/uuid.py b/Lib/uuid.py
index d4259ae0b3b..15a81f5c18b 100644
--- a/Lib/uuid.py
+++ b/Lib/uuid.py
@@ -399,7 +399,7 @@ def _lanscan_getnode():
 
 def _netstat_getnode():
     """Get the hardware address on Unix by running netstat."""
-    # This might work on AIX, Tru64 UNIX and presumably on IRIX.
+    # This might work on AIX, Tru64 UNIX.
     try:
         proc = _popen('netstat', '-ia')
         if not proc:
diff --git a/Misc/NEWS.d/next/Build/2017-09-04-14-43-46.bpo-31341.XLuZFk.rst b/Misc/NEWS.d/next/Build/2017-09-04-14-43-46.bpo-31341.XLuZFk.rst
new file mode 100644
index 00000000000..1429d8b0e7d
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2017-09-04-14-43-46.bpo-31341.XLuZFk.rst
@@ -0,0 +1 @@
+Per PEP 11, support for the IRIX operating system was removed.
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
index 97c36dbd5d4..dd533ef5c90 100644
--- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
@@ -350,9 +350,6 @@ _symtable symtablemodule.c
 # The library to link fpectl with is platform specific.
 # Choose *one* of the options below for fpectl:
 
-# For SGI IRIX (tested on 5.3):
-#fpectl fpectlmodule.c -lfpe
-
 # For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2):
 # (Without the compiler you don't have -lsunmath.)
 #fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm
diff --git a/Modules/fpectlmodule.c b/Modules/fpectlmodule.c
index 8e058037b0d..404f69269aa 100644
--- a/Modules/fpectlmodule.c
+++ b/Modules/fpectlmodule.c
@@ -111,29 +111,8 @@ static void fpe_reset(Sigfunc *handler)
      * handler for SIGFPE to the given handler.
      */
 
-/*-- IRIX -----------------------------------------------------------------*/
-#if defined(sgi)
-    /* See man page on handle_sigfpes -- must link with -lfpe
-     * My usage doesn't follow the man page exactly.  Maybe somebody
-     * else can explain handle_sigfpes to me....
-     * cc -c -I/usr/local/python/include fpectlmodule.c
-     * ld -shared -o fpectlmodule.so fpectlmodule.o -lfpe
-     */
-#include <sigfpe.h>
-    typedef void user_routine (unsigned[5], int[2]);
-    typedef void abort_routine (unsigned long);
-    handle_sigfpes(_OFF, 0,
-                 (user_routine *)0,
-                 _TURN_OFF_HANDLER_ON_ERROR,
-                 NULL);
-    handle_sigfpes(_ON, _EN_OVERFL | _EN_DIVZERO | _EN_INVALID,
-                 (user_routine *)0,
-                 _ABORT_ON_ERROR,
-                 NULL);
-    PyOS_setsig(SIGFPE, handler);
-
 /*-- SunOS and Solaris ----------------------------------------------------*/
-#elif defined(sun)
+#if defined(sun)
     /* References: ieee_handler, ieee_sun, ieee_functions, and ieee_flags
        man pages (SunOS or Solaris)
        cc -c -I/usr/local/python/include fpectlmodule.c
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index beadecfad50..37626e67cb0 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -268,10 +268,8 @@ if_indextoname(index) -- return the corresponding interface name\n\
 #include <netdb.h>
 #endif
 
-/* Irix 6.5 fails to define this variable at all. This is needed
-   for both GCC and SGI's compiler. I'd say that the SGI headers
-   are just busted. Same thing for Solaris. */
-#if (defined(__sgi) || defined(sun)) && !defined(INET_ADDRSTRLEN)
+/* Solaris fails to define this variable at all. */
+#if defined(sun) && !defined(INET_ADDRSTRLEN)
 #define INET_ADDRSTRLEN 16
 #endif
 
diff --git a/Tools/scripts/objgraph.py b/Tools/scripts/objgraph.py
index 1e1fce07dd5..3bb1712a9dc 100755
--- a/Tools/scripts/objgraph.py
+++ b/Tools/scripts/objgraph.py
@@ -2,8 +2,8 @@
 
 # objgraph
 #
-# Read "nm -o" input (on IRIX: "nm -Bo") of a set of libraries or modules
-# and print various interesting listings, such as:
+# Read "nm -o" input of a set of libraries or modules and print various
+# interesting listings, such as:
 #
 # - which names are used but not defined in the set (and used where),
 # - which names are defined in the set (and where),
@@ -15,7 +15,7 @@
 # -d: print callees per objectfile
 # -u: print usage of undefined symbols
 # If none of -cdu is specified, all are assumed.
-# Use "nm -o" to generate the input (on IRIX: "nm -Bo"),
+# Use "nm -o" to generate the input
 # e.g.: nm -o /lib/libc.a | objgraph
 
 
@@ -161,7 +161,7 @@ def main():
         print('-d: print callees per objectfile')
         print('-u: print usage of undefined symbols')
         print('If none of -cdu is specified, all are assumed.')
-        print('Use "nm -o" to generate the input (on IRIX: "nm -Bo"),')
+        print('Use "nm -o" to generate the input')
         print('e.g.: nm -o /lib/libc.a | objgraph')
         return 1
     optu = optc = optd = 0
diff --git a/configure b/configure
index 5b742b884dc..d2766bc435d 100755
--- a/configure
+++ b/configure
@@ -2994,12 +2994,6 @@ $as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
 
 
 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
-# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
-
-$as_echo "#define _BSD_TYPES 1" >>confdefs.h
-
-
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
 # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
 # them.
 
@@ -3298,7 +3292,6 @@ then
 	linux*) MACHDEP="linux";;
 	cygwin*) MACHDEP="cygwin";;
 	darwin*) MACHDEP="darwin";;
-	irix646) MACHDEP="irix6";;
 	'')	MACHDEP="unknown";;
     esac
 fi
@@ -9136,7 +9129,7 @@ fi
 $as_echo "$SHLIB_SUFFIX" >&6; }
 
 # LDSHARED is the ld *command* used to create shared library
-# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
+# -- "cc -G" on SunOS 5.x.
 # (Shared libraries in this instance are shared modules to be loaded into
 # Python, as opposed to building Python itself as a shared library.)
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
@@ -9148,8 +9141,6 @@ then
 		BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
 		LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
 		;;
-	IRIX/5*) LDSHARED="ld -shared";;
-	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
 	SunOS/5*)
 		if test "$GCC" = "yes" ; then
 			LDSHARED='$(CC) -shared'
@@ -9309,10 +9300,6 @@ then
 		then CCSHARED="-fPIC"
 		else CCSHARED="-Kpic -belf"
 		fi;;
-	IRIX*/6*)  case $CC in
-		   *gcc*) CCSHARED="-shared";;
-		   *) CCSHARED="";;
-		   esac;;
 	esac
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
diff --git a/configure.ac b/configure.ac
index 57f4492e484..4ceeea8d89c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,10 +134,6 @@ AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features]
 AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
 
 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
-# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
-AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])
-
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
 # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
 # them.
 AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])
@@ -406,7 +402,6 @@ then
 	linux*) MACHDEP="linux";;
 	cygwin*) MACHDEP="cygwin";;
 	darwin*) MACHDEP="darwin";;
-	irix646) MACHDEP="irix6";;
 	'')	MACHDEP="unknown";;
     esac
 fi
@@ -2402,7 +2397,7 @@ fi
 AC_MSG_RESULT($SHLIB_SUFFIX)
 
 # LDSHARED is the ld *command* used to create shared library
-# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
+# -- "cc -G" on SunOS 5.x.
 # (Shared libraries in this instance are shared modules to be loaded into
 # Python, as opposed to building Python itself as a shared library.)
 AC_MSG_CHECKING(LDSHARED)
@@ -2413,8 +2408,6 @@ then
 		BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
 		LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
 		;;
-	IRIX/5*) LDSHARED="ld -shared";;
-	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
 	SunOS/5*)
 		if test "$GCC" = "yes" ; then
 			LDSHARED='$(CC) -shared'
@@ -2572,10 +2565,6 @@ then
 		then CCSHARED="-fPIC"
 		else CCSHARED="-Kpic -belf"
 		fi;;
-	IRIX*/6*)  case $CC in
-		   *gcc*) CCSHARED="-shared";;
-		   *) CCSHARED="";;
-		   esac;;
 	esac
 fi
 AC_MSG_RESULT($CCSHARED)
diff --git a/pyconfig.h.in b/pyconfig.h.in
index a524204e755..2efd768a96a 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -1415,9 +1415,6 @@
 /* Define on OpenBSD to activate all library features */
 #undef _BSD_SOURCE
 
-/* Define on Irix to enable u_int */
-#undef _BSD_TYPES
-
 /* Define on Darwin to activate all library features */
 #undef _DARWIN_C_SOURCE
 



More information about the Python-checkins mailing list