[Libreoffice-commits] .: 9 commits - berkeleydb/db-aix.patch berkeleydb/makefile.mk curl/curl-aix.patch curl/makefile.mk hunspell/makefile.mk icu/icu4c-aix.patch icu/makefile.mk libxml2/libxml2-aix.patch libxml2/makefile.mk libxslt/libxslt-aix.patch libxslt/makefile.mk libxslt/prj moz/extractfiles.mk moz/makefile.mk moz/patches nss/makefile.mk nss/nss.aix.patch python/makefile.mk python/prj python/Python-aix.patch

Caolán McNamara caolan at kemper.freedesktop.org
Thu Oct 14 02:59:03 PDT 2010


 berkeleydb/db-aix.patch         |  205 ++++++++++++++++++++++++++++++++++++++++
 berkeleydb/makefile.mk          |    4 
 curl/curl-aix.patch             |   21 ++++
 curl/makefile.mk                |    8 +
 hunspell/makefile.mk            |    4 
 icu/icu4c-aix.patch             |  155 ++++++++++++++++++++++++++++++
 icu/makefile.mk                 |    9 +
 libxml2/libxml2-aix.patch       |   21 ++++
 libxml2/makefile.mk             |    4 
 libxslt/libxslt-aix.patch       |   21 ++++
 libxslt/makefile.mk             |    7 -
 libxslt/prj/d.lst               |    3 
 moz/extractfiles.mk             |    2 
 moz/makefile.mk                 |    8 +
 moz/patches/aix_build_fix.patch |  203 +++++++++++++++++++++++++++++++++++++++
 nss/makefile.mk                 |    2 
 nss/nss.aix.patch               |  143 +++++++++++++++++++++++++++
 python/Python-aix.patch         |  151 +++++++++++++++++++++++++++++
 python/makefile.mk              |   10 +
 python/prj/d.lst                |    6 +
 20 files changed, 975 insertions(+), 12 deletions(-)

New commits:
commit 567359dad47bff1551feb479d4e66bff74457d95
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 14:42:06 2010 +0100

    get this to build on AIX

diff --git a/python/Python-aix.patch b/python/Python-aix.patch
new file mode 100644
index 0000000..8dae6d1
--- /dev/null
+++ b/python/Python-aix.patch
@@ -0,0 +1,151 @@
+--- misc/Python-2.6.1/Makefile.pre.in	2010-09-10 05:00:44.000000000 -0500
++++ misc/build/Python-2.6.1/Makefile.pre.in	2010-09-10 05:16:02.000000000 -0500
+@@ -412,7 +412,10 @@
+ 
+ libpython$(VERSION).so: $(LIBRARY_OBJS)
+ 	if test $(INSTSONAME) != $(LDLIBRARY); then \
+-		$(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
++		if [ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" != "aix" ]; then \
++			SONAME="-Wl,-h$(INSTSONAME)"; \
++		fi; \
++		$(LDSHARED) $(LDFLAGS) $(SONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+ 		$(LN) -f $(INSTSONAME) $@; \
+ 	else\
+ 		$(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+@@ -907,6 +907,7 @@
+ 	export PATH; PATH="`pwd`:$$PATH"; \
+ 	export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
+ 	export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
++	export LIBPATH; LIBPATH="`pwd`${LIBPATH:+:$LIBPATH}"; \
+ 	export EXE; EXE="$(BUILDEXE)"; \
+ 	cd $(srcdir)/Lib/$(PLATDIR); ./regen
+ 
+--- misc/Python-2.6.1/Modules/Setup.dist	2010-08-19 07:03:46.000000000 -0500
++++ misc/build/Python-2.6.1/Modules/Setup.dist	2010-08-19 07:04:11.000000000 -0500
+@@ -185,7 +185,7 @@
+ #datetime datetimemodule.c	# date/time type
+ #_bisect _bisectmodule.c	# Bisection algorithms
+ 
+-#unicodedata unicodedata.c    # static Unicode character database
++unicodedata unicodedata.c    # static Unicode character database
+ 
+ # access to ISO C locale support
+ #_locale _localemodule.c  # -lintl
+--- misc/Python-2.6.1/Modules/_ctypes/libffi/fficonfig.py.in	2010-09-11 08:50:58.000000000 -0500
++++ misc/build/Python-2.6.1/Modules/_ctypes/libffi/fficonfig.py.in	2010-09-11 08:51:26.000000000 -0500
+@@ -14,7 +14,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'],
+--- misc/Python-2.6.1/configure.in	2010-09-11 11:06:27.000000000 -0500
++++ misc/build/Python-2.6.1/configure.in	2010-09-11 11:25:42.000000000 -0500
+@@ -415,8 +415,6 @@
+ 		without_gcc=$withval;;
+ 	esac], [
+ 	case $ac_sys_system in
+-	AIX*)   CC=cc_r
+-		without_gcc=;;
+ 	BeOS*)
+ 		case $BE_HOST_CPU in
+ 		ppc)
+@@ -704,10 +702,18 @@
+ 	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ 	  INSTSONAME="$LDLIBRARY".$SOVERSION
+           ;;
+-    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
++    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|AIX*)
+ 	  LDLIBRARY='libpython$(VERSION).so'
+-	  BLDLIBRARY='-L. -lpython$(VERSION)'
+-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
++	  case $ac_sys_system in
++	    AIX*)
++	      BLDLIBRARY='-Wl,-brtl -L. -lpython$(VERSION)'
++	      RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
++	      ;;
++	    *)
++	      BLDLIBRARY='-L. -lpython$(VERSION)'
++	      RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
++	      ;;
++	  esac
+ 	  case $ac_sys_system in
+ 	      FreeBSD*)
+ 		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
+@@ -1607,8 +1613,13 @@
+ then
+ 	case $ac_sys_system/$ac_sys_release in
+ 	AIX*)
+-		BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI: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:Modules/python.exp"
++			LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
++		fi
+ 		;;
+ 	BeOS*)
+ 		BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
+--- misc/Python-2.6.1/configure	2010-09-11 11:06:27.000000000 -0500
++++ misc/build/Python-2.6.1/configure	2010-09-11 11:26:16.000000000 -0500
+@@ -2266,8 +2266,6 @@
+ else
+ 
+ 	case $ac_sys_system in
+-	AIX*)   CC=cc_r
+-		without_gcc=;;
+ 	BeOS*)
+ 		case $BE_HOST_CPU in
+ 		ppc)
+@@ -4106,10 +4104,18 @@
+ 	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ 	  INSTSONAME="$LDLIBRARY".$SOVERSION
+           ;;
+-    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
++    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|AIX*)
+ 	  LDLIBRARY='libpython$(VERSION).so'
+-	  BLDLIBRARY='-L. -lpython$(VERSION)'
+-	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
++	  case $ac_sys_system in
++	    AIX*)
++	      BLDLIBRARY='-Wl,-brtl -L. -lpython$(VERSION)'
++	      RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
++	      ;;
++	    *)
++	      BLDLIBRARY='-L. -lpython$(VERSION)'
++	      RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
++	      ;;
++	  esac
+ 	  INSTSONAME="$LDLIBRARY".$SOVERSION
+ 	  ;;
+     hp*|HP*)
+@@ -4525,7 +4531,7 @@
+ 		# debug builds.
+ 		OPT="-g -Wall $STRICT_PROTO"
+ 	    else
+-		OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
++		OPT="$WRAP -O0 -Wall $STRICT_PROTO"
+ 	    fi
+ 	    ;;
+ 	*)
+@@ -13012,8 +13018,13 @@
+ then
+ 	case $ac_sys_system/$ac_sys_release in
+ 	AIX*)
+-		BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI: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:Modules/python.exp"
++		  LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
++		fi
+ 		;;
+ 	BeOS*)
+ 		BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
diff --git a/python/makefile.mk b/python/makefile.mk
index ddc3869..9250ebc 100644
--- a/python/makefile.mk
+++ b/python/makefile.mk
@@ -49,7 +49,8 @@ TARFILE_NAME=Python-$(PYVERSION)
 TARFILE_MD5=e81c2f0953aa60f8062c05a4673f2be0
 PATCH_FILES=\
     Python-$(PYVERSION).patch \
-    Python-ssl.patch
+    Python-ssl.patch \
+    Python-aix.patch
 
 CONFIGURE_DIR=
 
@@ -75,10 +76,17 @@ CC+:=$(ARCH_FLAGS)
 python_LDFLAGS+=$(ARCH_FLAGS)
 .ENDIF
 
+.IF "$(OS)"=="AIX"
+python_CFLAGS=-g0
+.ENDIF
+
 CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) ./configure --prefix=$(MYCWD)/python-inst --enable-shared CFLAGS="$(python_CFLAGS)" LDFLAGS="$(python_LDFLAGS)"
 .IF "$(OS)$(CPU)" == "SOLARISI"
 CONFIGURE_ACTION += --disable-ipv6
 .ENDIF
+.IF "$(OS)"=="AIX"
+CONFIGURE_ACTION += --disable-ipv6 --with-threads
+.ENDIF
 BUILD_ACTION=$(ENV_BUILD) $(GNUMAKE) -j$(EXTMAXPROCESS) && $(GNUMAKE) install && chmod -R ug+w $(MYCWD)/python-inst && chmod g+w Include
 .ELSE
 # ----------------------------------
diff --git a/python/prj/d.lst b/python/prj/d.lst
index 3c7c3f8..075b17e 100644
--- a/python/prj/d.lst
+++ b/python/prj/d.lst
@@ -19,6 +19,9 @@ mkdir: %_DEST%\lib%_EXT%\python\xml\sax
 mkdir: %_DEST%\lib%_EXT%\python\xml\etree
 mkdir: %_DEST%\lib%_EXT%\python\curses
 mkdir: %_DEST%\lib%_EXT%\python\plat-linux2
+mkdir: %_DEST%\lib%_EXT%\python\plat-aix5
+mkdir: %_DEST%\lib%_EXT%\python\plat-aix6
+mkdir: %_DEST%\lib%_EXT%\python\plat-aix7
 mkdir: %_DEST%\lib%_EXT%\python\config
 mkdir: %_DEST%\lib%_EXT%\python\lib-dynload
 mkdir: %_DEST%\lib%_EXT%\python\bsddb
@@ -54,6 +57,9 @@ mkdir: %_DEST%\lib%_EXT%\python\ctypes\macholib
 ..\%__SRC%\misc\build\Python-2.6.1\Lib\xml\sax\* %_DEST%\lib%_EXT%\python\xml\sax\*
 ..\%__SRC%\misc\build\Python-2.6.1\Lib\curses\* %_DEST%\lib%_EXT%\python\curses\*
 ..\%__SRC%\misc\build\Python-2.6.1\Lib\plat-linux2\* %_DEST%\lib%_EXT%\python\plat-linux2\*
+..\%__SRC%\misc\build\Python-2.6.1\Lib\plat-aix5\* %_DEST%\lib%_EXT%\python\plat-aix5\*
+..\%__SRC%\misc\build\Python-2.6.1\Lib\plat-aix6\* %_DEST%\lib%_EXT%\python\plat-aix6\*
+..\%__SRC%\misc\build\Python-2.6.1\Lib\plat-aix7\* %_DEST%\lib%_EXT%\python\plat-aix7\*
 ..\%__SRC%\misc\build\Python-2.6.1\Lib\config\* %_DEST%\lib%_EXT%\python\config\*
 ..\%__SRC%\misc\build\Python-2.6.1\Lib\bsddb\* %_DEST%\lib%_EXT%\python\bsddb\*
 ..\%__SRC%\misc\build\Python-2.6.1\Lib\logging\* %_DEST%\lib%_EXT%\python\logging\*
commit 679328d6b6037efa285414f111d709e9a57d953e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:59:28 2010 +0100

    tweak this to build on AIX

diff --git a/nss/makefile.mk b/nss/makefile.mk
index 22b126a..1797c25 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -44,7 +44,7 @@ all:
 TARFILE_NAME=nss-3.12.6-with-nspr-4.8.4
 TARFILE_MD5=b92261a5679276c400555004937af965
 TARFILE_ROOTDIR=nss-3.12.6
-PATCH_FILES=nss.patch
+PATCH_FILES=nss.patch nss.aix.patch
 
 .IF "$(OS)"=="MACOSX"
 PATCH_FILES+=nss_macosx.patch
diff --git a/nss/nss.aix.patch b/nss/nss.aix.patch
new file mode 100644
index 0000000..2f2d28e
--- /dev/null
+++ b/nss/nss.aix.patch
@@ -0,0 +1,143 @@
+--- misc/nss-3.12.6/mozilla/nsprpub/configure	2010-08-18 07:23:01.000000000 -0500
++++ misc/build/nss-3.12.6/mozilla/nsprpub/configure	2010-08-18 07:33:11.000000000 -0500
+@@ -2973,7 +2973,8 @@
+ #define SYSV 1
+ EOF
+ 
+-    DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
++    MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@'
++    DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib'
+     ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
+ echo "configure:2980: checking for sys/atomic_op.h" >&5
+@@ -3102,7 +3103,6 @@
+         AIX_LINK_OPTS='-brtl -bnso -berok'
+         ;;
+     esac
+-    CFLAGS="$CFLAGS -qro -qroconst"
+     AIX_WRAP='$(DIST)/lib/aixwrap.o'
+     AIX_TMP='./_aix_tmp.o'
+     if test -n "$USE_64"; then
+--- misc/nss-3.12.6/mozilla/nsprpub/configure.in	2010-08-18 07:23:01.000000000 -0500
++++ misc/build/nss-3.12.6/mozilla/nsprpub/configure.in	2010-08-18 07:32:36.000000000 -0500
+@@ -831,7 +831,8 @@
+     AC_DEFINE(XP_UNIX)
+     AC_DEFINE(AIX)
+     AC_DEFINE(SYSV)
+-    DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
++    DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib'
++    MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@'
+     AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
+     case "${target_os}" in
+     aix3.2*)
+@@ -871,10 +872,9 @@
+         AC_DEFINE(HAVE_SOCKLEN_T)
+         AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
+         USE_IPV6=1
+-        AIX_LINK_OPTS='-brtl -bnso -berok'
++        AIX_LINK_OPTS='-Wl,-brtl -Wl,-bnso -Wl,-berok'
+         ;;
+     esac
+-    CFLAGS="$CFLAGS -qro -qroconst"
+     AIX_WRAP='$(DIST)/lib/aixwrap.o'
+     AIX_TMP='./_aix_tmp.o'
+     if test -n "$USE_64"; then
+--- misc/nss-3.12.6/mozilla/nsprpub/pr/src/Makefile.in	2010-08-18 07:23:04.000000000 -0500
++++ misc/build/nss-3.12.6/mozilla/nsprpub/pr/src/Makefile.in	2010-08-18 07:24:49.000000000 -0500
+@@ -110,7 +110,6 @@
+ endif
+ 
+ ifeq ($(OS_ARCH),AIX)
+-DSO_LDOPTS	+= -binitfini::_PR_Fini
+ OS_LIBS		= -lodm -lcfg
+ ifeq ($(CLASSIC_NSPR),1)
+ ifeq ($(OS_RELEASE),4.1)
+--- misc/nss-3.12.6/mozilla/security/coreconf/AIX.mk	2010-08-18 07:23:06.000000000 -0500
++++ misc/build/nss-3.12.6/mozilla/security/coreconf/AIX.mk	2010-08-18 07:26:26.000000000 -0500
+@@ -62,35 +62,30 @@
+ 
+ DEFAULT_COMPILER = xlc_r
+ 
+-CC		= xlc_r
+-CCC		= xlC_r
++CCC		= $(CXX)
+ 
+ CPU_ARCH	= rs6000
+ 
+ RANLIB		= ranlib
+ 
+ OS_CFLAGS	= -DAIX -DSYSV
+-OS_LIBS 	+= -blibpath:/usr/lib:/lib -lc -lm
++OS_LIBS 	+= -Wl,-blibpath:/usr/lib:/lib -lc -lm
+ 
+-DSO_LDOPTS	= -brtl -bnortllib -bM:SRE -bnoentry
+-MKSHLIB 	= $(LD) $(DSO_LDOPTS) -blibpath:/usr/lib:/lib -lc -lm
++DSO_LDOPTS	= -Wl,-brtl -Wl,-bnortllib
++MKSHLIB 	= $(CC) --shared $(DSO_LDOPTS) -Wl,-blibpath:/usr/lib:/lib -lc -lm
+ 
+ AIX_WRAP	= $(DIST)/lib/aixwrap.o
+ AIX_TMP		= $(OBJDIR)/_aix_tmp.o
+ 
+ ifdef MAPFILE
+-DSO_LDOPTS	+= -bexport:$(MAPFILE)
++DSO_LDOPTS	+= -Wl,-bexport:$(MAPFILE)
+ else
+-DSO_LDOPTS	+= -bexpall
++DSO_LDOPTS	+= -Wl,-bexpall
+ endif
+ 
+ PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
+                 sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@
+ 
+-ifdef BUILD_OPT
+-	OPTIMIZER += -qmaxmem=-1
+-endif
+-
+ ifeq ($(USE_64), 1)
+ 	OS_CFLAGS	+= -DAIX_64BIT
+ 	OBJECT_MODE=64
+--- misc/nss-3.12.6/mozilla/security/nss/cmd/platlibs.mk	2010-08-18 07:23:18.000000000 -0500
++++ misc/build/nss-3.12.6/mozilla/security/nss/cmd/platlibs.mk	2010-08-18 07:26:48.000000000 -0500
+@@ -173,7 +173,7 @@
+ 	$(NULL)
+ 
+ ifeq ($(OS_ARCH), AIX) 
+-EXTRA_SHARED_LIBS += -brtl 
++EXTRA_SHARED_LIBS += -Wl,-brtl 
+ endif
+ 
+ # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
+@@ -223,7 +223,7 @@
+ 	$(NULL)
+ 
+ ifeq ($(OS_ARCH), AIX) 
+-EXTRA_SHARED_LIBS += -brtl 
++EXTRA_SHARED_LIBS += -Wl,-brtl 
+ endif
+ 
+ # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
+--- misc/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/mangle/Makefile	2010-08-18 07:23:20.000000000 -0500
++++ misc/build/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/mangle/Makefile	2010-08-18 07:42:44.000000000 -0500
+@@ -75,7 +75,9 @@
+ 
+ endif
+ 
+-
++ifeq ($(OS), AIX)
++EXTRA_SHARED_LIBS += -lpthreads
++endif
+ 
+ #######################################################################
+ # (5) Execute "global" rules. (OPTIONAL)                              #
+--- misc/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/Makefile	2010-08-18 08:00:17.000000000 -0500
++++ misc/build/nss-3.12.6/mozilla/security/nss/cmd/shlibsign/Makefile	2010-08-18 07:55:55.000000000 -0500
+@@ -75,6 +75,9 @@
+ 
+ endif
+ 
++ifeq ($(OS), AIX)
++EXTRA_SHARED_LIBS += -lpthreads
++endif
+ 
+ # sign any and all shared libraries that contain the word freebl
+ 
commit 384cb0a50aba8f57beb9a4b0ebb6537ed623b347
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:50:42 2010 +0100

    tweak this to build in AIX

diff --git a/moz/extractfiles.mk b/moz/extractfiles.mk
index dedfade..faba88b 100644
--- a/moz/extractfiles.mk
+++ b/moz/extractfiles.mk
@@ -342,7 +342,7 @@ $(MISC)$/build$/so_moz_runtime_files: 	$(OUT)$/bin$/mozruntime.zip
     echo >& $(NULLDEV)
 
 .IF "$(GUI)"=="UNX"
-.IF "$(OS)"!="MACOSX"
+.IF "$(OS)"!="MACOSX" && "$(OS)"!="AIX"
     cd $(RUNTIME_DIR) && strip *$(DLLPOST)
     cd $(RUNTIME_DIR)$/components && strip *$(DLLPOST)
 .ENDIF
diff --git a/moz/makefile.mk b/moz/makefile.mk
index feb2c50..49e9b41 100644
--- a/moz/makefile.mk
+++ b/moz/makefile.mk
@@ -52,6 +52,11 @@ LD_LIBRARY_PATH!:=$(LD_LIBRARY_PATH)$(PATH_SEPERATOR)$(PKGCONFIG_ROOT)$/lib
 DISABLE_MOZ_EXECUTABLE=TRUE
 .EXPORT : DISABLE_MOZ_EXECUTABLE
 
+.IF "$(OS)"=="AIX"
+LDFLAGS+:=$(LINKFLAGS) $(LINKFLAGSRUNPATH_OOO)
+.EXPORT : LDFLAGS
+.ENDIF
+
 .IF "$(SYSBASE)"!="" && "$(OS)" == "LINUX"
 ## hmm... rather gcc specific switches...
 CFLAGS:=-isystem $(SYSBASE)/usr/include -B$(SYSBASE)/usr/lib
@@ -87,7 +92,8 @@ PATCH_FILES = \
     patches/respect_disable_pango.patch \
     patches/arm_build_fix.patch \
     patches/link_fontconfig.patch \
-    patches/brokenmakefile.patch
+    patches/brokenmakefile.patch \
+    patches/aix_build_fix.patch
 
 # This file is needed for the W32 build when BUILD_MOZAB is set
 # (currently only vc8/vs2005 is supported when BUILD_MOZAB is set)
diff --git a/moz/patches/aix_build_fix.patch b/moz/patches/aix_build_fix.patch
new file mode 100644
index 0000000..d778532
--- /dev/null
+++ b/moz/patches/aix_build_fix.patch
@@ -0,0 +1,203 @@
+--- misc/mozilla/nsprpub/configure	2010-08-19 07:05:19.000000000 -0500
++++ misc/build/mozilla/nsprpub/configure	2010-08-19 07:34:33.000000000 -0500
+@@ -2938,7 +2938,8 @@
+ #define SYSV 1
+ EOF
+ 
+-    DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
++    MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@'
++    DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib'
+     ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
+ echo "configure:2944: checking for sys/atomic_op.h" >&5
+@@ -3067,7 +3068,6 @@
+         AIX_LINK_OPTS='-brtl -bnso -berok'
+         ;;
+     esac
+-    CFLAGS="$CFLAGS -qro -qroconst"
+     AIX_WRAP='$(DIST)/lib/aixwrap.o'
+     AIX_TMP='./_aix_tmp.o'
+     if test -n "$USE_64"; then
+--- misc/mozilla/nsprpub/configure.in	2010-08-19 07:05:19.000000000 -0500
++++ misc/build/mozilla/nsprpub/configure.in	2010-08-19 07:35:35.000000000 -0500
+@@ -811,7 +811,8 @@
+     AC_DEFINE(XP_UNIX)
+     AC_DEFINE(AIX)
+     AC_DEFINE(SYSV)
+-    DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
++    MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@'
++    DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib'
+     AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
+     case "${target_os}" in
+     aix3.2*)
+@@ -854,7 +855,6 @@
+         AIX_LINK_OPTS='-brtl -bnso -berok'
+         ;;
+     esac
+-    CFLAGS="$CFLAGS -qro -qroconst"
+     AIX_WRAP='$(DIST)/lib/aixwrap.o'
+     AIX_TMP='./_aix_tmp.o'
+     if test -n "$USE_64"; then
+--- misc/mozilla/security/coreconf/AIX.mk	2010-08-19 07:04:11.000000000 -0500
++++ misc/build/mozilla/security/coreconf/AIX.mk	2010-08-19 07:38:42.000000000 -0500
+@@ -62,35 +62,30 @@
+ 
+ DEFAULT_COMPILER = xlc_r
+ 
+-CC		= xlc_r
+-CCC		= xlC_r
++CCC		= $(CXX)
+ 
+ CPU_ARCH	= rs6000
+ 
+ RANLIB		= ranlib
+ 
+ OS_CFLAGS	= -DAIX -DSYSV
+-OS_LIBS 	+= -blibpath:/usr/lib:/lib -lc -lm
++OS_LIBS 	+= -Wl,-blibpath:/usr/lib:/lib -lc -lm
+ 
+-DSO_LDOPTS	= -brtl -bnortllib -bM:SRE -bnoentry
+-MKSHLIB 	= $(LD) $(DSO_LDOPTS) -blibpath:/usr/lib:/lib -lc -lm
++DSO_LDOPTS	= -Wl,-brtl -Wl,-bnortllib
++MKSHLIB 	= $(CC) --shared $(DSO_LDOPTS) -Wl,-blibpath:/usr/lib:/lib -lc -lm
+ 
+ AIX_WRAP	= $(DIST)/lib/aixwrap.o
+ AIX_TMP		= $(OBJDIR)/_aix_tmp.o
+ 
+ ifdef MAPFILE
+-DSO_LDOPTS	+= -bexport:$(MAPFILE)
++DSO_LDOPTS	+= -Wl,-bexport:$(MAPFILE)
+ else
+-DSO_LDOPTS	+= -bexpall
++DSO_LDOPTS	+= -Wl,-bexpall
+ endif
+ 
+ PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
+                 sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@
+ 
+-ifdef BUILD_OPT
+-	OPTIMIZER += -qmaxmem=-1
+-endif
+-
+ ifeq ($(USE_64), 1)
+ 	OS_CFLAGS	+= -DAIX_64BIT
+ 	OBJECT_MODE=64
+--- misc/mozilla/security/nss/cmd/platlibs.mk	2010-08-19 07:03:52.000000000 -0500
++++ misc/build/mozilla/security/nss/cmd/platlibs.mk	2010-08-19 07:39:10.000000000 -0500
+@@ -154,7 +154,7 @@
+ 	$(NULL)
+ 
+ ifeq ($(OS_ARCH), AIX) 
+-EXTRA_SHARED_LIBS += -brtl 
++EXTRA_SHARED_LIBS += -Wl,-brtl 
+ endif
+ 
+ # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
+@@ -207,7 +207,7 @@
+ 	$(NULL)
+ 
+ ifeq ($(OS_ARCH), AIX) 
+-EXTRA_SHARED_LIBS += -brtl 
++EXTRA_SHARED_LIBS += -Wl,-brtl 
+ endif
+ 
+ # If GNU ld is used, we must use the -rpath-link option to tell
+--- misc/mozilla/security/nss/cmd/shlibsign/Makefile	2010-08-19 07:03:57.000000000 -0500
++++ misc/build/mozilla/security/nss/cmd/shlibsign/Makefile	2010-08-19 07:42:30.000000000 -0500
+@@ -74,6 +74,10 @@
+ 
+ include $(CORE_DEPTH)/coreconf/rules.mk
+ 
++ifeq ($(OS), AIX)
++EXTRA_SHARED_LIBS += -lpthreads
++endif
++
+ #######################################################################
+ # (6) Execute "component" rules. (OPTIONAL)                           #
+ #######################################################################
+--- misc/mozilla/security/nss/cmd/shlibsign/mangle/Makefile	2010-08-19 07:03:57.000000000 -0500
++++ misc/build/mozilla/security/nss/cmd/shlibsign/mangle/Makefile	2010-08-19 07:41:51.000000000 -0500
+@@ -74,6 +74,8 @@
+ # (7) Execute "local" rules. (OPTIONAL).                              #
+ #######################################################################
+ 
++ifeq ($(OS), AIX)
++EXTRA_SHARED_LIBS += -lpthreads
++endif
+ 
+ include ../../platrules.mk
+-
+--- misc/mozilla/dbm/include/mcom_db.h	2010-08-19 08:39:18.000000000 -0500
++++ misc/build/mozilla/dbm/include/mcom_db.h	2010-08-19 08:39:45.000000000 -0500
+@@ -88,7 +88,7 @@
+ 
+ #ifdef __DBINTERFACE_PRIVATE
+ 
+-#ifdef HAVE_SYS_CDEFS_H
++#if defined(HAVE_SYS_CDEFS_H) && !defined(_AIX)
+ #include <sys/cdefs.h>
+ #else
+ #include "cdefs.h"
+--- misc/mozilla/configure	2010-08-19 09:18:07.000000000 -0500
++++ misc/build/mozilla/configure	2010-08-19 09:11:35.000000000 -0500
+@@ -5884,6 +5884,9 @@
+             CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'`
+             CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'`
+         fi
++    else
++        MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
++        MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
+     fi
+     case "${target_os}" in
+     aix4.1*)
+--- misc/mozilla/configure.in	2010-08-19 09:18:07.000000000 -0500
++++ misc/build/mozilla/configure.in	2010-08-19 09:10:46.000000000 -0500
+@@ -1489,6 +1489,9 @@
+             CC_VERSION=`lslpp -Lcq vac.C 2>/dev/null | awk -F: '{ print $3 }'`
+             CXX_VERSION=`lslpp -Lcq vacpp.cmp.core 2>/dev/null | awk -F: '{ print $3 }'`
+         fi
++    else
++        MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
++        MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
+     fi
+     case "${target_os}" in
+     aix4.1*)
+--- misc/mozilla/configure	2010-08-19 11:03:27.000000000 -0500
++++ misc/build/mozilla/configure	2010-08-19 11:05:38.000000000 -0500
+@@ -5887,6 +5887,8 @@
+     else
+         MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
+         MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
++        MOZ_FIX_LINK_PATHS=
++        DSO_LDOPTS="$DSO_LDOPTS -Wl,-brtl"
+     fi
+     case "${target_os}" in
+     aix4.1*)
+--- misc/mozilla/configure.in	2010-08-19 11:03:36.000000000 -0500
++++ misc/build/mozilla/configure.in	2010-08-19 11:04:33.000000000 -0500
+@@ -1492,6 +1492,9 @@
+     else
+         MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
+         MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
++        AC_MSG_WARN([Clearing MOZ_FIX_LINK_PATHS till we can fix bug 332075.])
++        MOZ_FIX_LINK_PATHS=
++        DSO_LDOPTS="$DSO_LDOPTS -Wl,-brtl"
+     fi
+     case "${target_os}" in
+     aix4.1*)
+--- misc/mozilla/config/rules.mk	2010-08-20 04:09:51.000000000 -0500
++++ misc/build/mozilla/config/rules.mk	2010-08-20 05:02:37.000000000 -0500
+@@ -488,8 +488,13 @@
+ ifeq ($(OS_ARCH),AIX)
+ ifdef IS_COMPONENT
+ ifneq ($(HAS_EXTRAEXPORTS),1)
++ifdef GNU_CC
++MKSHLIB += -Wl,-bE:$(MOZILLA_DIR)/build/unix/aix.exp -Wl,-bnoexpall
++MKCSHLIB += -Wl,-bE:$(MOZILLA_DIR)/build/unix/aix.exp -Wl,-bnoexpall
++else
+ MKSHLIB += -bE:$(MOZILLA_DIR)/build/unix/aix.exp -bnoexpall
+ MKCSHLIB += -bE:$(MOZILLA_DIR)/build/unix/aix.exp -bnoexpall
++endif # GNU_CXX
+ endif # HAS_EXTRAEXPORTS
+ endif # IS_COMPONENT
+ endif # AIX
commit f9e21f55e2c7161c1772629dd80eb2659810574f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:46:13 2010 +0100

    update libtooling and config.guess for aix 7

diff --git a/libxslt/libxslt-aix.patch b/libxslt/libxslt-aix.patch
new file mode 100644
index 0000000..fe38f7b
--- /dev/null
+++ b/libxslt/libxslt-aix.patch
@@ -0,0 +1,21 @@
+--- misc/libxslt-1.1.26/config.guess	2010-09-16 02:40:03.000000000 -0500
++++ misc/build/libxslt-1.1.26/config.guess	2010-09-16 02:41:43.000000000 -0500
+@@ -532,7 +532,7 @@
+ 		echo rs6000-ibm-aix3.2
+ 	fi
+ 	exit ;;
+-    *:AIX:*:[45])
++    *:AIX:*:[4567])
+ 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ 		IBM_ARCH=rs6000
+@@ -544,6 +544,9 @@
+ 	else
+ 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ 	fi
++	if [ "$IBM_REV" == "V7BETA" ]; then
++		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++	fi
+ 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ 	exit ;;
+     *:AIX:*:*)
diff --git a/libxslt/makefile.mk b/libxslt/makefile.mk
index fd7273b..9a7be2e 100644
--- a/libxslt/makefile.mk
+++ b/libxslt/makefile.mk
@@ -55,8 +55,8 @@ TARFILE_MD5=e61d0364a30146aaa3001296f853b2b9
 PATCH_FILES=libxslt-configure.patch \
             libxslt-win_manifest.patch \
             libxslt-mingw.patch \
-            libxslt-internal-symbols.patch
-
+            libxslt-internal-symbols.patch \
+            libxslt-aix.patch
 
 # This is only for UNX environment now
 .IF "$(OS)"=="WNT"
@@ -96,6 +96,9 @@ LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
 .IF "$(OS)$(COM)"=="SOLARISC52"
 LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
 .ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
+.IF "$(OS)"=="AIX"
+LDFLAGS+:=$(LINKFLAGS) $(LINKFLAGSRUNPATH_OOO)
+.ENDIF
 
 .IF "$(SYSBASE)"!=""
 CPPFLAGS+:=-I$(SOLARINCDIR)$/external -I$(SYSBASE)$/usr$/include $(EXTRA_CFLAGS)
diff --git a/libxslt/prj/d.lst b/libxslt/prj/d.lst
index cdb1c1d..4913b78 100644
--- a/libxslt/prj/d.lst
+++ b/libxslt/prj/d.lst
@@ -3,7 +3,8 @@ mkdir: %_DEST%\inc%_EXT%\external\libxslt
 ..\%__SRC%\lib\libxslt.so.1 %_DEST%\lib%_EXT%\libxslt.so.1
 symlink: %_DEST%\lib%_EXT%\libxslt.so.1 %_DEST%\lib%_EXT%\libxslt.so
 ..\%__SRC%\lib\libexslt.so.0 %_DEST%\lib%_EXT%\libexslt.so.0
-..\%__SRC%\lib\libxslt*.lib %_DEST%\lib%_EXT%
+symlink: %_DEST%\lib%_EXT%\libexslt.so.0 %_DEST%\lib%_EXT%\libexslt.so
+..\%__SRC%\lib\libxslt*.* %_DEST%\lib%_EXT%\libxslt*.*
 ..\%__SRC%\lib\lib*.dll.a %_DEST%\lib%_EXT%\*.a
 ..\%__SRC%\bin\lib*.dll %_DEST%\bin%_EXT%
 ..\%__SRC%\bin\xsltproc* %_DEST%\bin%_EXT%
commit e5c7fc1f2fe0864ada40bafea242bfbd488d1e41
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:45:34 2010 +0100

    update libtooling and config.guess for aix 7

