Closed Bug 448955 Opened 16 years ago Closed 11 years ago

Make Dehydra movable

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: taras.mozilla, Unassigned)

References

Details

Seems like a good idea, but I'm not sure if this screws up mac support. Also, this would prevent Benjamin's static linking trick from working.
Vlad does this work on Mac?
Benjamin, ideas on how to keep static linking work with a change like this?

Bo's original post to the list:
  The now dehydra code link the spidermonkey shared library directly,
I mean ,  it just record where the library is, and try to load in a
fixed location. And this make the result dehydra only workable on a
system where the spidermonkey library should be the same location.
  So, I suggest the following change and this will make the Dehydra
movable and then I can package it with a cross-compiler toolchain.

diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -8,7 +8,7 @@
 #-I/$(HOME)/local/include/js/
 CFLAGS= -Wall -fPIC -DXP_UNIX $(INCLUDE) $(CONFIGURE_CFLAGS)
 COMMON=dehydra.o util.o dehydra_types.o
-LDFLAGS=  -lm $(SM_LIBDIR)/lib$(SM_NAME)$(SM_SUFFIX) $
(SHARED_LINK_FLAGS)
+LDFLAGS=  -lm -L$(SM_LIBDIR) -l$(SM_NAME)  $(SHARED_LINK_FLAGS)
 DEHYDRA_OBJS = dehydra_ast.o $(COMMON)
 TREEHYDRA_OBJS= treehydra.o treehydra_builtins.o treehydra_plugin.o
treehydra_generated.o $(DEHYDRA_OBJS)
 DEPDIR = .deps
Actually on mac you have to set DYLD_LIBRARY_PATH env var to point to the dir where the SpiderMonkey's lib is or make the dynamic linker know that in some other way even w/o this, so this patch pretty much changes nothing about mac port.
From the mailing list discussion, sounds like rpath is the way to go. Patch anyone?
Dehydra and treehydra are no longer maintained by Mozilla.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.