summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-04-02 17:23:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:43 -0500
commit2e588454fe160b39bd8134a2fb9cbac4fba39e2a (patch)
treefc300e089a498bb16fc8d3d28e9554c4ff7c23dd /source4/build/smb_build
parent051e4b25cf2bfedfca9355e43eacede966dbf257 (diff)
downloadsamba-2e588454fe160b39bd8134a2fb9cbac4fba39e2a.tar.gz
samba-2e588454fe160b39bd8134a2fb9cbac4fba39e2a.tar.bz2
samba-2e588454fe160b39bd8134a2fb9cbac4fba39e2a.zip
r22035: Introduce HOSTLD which is needed to link the asn1 compiler when cross
compiling. (This used to be commit 976343821b99b04725c9fddee42dbcd0261c2d51)
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r--source4/build/smb_build/makefile.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 43391d8775..926d83f0f7 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -141,6 +141,9 @@ INSTALL_LINK_FLAGS=$extra_link_flags
LD=$self->{config}->{LD}
LDFLAGS=$self->{config}->{LDFLAGS} -L$libdir
+HOSTLD=$self->{config}->{HOSTLD}
+# It's possible that we ought to have HOSTLD_LDFLAGS as well
+
STLD=$self->{config}->{STLD}
STLD_FLAGS=$self->{config}->{STLD_FLAGS}
@@ -387,11 +390,23 @@ sub Binary($$)
$self->output(<< "__EOD__"
$installdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)
\@echo Linking \$\@
+__EOD__
+ );
+
+ if ($ctx->{"USE_HOSTCC"} =~ m/yes/i) {
+ $self->output(<< "__EOD__"
+ \@\$(HOSTLD) \$(LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
+ \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS)
+__EOD__
+ );
+ } else {
+ $self->output(<< "__EOD__"
\@\$(LD) \$(LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
\$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS)
__EOD__
-);
+ );
+ }
}
sub Manpage($$)