Closed Bug 547715 Opened 14 years ago Closed 14 years ago

jsapi-tests don't build when using -Wl,--as-needed

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 621812

People

(Reporter: glandium, Unassigned)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
c++ -o jsapi-tests  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -g -fno-strict-aliasing -pthread -pipe  -DNDEBUG -DTRIMMED -Os -freorder-blocks -fno-reorder-functions   tests.o selfTest.o testPropCache.o testXDR.o testIntString.o testIsAboutToBeFinalized.o testSameValue.o testDebugger.o testDefineGetterSetterNonEnumerable.o testExtendedEq.o    -Wl,--as-needed -lpthread   -Wl,-rpath-link,/bin -Wl,-rpath-link,/lib  -L../../../dist/bin -L../../../dist/lib -L/usr/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl ../libjs_static.a -ldl -lm      
../libjs_static.a(jsapi.o): In function `JS_ClearContextThread':
/tmp/xulrunner/js/src/jsapi.cpp:5901: undefined reference to `PR_Lock'
/tmp/xulrunner/js/src/jsapi.cpp:5904: undefined reference to `PR_Unlock'
../libjs_static.a(jsapi.o): In function `JS_SetContextThread':
/tmp/xulrunner/js/src/jsapi.cpp:5876: undefined reference to `PR_Unlock'
../libjs_static.a(jsapi.o): In function `JS_DropPrincipals':
/tmp/xulrunner/js/src/jsapi.cpp:4184: undefined reference to `PR_AtomicDecrement'
../libjs_static.a(jsapi.o): In function `JS_ToggleOptions':
/tmp/xulrunner/js/src/jsapi.cpp:1184: undefined reference to `PR_Lock'
/tmp/xulrunner/js/src/jsapi.cpp:1189: undefined reference to `PR_Unlock'
(snip)

This is because the static library comes after the nspr link flags.
Summary: jsapi-tests don't build when using system nspr and -Wl,--as-needed → jsapi-tests don't build when using -Wl,--as-needed
Attachment #428200 - Attachment is patch: true
Attachment #428200 - Attachment mime type: application/octet-stream → text/plain
Attachment #428200 - Flags: review?(brendan)
Attachment #428200 - Flags: review?(brendan) → review?(jim)
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Attachment #428200 - Flags: review?(jimb)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: