Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / python / Python-aix.patch
blob9c8f601b7bfdf511104c21496b190ad8a4fc3e5c
1 --- misc/Python-2.6.1/Makefile.pre.in 2010-09-10 05:00:44.000000000 -0500
2 +++ misc/build/Python-2.6.1/Makefile.pre.in 2010-09-10 05:16:02.000000000 -0500
3 @@ -412,7 +412,10 @@
5 libpython$(VERSION).so: $(LIBRARY_OBJS)
6 if test $(INSTSONAME) != $(LDLIBRARY); then \
7 - $(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
8 + if [ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" != "aix" ]; then \
9 + SONAME="-Wl,-h$(INSTSONAME)"; \
10 + fi; \
11 + $(LDSHARED) $(LDFLAGS) $(SONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
12 $(LN) -f $(INSTSONAME) $@; \
13 else\
14 $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
15 @@ -907,6 +907,8 @@
16 export PATH; PATH="`pwd`:$$PATH"; \
17 export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
18 export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
19 + export LD_LIBRARY_PATH; LD_LIBRARY_PATH="`pwd`${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"; \
20 + export LIBPATH; LIBPATH="`pwd`${LIBPATH:+:$LIBPATH}"; \
21 export EXE; EXE="$(BUILDEXE)"; \
22 cd $(srcdir)/Lib/$(PLATDIR); ./regen
24 --- misc/Python-2.6.1/Modules/Setup.dist 2010-08-19 07:03:46.000000000 -0500
25 +++ misc/build/Python-2.6.1/Modules/Setup.dist 2010-08-19 07:04:11.000000000 -0500
26 @@ -185,7 +185,7 @@
27 #datetime datetimemodule.c # date/time type
28 #_bisect _bisectmodule.c # Bisection algorithms
30 -#unicodedata unicodedata.c # static Unicode character database
31 +unicodedata unicodedata.c # static Unicode character database
33 # access to ISO C locale support
34 #_locale _localemodule.c # -lintl
35 --- misc/Python-2.6.1/Modules/_ctypes/libffi/fficonfig.py.in 2010-09-11 08:50:58.000000000 -0500
36 +++ misc/build/Python-2.6.1/Modules/_ctypes/libffi/fficonfig.py.in 2010-09-11 08:51:26.000000000 -0500
37 @@ -14,7 +14,7 @@
38 'M32R': ['src/m32r/sysv.S', 'src/m32r/ffi.c'],
39 'M68K': ['src/m68k/ffi.c', 'src/m68k/sysv.S'],
40 'POWERPC': ['src/powerpc/ffi.c', 'src/powerpc/sysv.S', 'src/powerpc/ppc_closure.S', 'src/powerpc/linux64.S', 'src/powerpc/linux64_closure.S'],
41 - 'POWERPC_AIX': ['src/powerpc/ffi.c', 'src/powerpc/aix.S', 'src/powerpc/aix_closure.S'],
42 + 'POWERPC_AIX': ['src/powerpc/ffi_darwin.c', 'src/powerpc/aix.S', 'src/powerpc/aix_closure.S'],
43 'POWERPC_FREEBSD': ['src/powerpc/ffi.c', 'src/powerpc/sysv.S', 'src/powerpc/ppc_closure.S'],
44 'ARM': ['src/arm/sysv.S', 'src/arm/ffi.c'],
45 'LIBFFI_CRIS': ['src/cris/sysv.S', 'src/cris/ffi.c'],
46 --- misc/Python-2.6.1/configure.in 2010-09-11 11:06:27.000000000 -0500
47 +++ misc/build/Python-2.6.1/configure.in 2010-09-11 11:25:42.000000000 -0500
48 @@ -415,8 +415,6 @@
49 without_gcc=$withval;;
50 esac], [
51 case $ac_sys_system in
52 - AIX*) CC=cc_r
53 - without_gcc=;;
54 BeOS*)
55 case $BE_HOST_CPU in
56 ppc)
57 @@ -704,10 +702,18 @@
58 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
59 INSTSONAME="$LDLIBRARY".$SOVERSION
61 - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
62 + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|AIX*)
63 LDLIBRARY='libpython$(VERSION).so'
64 - BLDLIBRARY='-L. -lpython$(VERSION)'
65 - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
66 + case $ac_sys_system in
67 + AIX*)
68 + BLDLIBRARY='-Wl,-brtl -L. -lpython$(VERSION)'
69 + RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
70 + ;;
71 + *)
72 + BLDLIBRARY='-L. -lpython$(VERSION)'
73 + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
74 + ;;
75 + esac
76 case $ac_sys_system in
77 FreeBSD*)
78 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
79 @@ -1607,8 +1613,13 @@
80 then
81 case $ac_sys_system/$ac_sys_release in
82 AIX*)
83 - BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
84 - LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
85 + if test "$GCC" = "yes"; then
86 + LDSHARED='$(CC) -shared'
87 + BLDSHARED='$(CC) -Wl,-brtl -shared'
88 + else
89 + BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
90 + LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
91 + fi
93 BeOS*)
94 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
95 --- misc/Python-2.6.1/configure 2010-09-11 11:06:27.000000000 -0500
96 +++ misc/build/Python-2.6.1/configure 2010-09-11 11:26:16.000000000 -0500
97 @@ -2266,8 +2266,6 @@
98 else
100 case $ac_sys_system in
101 - AIX*) CC=cc_r
102 - without_gcc=;;
103 BeOS*)
104 case $BE_HOST_CPU in
105 ppc)
106 @@ -4106,10 +4104,18 @@
107 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
108 INSTSONAME="$LDLIBRARY".$SOVERSION
110 - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
111 + Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|AIX*)
112 LDLIBRARY='libpython$(VERSION).so'
113 - BLDLIBRARY='-L. -lpython$(VERSION)'
114 - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
115 + case $ac_sys_system in
116 + AIX*)
117 + BLDLIBRARY='-Wl,-brtl -L. -lpython$(VERSION)'
118 + RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
119 + ;;
120 + *)
121 + BLDLIBRARY='-L. -lpython$(VERSION)'
122 + RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
123 + ;;
124 + esac
125 INSTSONAME="$LDLIBRARY".$SOVERSION
127 hp*|HP*)
128 @@ -4525,7 +4531,7 @@
129 # debug builds.
130 OPT="-g -Wall $STRICT_PROTO"
131 else
132 - OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
133 + OPT="$WRAP -O0 -Wall $STRICT_PROTO"
137 @@ -13012,8 +13018,13 @@
138 then
139 case $ac_sys_system/$ac_sys_release in
140 AIX*)
141 - BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
142 - LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
143 + if test "$GCC" = "yes"; then
144 + LDSHARED='$(CC) -shared'
145 + BLDSHARED='$(CC) -Wl,-brtl -shared'
146 + else
147 + BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
148 + LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
149 + fi
151 BeOS*)
152 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"