summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch')
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch b/dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch
new file mode 100644
index 00000000000..4ddc3461ea1
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.7.0-ldflags.patch
@@ -0,0 +1,42 @@
+Respect LDFLAGS
+
+http://bugs.gentoo.org/show_bug.cgi?id=331129
+
+--- js/src/Makefile.ref
++++ js/src/Makefile.ref
+@@ -87,7 +87,7 @@
+ LDFLAGS = $(XLDFLAGS)
+
+ ifndef NO_LIBM
+-LDFLAGS += -lm
++OTHER_LIBS += -lm
+ endif
+
+ # Prevent floating point errors caused by VC++ optimizations
+@@ -325,7 +325,7 @@
+ $(CC) -o $@ -c $(CFLAGS) $<
+
+ $(OBJDIR)/jskwgen$(HOST_BIN_SUFFIX): $(OBJDIR)/jskwgen.$(OBJ_SUFFIX)
+- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^
++ $(CC) $(HOST_LDFLAGS) -o $@ $(CFLAGS) $(OTHER_LIBS) $^
+
+ endif
+
+@@ -338,7 +338,7 @@
+ link.exe -out:"$@" $(EXE_LINK_FLAGS) $^
+ else
+ $(PROGRAM): $(PROG_OBJS) $(LIBRARY)
+- $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \
++ $(CC) $(HOST_LDFLAGS) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(OTHER_LIBS) \
+ $(PROG_LIBS)
+ endif
+
+@@ -355,7 +355,7 @@
+ $(OBJDIR)/jscpucfg > $@
+
+ $(OBJDIR)/jscpucfg: $(OBJDIR)/jscpucfg.o
+- $(CC) -o $@ $(OBJDIR)/jscpucfg.o
++ $(CC) $(HOST_LDFLAGS) -o $@ $(OBJDIR)/jscpucfg.o
+
+ # Add to TARGETS for clobber rule
+ TARGETS += $(OBJDIR)/jsautocfg.h $(OBJDIR)/jscpucfg \