]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix mod_spidermonkey build on FreeBSD, (Undefined symbol
authorStefan Knoblich <s.knoblich@axsentis.de>
Tue, 3 Aug 2010 11:18:00 +0000 (13:18 +0200)
committerStefan Knoblich <s.knoblich@axsentis.de>
Tue, 3 Aug 2010 11:18:00 +0000 (13:18 +0200)
PR_LocalTimeParameters).

Move nspr libs to AM_LIBADD to make sure they are _after_ libjs.so.1,
so missing PR_* symbols in libjs can be resolved.

Having all those nspr libs in AM_LDFLAGS will make them to end up before
libjs on the final linker commandline.

The wrong order caused the build-time linker to discard nspr,
since nothing had unresolved symbols belonging to it at that point.
(mod_spidermonkey does not use any PR_* functions/objects.)

Compile + load tested on FreeBSD-8.1.

src/mod/languages/mod_spidermonkey/Makefile.am

index 7ec68928a56f48395885cb062429337f4a16568a..34178bda08dba8d91575d1f5d6c4a3d2051156d2 100644 (file)
@@ -12,9 +12,9 @@ JSLA=$(JS_BUILDDIR)/libjs.la
 
 AM_CFLAGS  += -I. -I$(JS_DIR)/src -I$(JS_DIR)/nsprpub/dist/include/nspr
 AM_CFLAGS  += -DXP_UNIX  -DJS_THREADSAFE -DJS_HAS_FILE_OBJECT=1 -DJS_HAS_XML_SUPPORT=1
-AM_LIBADD   = $(switch_builddir)/libfreeswitch.la $(JSLA)
+AM_LIBADD   = $(switch_builddir)/libfreeswitch.la $(JSLA) -lnspr4 $(JS_BUILDDIR)/nsprpub/pr/src/libnspr4.*
 AM_LDFLAGS += -avoid-version -module -no-undefined -shared 
-AM_LDFLAGS += -L$(JS_BUILDDIR)/nsprpub/dist/lib -lnspr4 $(JS_BUILDDIR)/nsprpub/pr/src/libnspr4.*
+AM_LDFLAGS += -L$(JS_BUILDDIR)/nsprpub/dist/lib
 BUILT_SOURCES = $(JSLA) $(LIBCURL_DEPS)
 
 mod_LTLIBRARIES              = mod_spidermonkey.la