[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-17.0.6esr-2] Fix build issues with MinGW.



commit 76a007d7babf0db5180c880088de1e53f3b7dfb4
Author: Mike Perry <mikeperry-git@xxxxxxxxxxxxxx>
Date:   Mon Apr 29 23:52:48 2013 -0700

    Fix build issues with MinGW.
    
    The following patches were applied:
    https://hg.mozilla.org/mozilla-central/rev/c581bb3ceac5
    https://hg.mozilla.org/mozilla-central/rev/b0c6a324e72f
    https://hg.mozilla.org/mozilla-central/rev/305ce1b73071
    
    Still need (but conflicts prevent us from using them):
    https://hg.mozilla.org/mozilla-central/rev/ddabcd6f9491
    https://hg.mozilla.org/mozilla-central/rev/476e02f9a619
---
 accessible/public/ia2/Makefile.in                  |   10 +++++-----
 accessible/public/msaa/Makefile.in                 |    8 ++++----
 accessible/public/msaa/nsIWinAccessNode.idl        |    2 +-
 accessible/src/msaa/AccessibleWrap.cpp             |    2 +-
 accessible/src/msaa/HyperTextAccessibleWrap.h      |    2 +-
 accessible/src/msaa/nsAccessNodeWrap.h             |    4 ++--
 browser/installer/package-manifest.in              |    6 +++---
 configure.in                                       |   15 ++++++++++++++-
 gfx/angle/Makefile.in                              |    4 ++++
 gfx/angle/src/libEGL/Makefile.in                   |   12 +++++++++++-
 gfx/angle/src/libGLESv2/Makefile.in                |   16 ++++++++++++++++
 gfx/angle/src/libGLESv2/libGLESv2.def              |    5 +++++
 gfx/layers/d3d9/LayerManagerD3D9.cpp               |    1 +
 js/src/configure.in                                |    1 +
 .../src/common/windows/guid_string.h               |    2 +-
 widget/windows/nsWindow.h                          |    2 +-
 16 files changed, 71 insertions(+), 21 deletions(-)

diff --git a/accessible/public/ia2/Makefile.in b/accessible/public/ia2/Makefile.in
index 504c2c0..32e272a 100644
--- a/accessible/public/ia2/Makefile.in
+++ b/accessible/public/ia2/Makefile.in
@@ -73,11 +73,11 @@ EMBED_MANIFEST_AT = 2
 include $(topsrcdir)/config/rules.mk
 
 OS_LIBS = \
-  kernel32.lib \
-  rpcns4.lib \
-  rpcrt4.lib \
-  ole32.lib \
-  oleaut32.lib \
+  -lkernel32 \
+  -lrpcns4 \
+  -lrpcrt4 \
+  -lole32 \
+  -loleaut32 \
   $(NULL)
 
 # generate list of to-be-generated files that are missing
diff --git a/accessible/public/msaa/Makefile.in b/accessible/public/msaa/Makefile.in
index 2055ad2..df60e49 100644
--- a/accessible/public/msaa/Makefile.in
+++ b/accessible/public/msaa/Makefile.in
@@ -52,10 +52,10 @@ MIDL_GENERATED_FILES = \
 SRCDIR_CSRCS	= $(addprefix $(srcdir)/,$(CSRCS))
 
 OS_LIBS = \
-	kernel32.lib \
-	rpcns4.lib \
-	rpcrt4.lib \
-	oleaut32.lib \
+	-lkernel32 \
+	-lrpcns4 \
+	-lrpcrt4 \
+	-loleaut32 \
 	$(NULL)
 
 $(MIDL_GENERATED_FILES): done_gen
diff --git a/accessible/public/msaa/nsIWinAccessNode.idl b/accessible/public/msaa/nsIWinAccessNode.idl
index 133d784..e129030 100644
--- a/accessible/public/msaa/nsIWinAccessNode.idl
+++ b/accessible/public/msaa/nsIWinAccessNode.idl
@@ -7,7 +7,7 @@
 #include "nsISupports.idl"
 
 %{C++
-#include "Guiddef.h"
+#include "guiddef.h"
 %}
 
 [ref] native MSCOMIIDRef(IID);
diff --git a/accessible/src/msaa/AccessibleWrap.cpp b/accessible/src/msaa/AccessibleWrap.cpp
index 08470c9..a3fad2c 100644
--- a/accessible/src/msaa/AccessibleWrap.cpp
+++ b/accessible/src/msaa/AccessibleWrap.cpp
@@ -40,7 +40,7 @@
 #include "Accessible2_i.c"
 #include "AccessibleRole.h"
 #include "AccessibleStates.h"
