From 6aee473a5881eca7cdae7c5a38eea80ca4541c23 Mon Sep 17 00:00:00 2001 From: Mounir Lamouri Date: Tue, 9 Aug 2011 14:50:55 +0200 Subject: [PATCH] Backout bug 563462, bug 675519, bug 674647, bug 341223 and bug 672980 to fix perma-orange. --- browser/app/Makefile.in | 4 ++ build/autoconf/lto.m4 | 2 +- build/autoconf/mozconfig-find | 26 ++++--------- build/autoconf/mozheader.m4 | 4 +- build/autoconf/moznbytetype.m4 | 6 +-- build/autoconf/mozprog.m4 | 6 +-- build/autoconf/nss.m4 | 2 +- build/macosx/mozconfig.leopard | 13 ------- config/autoconf.mk.in | 1 + config/system-headers | 8 ++++ configure.in | 67 ++++++++++++++++++++++++++++++++-- js/src/config/system-headers | 8 ++++ js/src/configure.in | 50 +++++++++++++++++++++++++ xulrunner/app/Makefile.in | 4 ++ 14 files changed, 156 insertions(+), 45 deletions(-) delete mode 100644 build/macosx/mozconfig.leopard diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 9a39a45e48a..5f44c9d43ef 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -156,6 +156,10 @@ endif include $(topsrcdir)/config/rules.mk +ifeq ($(MOZ_WIDGET_TOOLKIT),photon) +LIBS += -lphexlib +endif + ifeq ($(OS_ARCH),WINNT) # # Control the default heap size. diff --git a/build/autoconf/lto.m4 b/build/autoconf/lto.m4 index 46648fa23bb..d7a9802166a 100644 --- a/build/autoconf/lto.m4 +++ b/build/autoconf/lto.m4 @@ -1,6 +1,6 @@ dnl check if the build is using lto. This is really primitive and only detects llvm based dnl compilers right now. -AC_DEFUN([MOZ_DOING_LTO], +AC_DEFUN(MOZ_DOING_LTO, [ cat > conftest.c </dev/null` != "0"; then msyshost=1 fi ]) -AC_DEFUN([MOZ_PATH_PROG], +AC_DEFUN(MOZ_PATH_PROG, [ AC_PATH_PROG($1,$2,$3,$4) if test "$msyshost"; then case "[$]$1" in @@ -59,7 +59,7 @@ AC_DEFUN([MOZ_PATH_PROG], fi ]) -AC_DEFUN([MOZ_PATH_PROGS], +AC_DEFUN(MOZ_PATH_PROGS, [ AC_PATH_PROGS($1,$2,$3,$4) if test "$msyshost"; then case "[$]$1" in diff --git a/build/autoconf/nss.m4 b/build/autoconf/nss.m4 index 14e58574607..7d36c3d0550 100644 --- a/build/autoconf/nss.m4 +++ b/build/autoconf/nss.m4 @@ -5,7 +5,7 @@ dnl AM_PATH_NSS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for NSS, and define NSS_CFLAGS and NSS_LIBS -AC_DEFUN([AM_PATH_NSS], +AC_DEFUN(AM_PATH_NSS, [dnl AC_ARG_WITH(nss-prefix, diff --git a/build/macosx/mozconfig.leopard b/build/macosx/mozconfig.leopard deleted file mode 100644 index 78dfb6f4bb4..00000000000 --- a/build/macosx/mozconfig.leopard +++ /dev/null @@ -1,13 +0,0 @@ -if test -z "$CC" ; then - CC=gcc-4.2 -fi - -if test -z "$CXX" ; then - CXX=g++-4.2 -fi - -# We do 32 bit builds for leopard -CC="$CC -arch i386" -CXX="$CXX -arch i386" - -ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 6c94cda7cc9..56019336ea1 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -531,6 +531,7 @@ MOZ_TREE_FREETYPE = @MOZ_TREE_FREETYPE@ MOZ_ENABLE_CAIRO_FT = @MOZ_ENABLE_CAIRO_FT@ MOZ_ENABLE_GTK2 = @MOZ_ENABLE_GTK2@ MOZ_ENABLE_QT = @MOZ_ENABLE_QT@ +MOZ_ENABLE_PHOTON = @MOZ_ENABLE_PHOTON@ MOZ_ENABLE_XREMOTE = @MOZ_ENABLE_XREMOTE@ MOZ_ENABLE_DWRITE_FONT = @MOZ_ENABLE_DWRITE_FONT@ MOZ_ENABLE_D2D_SURFACE = @MOZ_ENABLE_D2D_SURFACE@ diff --git a/config/system-headers b/config/system-headers index a62ea0c42bc..41a939ac80c 100644 --- a/config/system-headers +++ b/config/system-headers @@ -565,6 +565,14 @@ pcfs/pc_dir.h Pgenerr.h PGenErr.h Ph.h +photon/Pg.h +photon/PhProto.h +photon/PhRender.h +photon/PpProto.h +photon/PtProgress.h +photon/PtServer.h +photon/PtWebClient.h +photon/PxImage.h pk11func.h pk11pub.h pkcs11t.h diff --git a/configure.in b/configure.in index 05aa8f25712..49ef50d4b2d 100644 --- a/configure.in +++ b/configure.in @@ -1360,6 +1360,8 @@ OSF1) OS_2) HOST_OS_ARCH=OS2 ;; +QNX) + ;; SCO_SV) HOST_OS_ARCH=SCOOS ;; @@ -1448,6 +1450,14 @@ OS_2) OS_TARGET=OS2 OS_RELEASE=`uname -v` ;; +QNX) + if test "$OS_TARGET" != "NTO"; then + changequote(,) + OS_RELEASE=`uname -v | sed 's/^\([0-9]\)\([0-9]*\)$/\1.\2/'` + changequote([,]) + fi + OS_TEST=x86 + ;; SCO_SV) OS_ARCH=SCOOS OS_RELEASE=5.0 @@ -2489,6 +2499,37 @@ ia64*-hpux*) MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX) -o $@' ;; +*-nto*) + AC_DEFINE(NTO) + AC_DEFINE(_QNX_SOURCE) + AC_DEFINE(_i386) + OS_TARGET=NTO + WARNINGS_AS_ERRORS='' + MOZ_OPTIMIZE_FLAGS="-O" + MOZ_DEBUG_FLAGS="-gstabs" + USE_PTHREADS=1 + _PEDANTIC= + LIBS="$LIBS -lsocket -lstdc++" + _DEFINES_CFLAGS='-include $(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT -D_POSIX_C_SOURCE=199506' + _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/mozilla-config.h -D_POSIX_C_SOURCE=199506' + if test "$with_x" != "yes" + then + _PLATFORM_DEFAULT_TOOLKIT="photon" + TK_CFLAGS='-I/usr/include/photon' + TK_LIBS='-lph' + fi + case "${target_cpu}" in + ppc*) + AC_DEFINE(HAVE_VA_LIST_AS_ARRAY) + ;; + esac + case "${host_cpu}" in + i*86) + USE_ELF_DYNSTR_GC=1 + ;; + esac + ;; + *-openbsd*) if test "$SO_VERSION"; then DLL_SUFFIX=".so.$SO_VERSION" @@ -2595,6 +2636,20 @@ alpha*-*-osf*) AC_DEFINE(NEED_USLEEP_PROTOTYPE) ;; +*-qnx*) + DIRENT_INO=d_stat.st_ino + dnl Solves the problems the QNX compiler has with nsCOMPtr.h. + AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES) + AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) + dnl Explicit set STDC_HEADERS to workaround QNX 6.0's failing of std test + AC_DEFINE(STDC_HEADERS) + if test "$no_x" = "yes"; then + _PLATFORM_DEFAULT_TOOLKIT='photon' + TK_CFLAGS='-I/usr/nto/include/photon' + TK_LIBS='-lphoton -lphrender' + fi + ;; + *-sco*) AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES) AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) @@ -4908,6 +4963,7 @@ MOZ_ARG_HEADER(Toolkit Options) Select default toolkit Platform specific defaults: Mac OS X - cairo-cocoa + Neutrino/QNX - photon OS/2 - cairo-os2 Win32 - cairo-windows Gtk2 with DirectFB - cairo-gtk2-dfb @@ -4916,7 +4972,8 @@ MOZ_ARG_HEADER(Toolkit Options) [ _DEFAULT_TOOLKIT=$enableval ], [ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT]) - if test "$_DEFAULT_TOOLKIT" = "cairo-windows" \ + if test "$_DEFAULT_TOOLKIT" = "photon" \ + -o "$_DEFAULT_TOOLKIT" = "cairo-windows" \ -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \ -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2-dfb" \ -o "$_DEFAULT_TOOLKIT" = "cairo-gtk2-x11" \ @@ -4937,6 +4994,10 @@ dnl = Enable the toolkit as needed = dnl ======================================================== case "$MOZ_WIDGET_TOOLKIT" in +photon) + MOZ_ENABLE_PHOTON=1 + AC_DEFINE(MOZ_WIDGET_PHOTON) + ;; cairo-windows) MOZ_WIDGET_TOOLKIT=windows @@ -5191,6 +5252,7 @@ AC_SUBST(TK_CFLAGS) AC_SUBST(TK_LIBS) AC_SUBST(MOZ_ENABLE_GTK2) +AC_SUBST(MOZ_ENABLE_PHOTON) AC_SUBST(MOZ_ENABLE_QT) AC_SUBST(MOZ_ENABLE_QTNETWORK) AC_SUBST(MOZ_ENABLE_QMSYSTEM2) @@ -7439,7 +7501,6 @@ else AC_MSG_RESULT([no]) WIN32_NEW_STYLE_JEMALLOC=1 AC_DEFINE(WIN32_NEW_STYLE_JEMALLOC) - WIN32_CRT_SRC_DIR= if test -z "$MOZ_DEBUG"; then WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib" else @@ -7449,7 +7510,7 @@ else WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj` lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH if grep -q '__imp__\{0,1\}free' crtdll.obj; then - MOZ_MEMORY_LDFLAGS='-LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt' + MOZ_MEMORY_LDFLAGS='-MANIFEST:NO -LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt' else MOZ_MEMORY_LDFLAGS='$(DIST)/../memory/jemalloc/jemalloc.lib' fi diff --git a/js/src/config/system-headers b/js/src/config/system-headers index a62ea0c42bc..41a939ac80c 100644 --- a/js/src/config/system-headers +++ b/js/src/config/system-headers @@ -565,6 +565,14 @@ pcfs/pc_dir.h Pgenerr.h PGenErr.h Ph.h +photon/Pg.h +photon/PhProto.h +photon/PhRender.h +photon/PpProto.h +photon/PtProgress.h +photon/PtServer.h +photon/PtWebClient.h +photon/PxImage.h pk11func.h pk11pub.h pkcs11t.h diff --git a/js/src/configure.in b/js/src/configure.in index 97712874e0c..01291125983 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -1339,6 +1339,8 @@ OSF1) OS_2) HOST_OS_ARCH=OS2 ;; +QNX) + ;; SCO_SV) HOST_OS_ARCH=SCOOS ;; @@ -1432,6 +1434,14 @@ OS_2) OS_TARGET=OS2 OS_RELEASE=`uname -v` ;; +QNX) + if test "$OS_TARGET" != "NTO"; then + changequote(,) + OS_RELEASE=`uname -v | sed 's/^\([0-9]\)\([0-9]*\)$/\1.\2/'` + changequote([,]) + fi + OS_TEST=x86 + ;; SCO_SV) OS_ARCH=SCOOS OS_RELEASE=5.0 @@ -2411,6 +2421,32 @@ ia64*-hpux*) MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX) -o $@' ;; +*-nto*) + AC_DEFINE(NTO) + AC_DEFINE(_QNX_SOURCE) + AC_DEFINE(_i386) + OS_TARGET=NTO + WARNINGS_AS_ERRORS='' + MOZ_OPTIMIZE_FLAGS="-O" + MOZ_DEBUG_FLAGS="-gstabs" + USE_PTHREADS=1 + _PEDANTIC= + LIBS="$LIBS -lsocket -lstdc++" + _DEFINES_CFLAGS='-include $(DEPTH)/js-confdefs.h -DMOZILLA_CLIENT -D_POSIX_C_SOURCE=199506' + _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/js-confdefs.h -D_POSIX_C_SOURCE=199506' + if test "$with_x" != "yes" + then + _PLATFORM_DEFAULT_TOOLKIT="photon" + TK_CFLAGS='-I/usr/include/photon' + TK_LIBS='-lph' + fi + case "${target_cpu}" in + ppc*) + AC_DEFINE(HAVE_VA_LIST_AS_ARRAY) + ;; + esac + ;; + *-openbsd*) DLL_SUFFIX=".so.1.0" DSO_CFLAGS='' @@ -2511,6 +2547,20 @@ alpha*-*-osf*) AC_DEFINE(NEED_USLEEP_PROTOTYPE) ;; +*-qnx*) + DIRENT_INO=d_stat.st_ino + dnl Solves the problems the QNX compiler has with nsCOMPtr.h. + AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES) + AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) + dnl Explicit set STDC_HEADERS to workaround QNX 6.0's failing of std test + AC_DEFINE(STDC_HEADERS) + if test "$no_x" = "yes"; then + _PLATFORM_DEFAULT_TOOLKIT='photon' + TK_CFLAGS='-I/usr/nto/include/photon' + TK_LIBS='-lphoton -lphrender' + fi + ;; + *-sco*) AC_DEFINE(NSCAP_DISABLE_TEST_DONTQUERY_CASES) AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) diff --git a/xulrunner/app/Makefile.in b/xulrunner/app/Makefile.in index 10ebe166dfe..bb93c55441c 100644 --- a/xulrunner/app/Makefile.in +++ b/xulrunner/app/Makefile.in @@ -136,6 +136,10 @@ include $(topsrcdir)/config/rules.mk DEFINES += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" +ifeq ($(MOZ_WIDGET_TOOLKIT),photon) +LIBS += -lphexlib +endif + ifeq ($(OS_ARCH),WINNT) # # Control the default heap size.