Reviewers: jat, fabiomfv,
Description:
For the xpcom plugin, detect if the system linker is GNU gold. If so,
try to use compat-ld instead
Review by: [email protected]
Please review this at http://gwt-code-reviews.appspot.com/1008801/show
Affected files:
M plugins/xpcom/Makefile
Index: plugins/xpcom/Makefile
===================================================================
--- plugins/xpcom/Makefile (revision 9048)
+++ plugins/xpcom/Makefile (working copy)
@@ -24,7 +24,7 @@
DEFAULT_FIREFOX_LIBS ?= /Applications/Firefox.app/Contents/MacOS
RUN_PATH_FLAG = -executable_path
DLL_SUFFIX = .dylib
-DLLFLAGS = -bundle $(ALLARCHCFLAGS)
+DLLFLAGS += -bundle $(ALLARCHCFLAGS)
CFLAGS += $(ALLARCHCFLAGS)
CXXFLAGS += $(ALLARCHCFLAGS)
TARGET_PLATFORM = Darwin-gcc3
@@ -35,13 +35,13 @@
DEFAULT_FIREFOX_LIBS ?= /usr/lib/firefox
RUN_PATH_FLAG = -rpath-link
DLL_SUFFIX = .so
-DLLFLAGS = -shared -m$(FLAG32BIT)
+DLLFLAGS += -shared -m$(FLAG32BIT)
TARGET_PLATFORM = Linux_$(ARCH)-gcc3
else
ifeq ($(OS),sun)
TARGET_PLATFORM = SunOS_$(ARCH)-sunc
RUN_PATH_FLAG = -rpath-link
-DLLFLAGS=
+DLLFLAGS ?= ""
endif
endif
endif
@@ -51,6 +51,14 @@
ifeq ($(BROWSER),)
$(warning Defaulting to FF3 build [set with BROWSER=ff2, ff3, ff3+, ff35,
or ff36])
BROWSER=ff3
+endif
+
+# Gold doesn't play nice with xpcom libs
+LINKER=$(shell ld -v | awk '{print $$2}')
+ifeq ($(LINKER), gold)
+CFLAGS += -B/usr/lib/compat-ld/
+CXXFLAGS += -B/usr/lib/compat-ld/
+DLLFLAGS += -B/usr/lib/compat-ld/
endif
CFLAGS += -DBROWSER=$(BROWSER)
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors