Skip to content

remove IRIX support (closes bpo-31341) #3310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions Doc/distutils/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.

Expand Down
9 changes: 3 additions & 6 deletions Doc/library/sysconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
8 changes: 0 additions & 8 deletions Lib/distutils/tests/test_unixccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions Lib/distutils/unixccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 7 additions & 12 deletions Lib/distutils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,25 @@
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)
win-ia64 (64bit Windows on Itanium)
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.
Expand Down Expand Up @@ -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":
Expand Down
15 changes: 5 additions & 10 deletions Lib/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,26 +599,23 @@ 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)
win-ia64 (64bit Windows on Itanium)
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.
Expand Down Expand Up @@ -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":
Expand Down
13 changes: 6 additions & 7 deletions Lib/test/test_pty.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion Lib/uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Per PEP 11, support for the IRIX operating system was removed.
3 changes: 0 additions & 3 deletions Modules/Setup.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 1 addition & 22 deletions Modules/fpectlmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions Tools/scripts/objgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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


Expand Down Expand Up @@ -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
Expand Down
15 changes: 1 addition & 14 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2993,12 +2993,6 @@ $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
$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.
Expand Down Expand Up @@ -3298,7 +3292,6 @@ then
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
irix646) MACHDEP="irix6";;
'') MACHDEP="unknown";;
esac
fi
Expand Down Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand Down
13 changes: 1 addition & 12 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features]
# them.
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.
Expand Down Expand Up @@ -406,7 +402,6 @@ then
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
irix646) MACHDEP="irix6";;
'') MACHDEP="unknown";;
esac
fi
Expand Down Expand Up @@ -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)
Expand All @@ -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'
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down