Skip to content

Commit

Permalink
Update the mac xpcom plugin for Gecko 2.0 (FF4). This is a platform s…
Browse files Browse the repository at this point in the history
…witch for

mac: ppc+i386 to i386+x86_64 to mirror Firefox's platform shift.

Also, fixup the linux libxul linkage: we had been getting lucky with -rdynamic
on linux for the JS symbols which can actually be found in libxul (and are
required for the mac build).

Review at http://gwt-code-reviews.appspot.com/1311802


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9597 8db76d5a-ed1c-0410-87a9-c151d255dfc7
  • Loading branch information
conroy@google.com committed Jan 24, 2011
1 parent c07e915 commit e0fbdff
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 12 deletions.
8 changes: 2 additions & 6 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,20 @@ endif
MARCH=$(ARCH)
ifeq ($(ARCH),x86)
MARCH=i386
OMARCH=ppc
endif
ifeq ($(ARCH),ppc)
OMARCH=i386
endif

# Set OS as well as CFLAGS, CXX, and other common make variables
ifeq ($(shell uname),Linux)
OS=linux
BASECFLAGS= -g -O2 -fPIC $(INC) -rdynamic
ARCHCFLAGS=-m$(FLAG32BIT)
ALLARCHCFLAGS=$(ARCHCFLAGS)
ALLARCHCFLAGS=
endif
ifeq ($(shell uname),Darwin)
OS=mac
BASECFLAGS= -g -O2 -fPIC $(INC) -D__mac
ARCHCFLAGS=-arch $(MARCH)
ALLARCHCFLAGS=-arch i386 -arch ppc
ALLARCHCFLAGS=-arch i386 -arch ppc -arch x86_64
AR=libtool
ARFLAGS=-static -o
endif
Expand Down
15 changes: 11 additions & 4 deletions xpcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ NSPR_DLLFLAGS = -lnspr4
MOZJS_DLLFLAGS = -lmozjs
MOZALLOC_DLLFLAGS =

#default ALLARCHFLAGS for pre-FF4
ALLARCHCFLAGS=-arch i386 -arch ppc

ifeq ($(BROWSER),ff3)
GECKO_VERSION = 1.9.0
CFLAGS += -DGECKO_VERSION=1900
Expand All @@ -93,8 +96,13 @@ ifeq ($(BROWSER),ff40)
GECKO_VERSION = 2.0.0
CFLAGS += -DGECKO_VERSION=2000
MOZALLOC_DLLFLAGS = -lmozalloc
#MOZJS is statically linked in FF4
MOZJS_DLLFLAGS =
MOZJS_DLLFLAGS = -lxul

#FF4 drops PPC, adds x86_64. Use FLAG32BIT as a switch in the unified headers.
ifeq ($(OS),mac)
ALLARCHCFLAGS = -arch i386 -arch x86_64 -Xarch_i386 -DFLAG32BIT=32 -Xarch_x86_64 -DFLAG32BIT=64
endif

else
$(error Unrecognized BROWSER of $(BROWSER) - options are ff3, ff3+, ff35, ff36, ff40)
endif
Expand Down Expand Up @@ -133,7 +141,6 @@ XPIDL = $(GECKO_SDK)/$(GECKO_PLATFORM)/bin/xpidl
XPIDL_FLAGS = -I$(GECKO_SDK)/idl

DLLFLAGS += \
-L$(DEFAULT_FIREFOX_LIBS) \
-L$(GECKO_LIBS) \
-Wl,$(RUN_PATH_FLAG),$(GECKO_LIBS) \
$(GECKO_DLLFLAGS) $(NSPR_DLLFLAGS) \
Expand Down Expand Up @@ -212,7 +219,7 @@ $(FF_HEADER): IOOPHM.idl $(OBJ_OUTDIR)
[ ! -x $(XPIDL) -o \( -e $(FF_HEADER) -a ! -w $(FF_HEADER) \) ] || $(XPIDL) $(XPIDL_FLAGS) -m header -e $@ $<

$(FF_DLL): $(FF_OBJS) $(COMMON)
$(CXX) -m$(FLAG32BIT) -o $@ $(FF_OBJS) $(COMMON) $(DLLFLAGS)
$(CXX) -o $@ $(FF_OBJS) $(COMMON) $(DLLFLAGS)
@mkdir -p $(FF_PLATFORM_DIR)
cp $(FF_DLL) $(FF_PLATFORM_DIR)/

Expand Down
1 change: 1 addition & 0 deletions xpcom/install-template.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<em:targetPlatform>Linux_x86_64-gcc3</em:targetPlatform>
<em:targetPlatform>WINNT_x86-msvc</em:targetPlatform>
<em:targetPlatform>Darwin_x86-gcc3</em:targetPlatform>
<em:targetPlatform>Darwin_x86_64-gcc3</em:targetPlatform>
<em:targetPlatform>Darwin_ppc-gcc3</em:targetPlatform>

<em:optionsURL>chrome://gwt-dev-plugin/content/options.xul</em:optionsURL>
Expand Down
6 changes: 4 additions & 2 deletions xpcom/prebuilt/extension/chrome.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ skin gwt-dev-plugin classic/1.0 skin/

binary-component lib/Linux_x86_64-gcc3/ff40/libgwt_dev_ff40.so ABI=Linux_x86_64-gcc3
binary-component lib/Linux_x86-gcc3/ff40/libgwt_dev_ff40.so ABI=Linux_x86-gcc3
# Windows and Mac are not yet supported
# binary-component lib/Darwin-gcc3/ff40/libgwt_dev_ff40.dylib ABI=Darwin_x86-gcc3
binary-component lib/Darwin-gcc3/ff40/libgwt_dev_ff40.dylib ABI=Darwin_x86_64-gcc3
binary-component lib/Darwin-gcc3/ff40/libgwt_dev_ff40.dylib ABI=Darwin_x86-gcc3

# Windows is not yet supported
# binary-component lib/WINNT_x86-msvc/ff40/xpGwtDevPlugin.dll ABI=WINNT_x86-msvc

interfaces components/IOOPHM.xpt
Expand Down
Binary file not shown.
Binary file modified xpcom/prebuilt/extension/lib/Darwin-gcc3/ff35/libgwt_dev_ff35.dylib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified xpcom/prebuilt/gwt-dev-plugin.xpi
Binary file not shown.

0 comments on commit e0fbdff

Please sign in to comment.