diff --git a/libxml2/libxml2-aix.patch b/libxml2/libxml2-aix.patch
new file mode 100644
index 0000000..d187ea0
--- /dev/null
+++ b/libxml2/libxml2-aix.patch
@@ -0,0 +1,21 @@
+--- misc/libxml2-2.7.6/config.guess	2010-09-15 14:53:52.000000000 -0500
++++ misc/build/libxml2-2.7.6/config.guess	2010-09-15 14:56:09.000000000 -0500
+@@ -548,7 +548,7 @@
+ 		echo rs6000-ibm-aix3.2
+ 	fi
+ 	exit ;;
+-    *:AIX:*:[456])
++    *:AIX:*:[4567])
+ 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ 		IBM_ARCH=rs6000
+@@ -560,6 +560,9 @@
+ 	else
+ 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ 	fi
++	if [ "$IBM_REV" == "V7BETA" ]; then
++		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++	fi
+ 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ 	exit ;;
+     *:AIX:*:*)
diff --git a/libxml2/makefile.mk b/libxml2/makefile.mk
index bef2d43..c9677f0 100644
--- a/libxml2/makefile.mk
+++ b/libxml2/makefile.mk
@@ -52,7 +52,7 @@ PATCH_FILES=libxml2-configure.patch \
             libxml2-mingw.patch \
             libxml2-gnome599717.patch \
             libxml2-global-symbols.patch \
-
+            libxml2-aix.patch
 
 # This is only for UNX environment now
 
@@ -100,7 +100,7 @@ CONFIGURE_ACTION=sh .$/configure
 CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=yes --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS)" CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
 .ELSE
 CONFIGURE_ACTION=.$/configure
-CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
+CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-shared --disable-static --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
 .ENDIF
 BUILD_ACTION=$(GNUMAKE)
 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
commit 87cf6377997baf0616e756cdc5b69ae4dda79949
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:23:48 2010 +0100

    add aix build fixes

diff --git a/icu/icu4c-aix.patch b/icu/icu4c-aix.patch
new file mode 100644
index 0000000..fa43e85
--- /dev/null
+++ b/icu/icu4c-aix.patch
@@ -0,0 +1,155 @@
+--- misc/icu/source/config/mh-aix-gcc	2009-01-15 01:46:10.000000000 -0600
++++ misc/build/icu/source/config/mh-aix-gcc	2010-06-24 20:58:16.000000000 -0500
+@@ -1,85 +1,49 @@
+ ## -*-makefile-*-
+-## Copyright (c) 2003-2007 IBM, Ken Foskey, and others. All rights reserved.
+-##
+-## Aix-specific setup (for gcc)
+-##
+-## Please note: AIX does NOT have library versioning per se (there is no 'SONAME' capability). 
+-## So, we are using 'windows' style library names, that is, libicuuc20.1.so instead of libicuuc.so.20.1
++## Linux-specific setup
++## Copyright (c) 1999-2006, International Business Machines Corporation and
++## others. All Rights Reserved.
+ 
+ ## Commands to generate dependency files
+-GEN_DEPS.c=	$(CC) -E -MM $(DEFS) $(CPPFLAGS)
+-GEN_DEPS.cc=	$(CXX) -E -MM $(DEFS) $(CPPFLAGS)
++GEN_DEPS.c=  $(CC) -E -MM $(DEFS) $(CPPFLAGS)
++GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
+ 
+-## Commands to link
+-## We need to use the C++ linker, even when linking C programs, since
+-##  our libraries contain C++ code (C++ static init not called)
+-LINK.c=		$(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) 
+-LINK.cc=	$(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) 
+-
+-## Commands to make a shared library
+-SHLIB.c=    $(AIX_PREDELETE) $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-bexpall
+-SHLIB.cc=   $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-bexpall
++## Flags for position independent code
++SHAREDLIBCFLAGS = -fPIC
++SHAREDLIBCXXFLAGS = -fPIC
++SHAREDLIBCPPFLAGS = -DPIC
++
++## Additional flags when building libraries and with threads
++THREADSCPPFLAGS = -D_REENTRANT -D_THREAD_SAFE
++LIBCPPFLAGS =
+ 
+ ## Compiler switch to embed a runtime search path
+-LD_RPATH=	-I
+-LD_RPATH_PRE=	
++LD_RPATH=	
++LD_RPATH_PRE =
+ 
+-## enable the shared lib loader
+-LDFLAGS += -Wl,-bbigtoc
++## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH
++## (incl. the C++ runtime libs potentially found in the URE lib dir):
++#ENABLE_RPATH=YES
++#RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib'
++
++#SH#  ENABLE_RPATH=YES
++#SH#  RPATHLDFLAGS="${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib'"
+ 
+ ## These are the library specific LDFLAGS
+ LDFLAGSICUDT=-nodefaultlibs -nostdlib
+ 
+-## We need to delete things prior to linking, or else we'll get
+-## SEVERE ERROR: output file in use ..  on AIX. 
+-## But, shell script version should NOT delete target as we don't
+-## have $@ in that context.  (SH = only shell script, icu-config)
+-AIX_PREDELETE=rm -f $@ ; 
+-#SH# AIX_PREDELETE=
+-
+ ## Environment variable to set a runtime search path
+ LDLIBRARYPATH_ENVVAR = LIBPATH
+ 
+-## Override Versioned target for a shared library.
+-FINAL_SO_TARGET=  $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
+-MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
+-SHARED_OBJECT = $(notdir $(FINAL_SO_TARGET:.$(SO)=.$(SOBJ)))
+-
+-# The following is for Makefile.inc's use.
+-ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
+-
+-# this one is for icudefs.mk's use
+-ifeq ($(ENABLE_SHARED),YES)
+-SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
+-endif
+-
+-## Compiler switch to embed a library name. Not present on AIX.
+-LD_SONAME = 
+-
+-## The type of assembly needed when pkgdata is used for generating shared libraries.
+-GENCCODE_ASSEMBLY=-a xlc
++## Compiler switch to embed a library name
++# The initial tab in the next line is to prevent icu-config from reading it.
++	#LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
++#SH# # We can't depend on MIDDLE_SO_TARGET being set.
++#SH# LD_SONAME=
+ 
+ ## Shared object suffix
+-SOBJ=   so
+-# without the -brtl option, the library names use .a. AIX is funny that way.
+-SO=	a
+-A=	a
+-
++SO = so
+ ## Non-shared intermediate object suffix
+-STATIC_O = o
+-
+-## Special AIX rules
+-
+-## Build archive from shared object
+-%.a : %.so
+-	$(AR) $(ARFLAGS) $@ $<
+-$(LIBDIR)/%.a : %.so
+-	$(AR) $(ARFLAGS) $@ $<
+-
+-## Build import list from export list
+-%.e : %.exp
+-	@echo "Building an import list for $<"
+-	@$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
++STATIC_O = ao
+ 
+ ## Compilation rules
+ %.$(STATIC_O): $(srcdir)/%.c
+@@ -107,16 +71,19 @@
+ 		[ -s $@ ] || rm -f $@'
+ 
+ ## Versioned libraries rules
+-%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
+-	$(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
+-%.$(SO): %$(SO_TARGET_VERSION).$(SO)
+-	$(RM) $@ && ln -s ${*F}$(SO_TARGET_VERSION).$(SO) $@
+ 
++%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
++	$(RM) $@ && ln -s ${<F} $@
++%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
++	$(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
++
++##  Bind internal references
+ 
+-## BIR  - bind with internal references [so app data and icu data doesn't collide]
+ # LDflags that pkgdata will use
+-BIR_LDFLAGS= -Wl,-bE:$(NAME).map,-bnoexpall
++BIR_LDFLAGS= -Wl,-Bsymbolic
+ 
+ # Dependencies [i.e. map files] for the final library
+-BIR_DEPS= $(NAME).map
++BIR_DEPS=
++
++## End Linux-specific setup
+ 
+--- misc/icu/source/tools/pkgdata/dllmode.c	2010-07-27 09:29:19.000000000 -0500
++++ misc/build/icu/source/tools/pkgdata/dllmode.c	2010-07-27 09:29:48.000000000 -0500
+@@ -222,7 +222,7 @@
+                                      "\t$(SHLIB.c) -o $@ $(OBJECTS) $(DLL_LDFLAGS)\n\n");
+ #endif
+     
+-#ifdef U_AIX
++#if 0
+     T_FileStream_writeLine(makefile, "$(TARGETDIR)/$(FINAL_SO_TARGET): $(OBJECTS) $(LISTFILES) $(DLL_DEPS)\n"
+                                      "\t$(SHLIB.c) -o $(FINAL_SO_TARGET:.$(SO)=.$(SOBJ)) $(OBJECTS) $(DLL_LDFLAGS)\n"
+                                      "\t$(AR) $(ARFLAGS) $@ $(FINAL_SO_TARGET:.$(SO)=.$(SOBJ))\n"
diff --git a/icu/makefile.mk b/icu/makefile.mk
index 2fafcfa..82e74bd 100644
--- a/icu/makefile.mk
+++ b/icu/makefile.mk
@@ -46,7 +46,9 @@ TARFILE_MD5=
 .ENDIF
 TARFILE_ROOTDIR=icu
 
-PATCH_FILES=${TARFILE_NAME}.patch
+PATCH_FILES=\
+    ${TARFILE_NAME}.patch \
+    icu4c-aix.patch
 
 # ADDITIONAL_FILES=
 
@@ -95,6 +97,11 @@ CONFIGURE_ACTION=rm data/mappings/ucm*.mk data/translit/trn*.mk ;
 DISABLE_64BIT=--enable-64bit-libs=no
 .ENDIF			# "$(OS)"=="SOLARIS"
 
+.IF "$(OS)"=="AIX"
+DISABLE_64BIT=--enable-64bit-libs=no
+LDFLAGSADD+=$(LINKFLAGS) $(LINKFLAGSRUNPATH_OOO)
+.ENDIF                  # "$(OS)"=="AIX"
+
 .IF "$(HAVE_LD_HASH_STYLE)"  == "TRUE"
 LDFLAGSADD += -Wl,--hash-style=both
 .ENDIF
commit c19f36701120715e5e693a20d623d1e574a530c1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:21:57 2010 +0100

    fix AIX build

diff --git a/hunspell/makefile.mk b/hunspell/makefile.mk
index 253607a..a455cce 100644
--- a/hunspell/makefile.mk
+++ b/hunspell/makefile.mk
@@ -54,6 +54,10 @@ CONFIGURE_FLAGS= --disable-shared --with-pic
 CONFIGURE_FLAGS+= CFLAGS=-xc99=none
 .ENDIF                  # "$(COMNAME)"=="sunpro5"
 
+.IF "$(OS)"=="AIX"
+CONFIGURE_FLAGS+= CFLAGS=-D_LINUX_SOURCE_COMPAT
+.ENDIF
+
 .IF "$(SYSBASE)"!=""
 .IF "$(EXTRA_CFLAGS)"!=""
 CONFIGURE_FLAGS+= CFLAGS="$(EXTRA_CFLAGS)" CXXFLAGS="$(EXTRA_CFLAGS)"
commit 0c0afcce20941cfedcdf52838981f69b4907fb38
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 13:15:19 2010 +0100

    update libtooling and config.guess for aix 7

diff --git a/curl/curl-aix.patch b/curl/curl-aix.patch
new file mode 100644
index 0000000..1ee1999
--- /dev/null
+++ b/curl/curl-aix.patch
@@ -0,0 +1,21 @@
+--- misc/curl-7.19.7/config.guess	2010-09-15 14:29:17.000000000 -0500
++++ misc/build/curl-7.19.7/config.guess	2010-09-15 14:32:41.000000000 -0500
+@@ -548,7 +548,7 @@
+ 		echo rs6000-ibm-aix3.2
+ 	fi
+ 	exit ;;
+-    *:AIX:*:[456])
++    *:AIX:*:[4567])
+ 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ 		IBM_ARCH=rs6000
+@@ -560,6 +560,9 @@
+ 	else
+ 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ 	fi
++	if [ "$IBM_REV" == "V7BETA" ]; then
++		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++	fi
+ 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ 	exit ;;
+     *:AIX:*:*)
diff --git a/curl/makefile.mk b/curl/makefile.mk
index adab75f..213a887 100644
--- a/curl/makefile.mk
+++ b/curl/makefile.mk
@@ -43,7 +43,9 @@ all:
 
 TARFILE_NAME=curl-7.19.7
 TARFILE_MD5=ecb2e37e45c9933e2a963cabe03670ab
-PATCH_FILES=curl-7.19.7.patch
+PATCH_FILES=\
+    curl-7.19.7.patch \
+    curl-aix.patch
 
 .IF "$(GUI)"=="WNT"
     PATCH_FILES+=curl-7.19.7_win.patch
@@ -74,6 +76,10 @@ curl_CFLAGS+:=$(ARCH_FLAGS)
 curl_LDFLAGS+:=$(ARCH_FLAGS)
 .ENDIF
 
+.IF "$(OS)"=="AIX"
+curl_LDFLAGS+:=$(LINKFLAGS) $(LINKFLAGSRUNPATH_OOO)
+.ENDIF
+
 CONFIGURE_DIR=.$/
 #relative to CONFIGURE_DIR
 CONFIGURE_ACTION=.$/configure
commit 228146ef42fb8ebc13cc92de03ee940d553de8e3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 13 12:54:48 2010 +0100

    update libtooling and config.guess for aix 7

