summaryrefslogtreecommitdiff
path: root/python3/python-3.3.0-aix.patch.1
blob: 1a2453196f3fe303d051d15abdbea2d20fc0f6d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
build with GCC on AIX

--- Python-3.3.0/configure	2012-11-28 09:05:45.990529603 +0000
+++ Python-3.3.0/configure	2012-11-28 09:06:23.037963934 +0000
@@ -3426,8 +3426,6 @@
 else
 
 	case $ac_sys_system in
-	AIX*)   CC=${CC:-xlc_r}
-		without_gcc=;;
 	*)	without_gcc=no;;
 	esac
 fi
@@ -5541,10 +5539,18 @@
 	      PY3LIBRARY=libpython3.so
 	  fi
           ;;
-    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
+    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)
 	  LDLIBRARY='libpython$(LDVERSION).so'
-	  BLDLIBRARY='-L. -lpython$(LDVERSION)'
-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+	  case $ac_sys_system in
+	    AIX*)
+	      BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
+	      RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
+	      ;;
+	    *)
+	      BLDLIBRARY='-L. -lpython$(LDVERSION)'
+	      RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+	      ;;
+	  esac
 	  INSTSONAME="$LDLIBRARY".$SOVERSION
 	  if test "$with_pydebug" != yes
           then
@@ -6169,7 +6175,7 @@
 		# debug builds.
 		OPT="-g -O0 -Wall $STRICT_PROTO"
 	    else
-		OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
+		OPT="$WRAP -O0 -Wall $STRICT_PROTO"
 	    fi
 	    ;;
 	*)
@@ -8301,8 +8307,13 @@
 then
 	case $ac_sys_system/$ac_sys_release in
 	AIX*)
-		BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
-		LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+		if test "$GCC" = "yes"; then
+		  LDSHARED='$(CC) -shared'
+		  BLDSHARED='$(CC) -Wl,-brtl -shared'
+		else
+		  BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
+		  LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+		fi
 		;;
 	IRIX/5*) LDSHARED="ld -shared";;
 	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
--- Python-3.3.0/configure.ac	2012-11-28 09:05:45.990529603 +0000
+++ Python-3.3.0/configure.ac	2012-11-28 09:06:23.038963946 +0000
@@ -545,8 +545,6 @@
 		without_gcc=$withval;;
 	esac], [
 	case $ac_sys_system in
-	AIX*)   CC=${CC:-xlc_r}
-		without_gcc=;;
 	*)	without_gcc=no;;
 	esac])
 AC_MSG_RESULT($without_gcc)
@@ -910,10 +908,18 @@
 	      PY3LIBRARY=libpython3.so
 	  fi
           ;;
-    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
+    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)
 	  LDLIBRARY='libpython$(LDVERSION).so'
-	  BLDLIBRARY='-L. -lpython$(LDVERSION)'
-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+	  case $ac_sys_system in
+	    AIX*)
+	      BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
+	      RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
+	      ;;
+	    *)
+	      BLDLIBRARY='-L. -lpython$(LDVERSION)'
+	      RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+	      ;;
+	  esac
 	  case $ac_sys_system in
 	      FreeBSD*)
 		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
@@ -1866,8 +1872,13 @@
 then
 	case $ac_sys_system/$ac_sys_release in
 	AIX*)
-		BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
-		LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+		if test "$GCC" = "yes"; then
+			LDSHARED='$(CC) -shared'
+			BLDSHARED='$(CC) -Wl,-brtl -shared'
+		else
+			BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
+			LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+		fi
 		;;
 	IRIX/5*) LDSHARED="ld -shared";;
 	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
--- Python-3.3.0/Makefile.pre.in	2012-11-28 09:05:45.861528086 +0000
+++ Python-3.3.0/Makefile.pre.in	2012-11-28 09:06:23.046964040 +0000
@@ -493,7 +493,10 @@
 
 libpython$(LDVERSION).so: $(LIBRARY_OBJS)
 	if test $(INSTSONAME) != $(LDLIBRARY); then \
-		$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+		if [ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" != "aix" ]; then \
+			SONAME="-Wl,-h$(INSTSONAME)"; \
+		fi; \
+		$(BLDSHARED) $(SONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
 		$(LN) -f $(INSTSONAME) $@; \
 	else \
 		$(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
@@ -1106,6 +1109,8 @@
 	export PATH; PATH="`pwd`:$$PATH"; \
 	export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
 	export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
+	export LD_LIBRARY_PATH; LD_LIBRARY_PATH="`pwd`${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"; \
+	export LIBPATH; LIBPATH="`pwd`${LIBPATH:+:$LIBPATH}"; \
 	export EXE; EXE="$(BUILDEXE)"; \
 	cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
 
--- Python-3.3.0/Modules/_ctypes/libffi/fficonfig.py.in	2012-11-28 09:05:45.889528418 +0000
+++ Python-3.3.0/Modules/_ctypes/libffi/fficonfig.py.in	2012-11-28 09:06:23.046964040 +0000
@@ -16,7 +16,7 @@
     'M32R': ['src/m32r/sysv.S', 'src/m32r/ffi.c'],
     'M68K': ['src/m68k/ffi.c', 'src/m68k/sysv.S'],
     'POWERPC': ['src/powerpc/ffi.c', 'src/powerpc/sysv.S', 'src/powerpc/ppc_closure.S', 'src/powerpc/linux64.S', 'src/powerpc/linux64_closure.S'],
-    'POWERPC_AIX': ['src/powerpc/ffi.c', 'src/powerpc/aix.S', 'src/powerpc/aix_closure.S'],
+    'POWERPC_AIX': ['src/powerpc/ffi_darwin.c', 'src/powerpc/aix.S', 'src/powerpc/aix_closure.S'],
     'POWERPC_FREEBSD': ['src/powerpc/ffi.c', 'src/powerpc/sysv.S', 'src/powerpc/ppc_closure.S'],
     'ARM': ['src/arm/sysv.S', 'src/arm/ffi.c'],
     'LIBFFI_CRIS': ['src/cris/sysv.S', 'src/cris/ffi.c'],
--- Python-3.3.0/Modules/Setup.dist	2012-11-28 09:05:45.935528957 +0000
+++ Python-3.3.0/Modules/Setup.dist	2012-11-28 09:06:23.052964111 +0000
@@ -177,7 +177,7 @@
 #_bisect _bisectmodule.c	# Bisection algorithms
 #_heapq _heapqmodule.c	# Heap queue algorithm
 
-#unicodedata unicodedata.c    # static Unicode character database
+unicodedata unicodedata.c    # static Unicode character database
 
 
 # Modules with some UNIX dependencies -- on by default: