summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-06-27 15:37:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:29 -0500
commitd5b212caf4cffbd7ce53249bf831ca91ccc5e92d (patch)
tree8d6fbccaf4829b30fa1843b32c34d69f7bf7651a /source4/build
parentaa860b259e00c533a0e4d41da8bdd26cce0a76ef (diff)
downloadsamba-d5b212caf4cffbd7ce53249bf831ca91ccc5e92d.tar.gz
samba-d5b212caf4cffbd7ce53249bf831ca91ccc5e92d.tar.bz2
samba-d5b212caf4cffbd7ce53249bf831ca91ccc5e92d.zip
r23631: when linking shared libraries we need to make shure the linker doesn't
skip "unneeded" object files from within .a files. If the build-farm doesn't like -Wl,--whole-archive, I'll add some more configure logic fix it tomorrow. Kai: with this your libnss_winbind.so patch works for me metze (This used to be commit d2609580846647b3c0d4e88e106a9763cd7074ef)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/makefile.pm20
1 files changed, 16 insertions, 4 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 1102e85fef..4d119b1eaa 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -247,16 +247,28 @@ sub array2oneperline($)
return $output;
}
-sub _prepare_list($$$)
+sub _prepare_list_ex($$$$$)
{
- my ($self,$ctx,$var) = @_;
+ my ($self,$ctx,$var,$pre,$post) = @_;
+ my @tmparr = ();
+
+ push(@tmparr, $pre) if defined($pre);
+ push(@tmparr, @{$ctx->{$var}}) if defined($ctx->{$var});
+ push(@tmparr, $post) if defined($post);
- my $tmplist = array2oneperline($ctx->{$var});
+ my $tmplist = array2oneperline(\@tmparr);
return if ($tmplist eq "");
$self->output("$ctx->{TYPE}\_$ctx->{NAME}_$var =$tmplist\n");
}
+sub _prepare_list($$$)
+{
+ my ($self,$ctx,$var) = @_;
+
+ $self->_prepare_list_ex($ctx, $var, undef, undef);
+}
+
sub Integrated($$)
{
my ($self,$ctx) = @_;
@@ -302,7 +314,7 @@ sub SharedLibrary($$)
$self->_prepare_list($ctx, "FULL_OBJ_LIST");
}
$self->_prepare_list($ctx, "DEPEND_LIST");
- $self->_prepare_list($ctx, "LINK_FLAGS");
+ $self->_prepare_list_ex($ctx, "LINK_FLAGS", "-Wl,--whole-archive", "-Wl,--no-whole-archive");
push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)");