gecko-dev/directory
richm%stanfordalumni.org 75853eee2e bug 323188: Link order is important when building executables
It also seems to be important in certain cases when using g++
to build shared libraries.
I was having weird errors building the CLUs on linux x86_64.  These turned out to be due to the incorrect ordering of objects on the link line.

The LINK_EXE macro already has everything needed - it is not necessary to
supply extra libs in the form of the LDTOOLS_LIBS.  Just specify them in the
correct order in EXTRA_LIBS.  You don't need to set EXTRA_LIBS for every
platform - on *nix platforms, they are all the same, so just define them in a
common place in the correct order.  Use PLATFORMLIBS to specify platform
dependent libs.

The one tricky thing is that LINK_EXE expects OBJS to have all of the objects.
This works if you only build one executable per makefile, but this makefile
builds several, so you need to get the executable specific .obj file in the
link line as well.  I suppose I could have used target specific variable
assignment to OBJS, but that seemed messy to me, so I just added a $(filter ..)
to the LINK_EXE command which will add all of the .obj files specified in the
executable link target dependency list to the link line.  The filter is to
filter out libraries and other dependencies, which are usually specified
elsewhere.  This seems to work on linux x86_64 and HP IPF 64 just fine.
2006-01-13 15:35:45 +00:00
..
c-sdk bug 323188: Link order is important when building executables 2006-01-13 15:35:45 +00:00
ds-plugins Bug 236613: change to MPL/LGPL/GPL tri-license. 2005-12-13 13:25:40 +00:00
java-sdk Bug: 309518 2005-09-23 15:05:55 +00:00
perldap Merged in changes from v1.4.1. 2000-10-05 19:47:47 +00:00
tools Bug fix: root CA shared lib was being copied when it should not have been. 2003-12-19 22:29:47 +00:00
xpcom Bug 92650 directory/xpcom/public/nsLDAP.h should go away. r/sr=dmose 2006-01-11 18:51:12 +00:00
Makefile HAVE_SVRCORE is now an external option since it has been open sourced in mozilla/security/svrcore 2005-03-10 16:07:34 +00:00
buildjsdk.txt
ldapsdk.mak Additional fix for bug # 205419 - Relicense LDAP C SDK (directory/c-sdk). 2003-10-15 17:26:10 +00:00
ldapsdk.mk Additional fix for bug # 205419 - Relicense LDAP C SDK (directory/c-sdk). 2003-10-15 17:26:10 +00:00