svn commit: samba r23631 - in branches/SAMBA_4_0/source/build/smb_build: .

metze at samba.org metze at samba.org
Wed Jun 27 15:37:04 GMT 2007


Author: metze
Date: 2007-06-27 15:37:03 +0000 (Wed, 27 Jun 2007)
New Revision: 23631

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23631

Log:
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
Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2007-06-27 12:35:12 UTC (rev 23630)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2007-06-27 15:37:03 UTC (rev 23631)
@@ -247,16 +247,28 @@
 	return $output;
 }
 
-sub _prepare_list($$$)
+sub _prepare_list_ex($$$$$)
 {
-	my ($self,$ctx,$var) = @_;
+	my ($self,$ctx,$var,$pre,$post) = @_;
+	my @tmparr = ();
 
-	my $tmplist = array2oneperline($ctx->{$var});
+	push(@tmparr, $pre) if defined($pre);
+	push(@tmparr, @{$ctx->{$var}}) if defined($ctx->{$var});
+	push(@tmparr, $post) if defined($post);
+
+	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 @@
 		$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)");
 



More information about the samba-cvs mailing list