components/python/python34/patches/03-setup.patch
author John Beck <John.Beck@Oracle.COM>
Fri, 06 Feb 2015 16:50:21 -0800
branchs11-update
changeset 3796 82cd21906ac2
parent 3778 35735ffdda43
child 3978 adf3ab1a234a
permissions -rw-r--r--
20494432 skip Python test_gdb for version 3.4

This patch modifies the setup script to support Solaris.
As it is Solaris-specific, it is not suitable for upstream.

--- Python-3.4.2/setup.py.~2~	2015-02-03 13:28:29.343641665 -0800
+++ Python-3.4.2/setup.py	2015-02-03 13:47:37.128749230 -0800
@@ -736,6 +736,13 @@
                                                      ['/usr/lib/termcap'],
                                                      'termcap'):
                 readline_libs.append('termcap')
+
+            if host_platform == 'sunos5':
+                # insert '-zrecord' before the readline libraries that we
+                # want to link with to avoid rl_insert() elimination
+                readline_extra_link_args = ('-Wl,-zrecord','-lreadline','-lncurses')
+                readline_libs = ()
+
             exts.append( Extension('readline', ['readline.c'],
                                    library_dirs=['/usr/lib/termcap'],
                                    extra_link_args=readline_extra_link_args,
@@ -759,7 +766,8 @@
 
         # socket(2)
         exts.append( Extension('_socket', ['socketmodule.c'],
-                               depends = ['socketmodule.h']) )
+                               depends = ['socketmodule.h'],
+                               libraries = ['socket', 'nsl']) )
         # Detect SSL support for the socket module (via _ssl)
         search_for_ssl_incs_in = [
                               '/usr/local/ssl/include',
@@ -1918,7 +1926,7 @@
             # this option. If you want to compile ctypes with the Sun
             # compiler, please research a proper solution, instead of
             # finding some -z option for the Sun compiler.
-            extra_link_args.append('-mimpure-text')
+            pass
 
         elif host_platform.startswith('hp-ux'):
             extra_link_args.append('-fPIC')