Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / moz / patches / aix_build_fix.patch
blobd778532eeb448633049331fc0f573354abeb06f6
1 --- misc/mozilla/nsprpub/configure 2010-08-19 07:05:19.000000000 -0500
2 +++ misc/build/mozilla/nsprpub/configure 2010-08-19 07:34:33.000000000 -0500
3 @@ -2938,7 +2938,8 @@
4 #define SYSV 1
5 EOF
7 - DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
8 + MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@'
9 + DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib'
10 ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
11 echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
12 echo "configure:2944: checking for sys/atomic_op.h" >&5
13 @@ -3067,7 +3068,6 @@
14 AIX_LINK_OPTS='-brtl -bnso -berok'
16 esac
17 - CFLAGS="$CFLAGS -qro -qroconst"
18 AIX_WRAP='$(DIST)/lib/aixwrap.o'
19 AIX_TMP='./_aix_tmp.o'
20 if test -n "$USE_64"; then
21 --- misc/mozilla/nsprpub/configure.in 2010-08-19 07:05:19.000000000 -0500
22 +++ misc/build/mozilla/nsprpub/configure.in 2010-08-19 07:35:35.000000000 -0500
23 @@ -811,7 +811,8 @@
24 AC_DEFINE(XP_UNIX)
25 AC_DEFINE(AIX)
26 AC_DEFINE(SYSV)
27 - DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
28 + MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@'
29 + DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib'
30 AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
31 case "${target_os}" in
32 aix3.2*)
33 @@ -854,7 +855,6 @@
34 AIX_LINK_OPTS='-brtl -bnso -berok'
36 esac
37 - CFLAGS="$CFLAGS -qro -qroconst"
38 AIX_WRAP='$(DIST)/lib/aixwrap.o'
39 AIX_TMP='./_aix_tmp.o'
40 if test -n "$USE_64"; then
41 --- misc/mozilla/security/coreconf/AIX.mk 2010-08-19 07:04:11.000000000 -0500
42 +++ misc/build/mozilla/security/coreconf/AIX.mk 2010-08-19 07:38:42.000000000 -0500
43 @@ -62,35 +62,30 @@
45 DEFAULT_COMPILER = xlc_r
47 -CC = xlc_r
48 -CCC = xlC_r
49 +CCC = $(CXX)
51 CPU_ARCH = rs6000
53 RANLIB = ranlib
55 OS_CFLAGS = -DAIX -DSYSV
56 -OS_LIBS += -blibpath:/usr/lib:/lib -lc -lm
57 +OS_LIBS += -Wl,-blibpath:/usr/lib:/lib -lc -lm
59 -DSO_LDOPTS = -brtl -bnortllib -bM:SRE -bnoentry
60 -MKSHLIB = $(LD) $(DSO_LDOPTS) -blibpath:/usr/lib:/lib -lc -lm
61 +DSO_LDOPTS = -Wl,-brtl -Wl,-bnortllib
62 +MKSHLIB = $(CC) --shared $(DSO_LDOPTS) -Wl,-blibpath:/usr/lib:/lib -lc -lm
64 AIX_WRAP = $(DIST)/lib/aixwrap.o
65 AIX_TMP = $(OBJDIR)/_aix_tmp.o
67 ifdef MAPFILE
68 -DSO_LDOPTS += -bexport:$(MAPFILE)
69 +DSO_LDOPTS += -Wl,-bexport:$(MAPFILE)
70 else
71 -DSO_LDOPTS += -bexpall
72 +DSO_LDOPTS += -Wl,-bexpall
73 endif
75 PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
76 sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@
78 -ifdef BUILD_OPT
79 - OPTIMIZER += -qmaxmem=-1
80 -endif
82 ifeq ($(USE_64), 1)
83 OS_CFLAGS += -DAIX_64BIT
84 OBJECT_MODE=64
85 --- misc/mozilla/security/nss/cmd/platlibs.mk 2010-08-19 07:03:52.000000000 -0500
86 +++ misc/build/mozilla/security/nss/cmd/platlibs.mk 2010-08-19 07:39:10.000000000 -0500
87 @@ -154,7 +154,7 @@
88 $(NULL)
90 ifeq ($(OS_ARCH), AIX)
91 -EXTRA_SHARED_LIBS += -brtl
92 +EXTRA_SHARED_LIBS += -Wl,-brtl
93 endif
95 # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
96 @@ -207,7 +207,7 @@
97 $(NULL)
99 ifeq ($(OS_ARCH), AIX)
100 -EXTRA_SHARED_LIBS += -brtl
101 +EXTRA_SHARED_LIBS += -Wl,-brtl
102 endif
104 # If GNU ld is used, we must use the -rpath-link option to tell
105 --- misc/mozilla/security/nss/cmd/shlibsign/Makefile 2010-08-19 07:03:57.000000000 -0500
106 +++ misc/build/mozilla/security/nss/cmd/shlibsign/Makefile 2010-08-19 07:42:30.000000000 -0500
107 @@ -74,6 +74,10 @@
109 include $(CORE_DEPTH)/coreconf/rules.mk
111 +ifeq ($(OS), AIX)
112 +EXTRA_SHARED_LIBS += -lpthreads
113 +endif
115 #######################################################################
116 # (6) Execute "component" rules. (OPTIONAL) #
117 #######################################################################
118 --- misc/mozilla/security/nss/cmd/shlibsign/mangle/Makefile 2010-08-19 07:03:57.000000000 -0500
119 +++ misc/build/mozilla/security/nss/cmd/shlibsign/mangle/Makefile 2010-08-19 07:41:51.000000000 -0500
120 @@ -74,6 +74,8 @@
121 # (7) Execute "local" rules. (OPTIONAL). #
122 #######################################################################
124 +ifeq ($(OS), AIX)
125 +EXTRA_SHARED_LIBS += -lpthreads
126 +endif
128 include ../../platrules.mk
130 --- misc/mozilla/dbm/include/mcom_db.h 2010-08-19 08:39:18.000000000 -0500
131 +++ misc/build/mozilla/dbm/include/mcom_db.h 2010-08-19 08:39:45.000000000 -0500
132 @@ -88,7 +88,7 @@
134 #ifdef __DBINTERFACE_PRIVATE
136 -#ifdef HAVE_SYS_CDEFS_H
137 +#if defined(HAVE_SYS_CDEFS_H) && !defined(_AIX)
138 #include <sys/cdefs.h>
139 #else
140 #include "cdefs.h"
141 --- misc/mozilla/configure 2010-08-19 09:18:07.000000000 -0500
142 +++ misc/build/mozilla/configure 2010-08-19 09:11:35.000000000 -0500
143 @@ -5884,6 +5884,9 @@
144 CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'`
145 CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'`
147 + else
148 + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
149 + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
151 case "${target_os}" in
152 aix4.1*)
153 --- misc/mozilla/configure.in 2010-08-19 09:18:07.000000000 -0500
154 +++ misc/build/mozilla/configure.in 2010-08-19 09:10:46.000000000 -0500
155 @@ -1489,6 +1489,9 @@
156 CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'`
157 CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'`
159 + else
160 + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
161 + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
163 case "${target_os}" in
164 aix4.1*)
165 --- misc/mozilla/configure 2010-08-19 11:03:27.000000000 -0500
166 +++ misc/build/mozilla/configure 2010-08-19 11:05:38.000000000 -0500
167 @@ -5887,6 +5887,8 @@
168 else
169 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
170 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
171 + MOZ_FIX_LINK_PATHS=
172 + DSO_LDOPTS="$DSO_LDOPTS -Wl,-brtl"
174 case "${target_os}" in
175 aix4.1*)
176 --- misc/mozilla/configure.in 2010-08-19 11:03:36.000000000 -0500
177 +++ misc/build/mozilla/configure.in 2010-08-19 11:04:33.000000000 -0500
178 @@ -1492,6 +1492,9 @@
179 else
180 MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
181 MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
182 + AC_MSG_WARN([Clearing MOZ_FIX_LINK_PATHS till we can fix bug 332075.])
183 + MOZ_FIX_LINK_PATHS=
184 + DSO_LDOPTS="$DSO_LDOPTS -Wl,-brtl"
186 case "${target_os}" in
187 aix4.1*)
188 --- misc/mozilla/config/rules.mk 2010-08-20 04:09:51.000000000 -0500
189 +++ misc/build/mozilla/config/rules.mk 2010-08-20 05:02:37.000000000 -0500
190 @@ -488,8 +488,13 @@
191 ifeq ($(OS_ARCH),AIX)
192 ifdef IS_COMPONENT
193 ifneq ($(HAS_EXTRAEXPORTS),1)
194 +ifdef GNU_CC
195 +MKSHLIB += -Wl,-bE:$(MOZILLA_DIR)/build/unix/aix.exp -Wl,-bnoexpall
196 +MKCSHLIB += -Wl,-bE:$(MOZILLA_DIR)/build/unix/aix.exp -Wl,-bnoexpall
197 +else
198 MKSHLIB += -bE:$(MOZILLA_DIR)/build/unix/aix.exp -bnoexpall
199 MKCSHLIB += -bE:$(MOZILLA_DIR)/build/unix/aix.exp -bnoexpall
200 +endif # GNU_CXX
201 endif # HAS_EXTRAEXPORTS
202 endif # IS_COMPONENT
203 endif # AIX