r4813: this is a temporary solution to a link problem we have on some
authorAndrew Tridgell <tridge@samba.org>
Tue, 18 Jan 2005 03:27:12 +0000 (03:27 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:08:58 +0000 (13:08 -0500)
platforms. The problem is that some loaders (for example the IRIX 6.5
machine us4 in the build farm) must have libs listed after object
files that depend on them on the link line. If you put the libs first
then all the symbols in the libs remain unresolved.

I think the correct fix for this is to separate xxx_LINK_LIBS out from
the current xxx_LINK_FLAGS, and use xxx_LINK_FLAGS followed by
xxx_LINK_LIST followed by xxx_LINK_LIBS. I'm hoping metze or jelmer,
as our build wizards, might take a look at this when they get time.

This interim fix should work fine, but its rather ugly, as it lists
the flags and libs twice in each link.
(This used to be commit db7d43fbb95748c85316b41ad3dc4eb967ed8a08)

source4/build/smb_build/makefile.pm

index 0855beed081233e18efa3fe543d10cf3479ce497..dae347f13f1aea833fdab7b92c470094ab42ba95 100644 (file)
@@ -487,7 +487,8 @@ bin/$ctx->{BINARY}: bin/.dummy \$(BINARY_$ctx->{NAME}_DEPEND_LIST)
        \@echo Linking \$\@
        \@\$(LD) \$(LD_FLAGS) -o \$\@ \\
                \$(BINARY_$ctx->{NAME}_LINK_FLAGS) \\
-               \$(BINARY_$ctx->{NAME}_LINK_LIST)
+               \$(BINARY_$ctx->{NAME}_LINK_LIST) \\
+               \$(BINARY_$ctx->{NAME}_LINK_FLAGS)
 binary_$ctx->{BINARY}: basics bin/$ctx->{BINARY}
 # End Binary $ctx->{BINARY}
 ###################################