diff --git a/berkeleydb/db-aix.patch b/berkeleydb/db-aix.patch
new file mode 100644
index 0000000..3a2c21f
--- /dev/null
+++ b/berkeleydb/db-aix.patch
@@ -0,0 +1,205 @@
+--- misc/db-4.7.25.NC/dist/config.guess	2010-08-19 03:29:33.000000000 -0500
++++ misc/build/db-4.7.25.NC/dist/config.guess	2010-08-19 03:32:57.000000000 -0500
+@@ -532,7 +532,7 @@
+ 		echo rs6000-ibm-aix3.2
+ 	fi
+ 	exit ;;
+-    *:AIX:*:[456])
++    *:AIX:*:[4567])
+ 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ 		IBM_ARCH=rs6000
+@@ -544,6 +544,9 @@
+ 	else
+ 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ 	fi
++	if [ "$IBM_REV" == "V7BETA" ]; then
++		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++	fi
+ 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ 	exit ;;
+     *:AIX:*:*)
+--- misc/db-4.7.25.NC/dist/configure	2010-09-15 10:06:54.000000000 -0500
++++ misc/build/db-4.7.25.NC/dist/configure	2010-09-15 10:12:41.000000000 -0500
+@@ -3701,7 +3701,7 @@
+ # Don't override anything if it's already set from the environment.
+ optimize_debug="-O"
+ case "$host_os" in
+-aix4.3.*|aix5*)
++aix[4-9]*)
+ 	case "$host_os" in
+ 	aix4.3.*)
+ 		CPPFLAGS="$CPPFLAGS -D_LINUX_SOURCE_COMPAT";;
+@@ -6452,7 +6452,7 @@
+ # whether `pass_all' will *always* work, you probably want this one.
+ 
+ case $host_os in
+-aix4* | aix5*)
++aix[4-9]*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+@@ -9439,7 +9439,7 @@
+ 
+     # See if GNU ld supports shared libraries.
+     case $host_os in
+-    aix3* | aix4* | aix5*)
++    aix[4-9]*)
+       # On AIX/PPC, the GNU linker is very broken
+       if test "$host_cpu" != ia64; then
+ 	ld_shlibs=no
+@@ -9649,7 +9649,7 @@
+       fi
+       ;;
+ 
+-    aix4* | aix5*)
++    aix[4-9]*)
+       if test "$host_cpu" = ia64; then
+ 	# On IA64, the linker does run time linking by default, so we don't
+ 	# have to do anything special.
+@@ -9669,7 +9669,7 @@
+ 	# Test if we are trying to use run time linking or normal
+ 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ 	# need to do runtime linking.
+-	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
++	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ 	  for ld_flag in $LDFLAGS; do
+   	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+   	    aix_use_runtimelinking=yes
+@@ -10410,7 +10410,7 @@
+   soname_spec='${libname}${release}${shared_ext}$major'
+   ;;
+ 
+-aix4* | aix5*)
++aix[4-9]*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+@@ -11826,7 +11826,7 @@
+   fi
+   ;;
+ 
+-aix4* | aix5*)
++aix[4-9]*)
+   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+     test "$enable_shared" = yes && enable_static=no
+   fi
+@@ -12670,7 +12670,7 @@
+     # FIXME: insert proper C++ library support
+     ld_shlibs_CXX=no
+     ;;
+-  aix4* | aix5*)
++  aix[4-9]*)
+     if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+@@ -12683,7 +12683,7 @@
+       # Test if we are trying to use run time linking or normal
+       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+       # need to do runtime linking.
+-      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
++      case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ 	for ld_flag in $LDFLAGS; do
+ 	  case $ld_flag in
+ 	  *-brtl*)
+@@ -13805,7 +13805,7 @@
+     esac
+   else
+     case $host_os in
+-      aix4* | aix5*)
++      aix[4-9]*)
+ 	# All AIX code is PIC.
+ 	if test "$host_cpu" = ia64; then
+ 	  # AIX 5 now supports IA64 processor
+@@ -14201,7 +14201,7 @@
+ 
+   export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   case $host_os in
+-  aix4* | aix5*)
++  aix[4-9]*)
+     # If we're using GNU nm, then we don't want the "-C" option.
+     # -C means demangle to AIX nm, but means don't demangle with GNU nm
+     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+@@ -14334,7 +14334,7 @@
+   soname_spec='${libname}${release}${shared_ext}$major'
+   ;;
+ 
+-aix4* | aix5*)
++aix[4-9]*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+@@ -15455,7 +15455,7 @@
+     postinstall_cmds='$RANLIB $lib'
+   fi
+   ;;
+-aix4* | aix5*)
++aix[4-9]*)
+   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+     test "$enable_shared" = yes && enable_static=no
+   fi
+@@ -15966,7 +15966,7 @@
+ 
+     # See if GNU ld supports shared libraries.
+     case $host_os in
+-    aix3* | aix4* | aix5*)
++    aix[3-9]*)
+       # On AIX/PPC, the GNU linker is very broken
+       if test "$host_cpu" != ia64; then
+ 	ld_shlibs_F77=no
+@@ -16176,7 +16176,7 @@
+       fi
+       ;;
+ 
+-    aix4* | aix5*)
++    aix[4-9]*)
+       if test "$host_cpu" = ia64; then
+ 	# On IA64, the linker does run time linking by default, so we don't
+ 	# have to do anything special.
+@@ -16917,7 +16917,7 @@
+   soname_spec='${libname}${release}${shared_ext}$major'
+   ;;
+ 
+-aix4* | aix5*)
++aix[4-9]*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+@@ -18540,7 +18540,7 @@
+ 
+     # See if GNU ld supports shared libraries.
+     case $host_os in
+-    aix3* | aix4* | aix5*)
++    aix[3-9]*)
+       # On AIX/PPC, the GNU linker is very broken
+       if test "$host_cpu" != ia64; then
+ 	ld_shlibs_GCJ=no
+@@ -18750,7 +18750,7 @@
+       fi
+       ;;
+ 
+-    aix4* | aix5*)
++    aix[4-9]*)
+       if test "$host_cpu" = ia64; then
+ 	# On IA64, the linker does run time linking by default, so we don't
+ 	# have to do anything special.
+@@ -19511,7 +19511,7 @@
+   soname_spec='${libname}${release}${shared_ext}$major'
+   ;;
+ 
+-aix4* | aix5*)
++aix[4-9]*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+--- misc/db-4.7.25.NC/dist/configure.ac	2010-09-15 10:06:54.000000000 -0500
++++ misc/build/db-4.7.25.NC/dist/configure.ac	2010-09-15 10:08:45.000000000 -0500
+@@ -154,7 +154,7 @@
+ # Don't override anything if it's already set from the environment.
+ optimize_debug="-O"
+ case "$host_os" in
+-aix4.3.*|aix5*)
++aix[4-9]*)
+ 	case "$host_os" in
+ 	aix4.3.*)
+ 		CPPFLAGS="$CPPFLAGS -D_LINUX_SOURCE_COMPAT";;
diff --git a/berkeleydb/makefile.mk b/berkeleydb/makefile.mk
index 325e870..98d52e9 100644
--- a/berkeleydb/makefile.mk
+++ b/berkeleydb/makefile.mk
@@ -60,7 +60,9 @@ ADDITIONAL_FILES= \
 .IF "$(GUI)$(COM)"=="WNTGCC"
 PATCH_FILES=db-4.7.25-mingw.patch
 .ELSE
-PATCH_FILES=db-4.7.25.patch
+PATCH_FILES=\
+    db-4.7.25.patch \
+    db-aix.patch
 .ENDIF
 
 # clean compiler flags


More information about the Libreoffice-commits mailing list