https://bugzilla.mozilla.org/show_bug.cgi?id=323188

files: https://bugzilla.mozilla.org/attachment.cgi?id=208278
diffs: https://bugzilla.mozilla.org/attachment.cgi?id=208279

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.
_______________________________________________
mozilla-directory mailing list
mozilla-directory@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-directory

Reply via email to