svn commit: samba r19631 - in branches/SAMBA_4_0/source/build: m4 smb_build

jelmer at samba.org jelmer at samba.org
Wed Nov 8 01:37:29 GMT 2006


Author: jelmer
Date: 2006-11-08 01:37:28 +0000 (Wed, 08 Nov 2006)
New Revision: 19631

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

Log:
Re-enable shared libraries, but don't use -rpath-link unless 
shared libraries are actually used.

Modified:
   branches/SAMBA_4_0/source/build/m4/check_ld.m4
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_ld.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/check_ld.m4	2006-11-07 23:48:02 UTC (rev 19630)
+++ branches/SAMBA_4_0/source/build/m4/check_ld.m4	2006-11-08 01:37:28 UTC (rev 19631)
@@ -187,9 +187,6 @@
 	    AC_MSG_WARN([cannot run when cross-compiling]))
 
 
-# TODO: remove this line when our shared libs correctly link without unresolved symbols
-BLDSHARED=false
-
 USESHARED=false
 AC_SUBST(USESHARED)
 

Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-11-07 23:48:02 UTC (rev 19630)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-11-08 01:37:28 UTC (rev 19631)
@@ -108,9 +108,11 @@
 
 	my $builddir_headers = "";
 	my $libdir;
+	my $extra_link_flags = "";
 
 	if ($self->{config}->{USESHARED} eq "true") {
 		$libdir = "\$(builddir)/bin/shared";
+		$extra_link_flags = "-Wl,-rpath-link,\$(builddir)/bin/shared";
 	} else {
 		$libdir = "\$(builddir)/bin/static";
 	}
@@ -134,6 +136,8 @@
 HOSTCC=$self->{config}->{HOSTCC}
 HOSTCC_CFLAGS=-D_SAMBA_HOSTCC_ $self->{config}->{CFLAGS} \$(CPPFLAGS)
 
+INSTALL_LINK_FLAGS=$extra_link_flags
+
 LD=$self->{config}->{LD} 
 LDFLAGS=$self->{config}->{LDFLAGS} -L$libdir
 
@@ -280,7 +284,7 @@
 $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $init_obj
 	\@echo Linking \$\@
 	\@mkdir -p $ctx->{SHAREDDIR}
-	\@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \\
+	\@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
 		\$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) \\
 		\$($ctx->{TYPE}_$ctx->{NAME}\_FULL_OBJ_LIST) $soarg \\
 		$init_obj $singlesoarg 
@@ -369,7 +373,8 @@
 $self->output(<< "__EOD__"
 $installdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)
 	\@echo Linking \$\@
-	\@\$(LD) \$(LDFLAGS) -o \$\@ \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS)
+	\@\$(LD) \$(LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
+		\$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) 
 
 __EOD__
 );



More information about the samba-cvs mailing list