-#include "OLEACC.H"
+#include "oleacc.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
diff --git a/accessible/src/msaa/HyperTextAccessibleWrap.h b/accessible/src/msaa/HyperTextAccessibleWrap.h
index 9e87071..1699f6c 100644
--- a/accessible/src/msaa/HyperTextAccessibleWrap.h
+++ b/accessible/src/msaa/HyperTextAccessibleWrap.h
@@ -10,7 +10,7 @@
 
 #include "HyperTextAccessible.h"
 #include "ia2AccessibleEditableText.h"
-#include "ia2AccessibleHyperText.h"
+#include "ia2AccessibleHypertext.h"
 
 class HyperTextAccessibleWrap : public HyperTextAccessible,
                                 public ia2AccessibleHypertext,
diff --git a/accessible/src/msaa/nsAccessNodeWrap.h b/accessible/src/msaa/nsAccessNodeWrap.h
index 33a4ca9..16749a8 100644
--- a/accessible/src/msaa/nsAccessNodeWrap.h
+++ b/accessible/src/msaa/nsAccessNodeWrap.h
@@ -25,8 +25,8 @@
 #include "nsIDOMElement.h"
 #include "nsIContent.h"
 #include "nsAccessNode.h"
-#include "OLEIDL.H"
-#include "OLEACC.H"
+#include "oleidl.h"
+#include "oleacc.h"
 #include <winuser.h>
 #ifdef MOZ_CRASHREPORTER
 #include "nsICrashReporter.h"
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index 391e093..7b24967 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -40,9 +40,9 @@
 @BINPATH@/hyphenation/*
 @BINPATH@/@PREF_DIR@/firefox-l10n.js
 @BINPATH@/searchplugins/*
-#ifdef XP_WIN32
-@BINPATH@/uninstall/helper.exe
-#endif
+;#ifdef XP_WIN32
+;@BINPATH@/uninstall/helper.exe
+;#endif
 #ifdef MOZ_UPDATER
 @BINPATH@/update.locale
 @BINPATH@/updater.ini
diff --git a/configure.in b/configure.in
index 63c7bdb..988741e 100644
--- a/configure.in
+++ b/configure.in
@@ -701,6 +701,18 @@ EOF
             AC_MSG_ERROR([windres version $WINDRES_VERSION or higher is required to build.])
         fi
 
+        AC_CHECK_PROGS(MIDL, $target-widl widl)
+        if test -n "$MIDL"; then
+            case "$target" in
+            i*86-*)
+                MIDL_FLAGS="$MIDL_FLAGS --win32 -m32"
+                ;;
+            x86_64-*)
+                MIDL_FLAGS="$MIDL_FLAGS --win64 -m64"
+                ;;
+            esac
+        fi
+    
         MOZ_WINSDK_MAXVER=0x06020000
     fi # !GNU_CC
 
@@ -2240,6 +2252,7 @@ ia64*-hpux*)
         if test -n "$GNU_CC"; then
             CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport"
             CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport"
+            LDFLAGS="$LDFLAGS -Wl,--enable-stdcall-fixup -Wl,--large-address-aware"
         else
             AC_DEFINE(HAVE_STDCALL)
             DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86"
@@ -5705,7 +5718,7 @@ if test -n "$MOZ_WEBGL_DISABLED"; then
   MOZ_ANGLE_RENDERER=
 fi
 
-if test -n "$MOZ_ANGLE_RENDERER"; then
+if test -n "$MOZ_ANGLE_RENDERER" -a -z "$CROSS_COMPILE"; then
   # Get the SDK path from the registry.
   # First try to get the June 2010 SDK
   MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK (June 2010)' | head -n 1`
diff --git a/gfx/angle/Makefile.in b/gfx/angle/Makefile.in
index 981579c..78333c3 100644
--- a/gfx/angle/Makefile.in
+++ b/gfx/angle/Makefile.in
@@ -125,8 +125,12 @@ ifdef MOZ_ANGLE_RENDERER
 DIRS = src/libGLESv2 src/libEGL
 
 libs::
+ifdef MOZ_D3DX9_CAB
 	expand "$(MOZ_D3DX9_CAB)" -F:$(MOZ_D3DX9_DLL) "$(DIST)/bin"
+endif
+ifdef MOZ_D3DCOMPILER_CAB
 	expand "$(MOZ_D3DCOMPILER_CAB)" -F:$(MOZ_D3DCOMPILER_DLL) "$(DIST)/bin"
+endif
 
 endif
 
diff --git a/gfx/angle/src/libEGL/Makefile.in b/gfx/angle/src/libEGL/Makefile.in
index b643f1a..3f10262 100644
--- a/gfx/angle/src/libEGL/Makefile.in
+++ b/gfx/angle/src/libEGL/Makefile.in
@@ -68,9 +68,19 @@ RCFILE = $(srcdir)/libEGL.rc
 
 include $(topsrcdir)/config/rules.mk
 
+OS_LIBS += $(call EXPAND_LIBNAME,dwmapi)
+
+ifdef GNU_CC
+
+OS_CXXFLAGS := $(filter-out -fno-exceptions,$(OS_CXXFLAGS)) -fexceptions
+OS_LIBS += -ld3d9 -ldxguid -llibGLESv2
+
+else
+
 EXTRA_DSO_LDOPTS = "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/d3d9.lib" \
                    "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/dxguid.lib" \
 		   "$(DIST)/lib/libGLESv2.lib" \
-		   dwmapi.lib \
 		   delayimp.lib \
 		   /delayload:dwmapi.dll
+
+endif
diff --git a/gfx/angle/src/libGLESv2/Makefile.in b/gfx/angle/src/libGLESv2/Makefile.in
index 67bbd78..9a626b2 100644
--- a/gfx/angle/src/libGLESv2/Makefile.in
+++ b/gfx/angle/src/libGLESv2/Makefile.in
@@ -165,6 +165,22 @@ RCFILE = $(srcdir)/libGLESv2.rc
 
 include $(topsrcdir)/config/rules.mk
 
+ifdef GNU_CC
+
+TextureSSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
+
+OS_CXXFLAGS := $(filter-out -fno-exceptions,$(OS_CXXFLAGS)) -fexceptions
+OS_LIBS += -ld3d9
+ifdef MOZ_D3DX9_VERSION
+OS_LIBS += -ld3dx9_$(MOZ_D3DX9_VERSION) -ld3dcompiler_$(MOZ_D3DX9_VERSION)
+else
+OS_LIBS += -ld3dx9 -ld3dcompiler
+endif
+
+else
+
 EXTRA_DSO_LDOPTS = "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/d3d9.lib" \
                    "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/d3dx9.lib" \
                    "$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)/D3DCompiler.lib"
+
+endif
diff --git a/gfx/angle/src/libGLESv2/libGLESv2.def b/gfx/angle/src/libGLESv2/libGLESv2.def
index 5f935c3..2324dcb 100644
--- a/gfx/angle/src/libGLESv2/libGLESv2.def
+++ b/gfx/angle/src/libGLESv2/libGLESv2.def
@@ -180,3 +180,8 @@ EXPORTS
     glGetCurrentContext             @147 NONAME
     glGetProcAddress                @148 NONAME
     glBindTexImage                  @158 NONAME
+
+    ; GCC has problems with linking to undecored stdcall functions,
+    ; so we explicitly add aliases for APIs used by EGL
+    glGetProcAddress@4=glGetProcAddress
+    glBindTexImage@4=glBindTexImage
diff --git a/gfx/layers/d3d9/LayerManagerD3D9.cpp b/gfx/layers/d3d9/LayerManagerD3D9.cpp
index fcda692..c3f85e5 100644
--- a/gfx/layers/d3d9/LayerManagerD3D9.cpp
+++ b/gfx/layers/d3d9/LayerManagerD3D9.cpp
@@ -16,6 +16,7 @@
 #include "nsServiceManagerUtils.h"
 #include "gfxFailure.h"
 #include "mozilla/Preferences.h"
+#include "nsServiceManagerUtils.h"
 
 #include "gfxCrashReporterUtils.h"
 
diff --git a/js/src/configure.in b/js/src/configure.in
index e5962d6..bca3ff3 100644
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -1871,6 +1871,7 @@ ia64*-hpux*)
         if test -n "$GNU_CC"; then
             CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport"
             CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport"
+            LDFLAGS="$LDFLAGS -Wl,--large-address-aware"
         else
             DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86"
         fi
diff --git a/toolkit/crashreporter/google-breakpad/src/common/windows/guid_string.h b/toolkit/crashreporter/google-breakpad/src/common/windows/guid_string.h
index f8aa8a2..57716e5 100644
--- a/toolkit/crashreporter/google-breakpad/src/common/windows/guid_string.h
+++ b/toolkit/crashreporter/google-breakpad/src/common/windows/guid_string.h
@@ -32,7 +32,7 @@
 #ifndef COMMON_WINDOWS_GUID_STRING_H__
 #define COMMON_WINDOWS_GUID_STRING_H__
 
-#include <Guiddef.h>
+#include <guiddef.h>
 
 #include <string>
 
diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h
index dde77bf..32af401 100644
--- a/widget/windows/nsWindow.h
+++ b/widget/windows/nsWindow.h
@@ -33,7 +33,7 @@
 #include "TaskbarWindowPreview.h"
 
 #ifdef ACCESSIBILITY
-#include "OLEACC.H"
+#include "oleacc.h"
 #include "mozilla/a11y/Accessible.h"
 #endif
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits