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

jelmer at samba.org jelmer at samba.org
Wed Nov 8 02:01:32 GMT 2006


Author: jelmer
Date: 2006-11-08 02:01:31 +0000 (Wed, 08 Nov 2006)
New Revision: 19634

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

Log:
Only use --allow-undef-shlib for modules. 

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-08 01:48:35 UTC (rev 19633)
+++ branches/SAMBA_4_0/source/build/m4/check_ld.m4	2006-11-08 02:01:31 UTC (rev 19634)
@@ -19,6 +19,7 @@
 AC_SUBST(LDFLAGS)
 AC_SUBST(SHLD)
 AC_SUBST(SHLD_FLAGS)
+AC_SUBST(SHLD_UNDEF_FLAGS)
 AC_SUBST(SHLIBEXT)
 AC_SUBST(SONAMEFLAG)
 AC_SUBST(PICFLAG)
@@ -42,7 +43,8 @@
 case "$host_os" in
 	*linux*)
 		BLDSHARED="true"
-		SHLD_FLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined" 
+		SHLD_FLAGS="-shared -Wl,-Bsymbolic"
+		SHLD_UNDEF_FLAGS="-Wl,--allow-shlib-undefined"
 		LDFLAGS="-Wl,--export-dynamic"
 		PICFLAG="-fPIC"
 		SONAMEFLAG="-Wl,-soname="

Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-11-08 01:48:35 UTC (rev 19633)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-11-08 02:01:31 UTC (rev 19634)
@@ -146,6 +146,7 @@
 
 SHLD=$self->{config}->{SHLD}
 SHLD_FLAGS=$self->{config}->{SHLD_FLAGS} -L$libdir
+SHLD_UNDEF_FLAGS=$self->{config}->{SHLD_UNDEF_FLAGS}
 SHLIBEXT=$self->{config}->{SHLIBEXT}
 
 XSLTPROC=$self->{config}->{XSLTPROC}
@@ -243,11 +244,13 @@
 
 	push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)");
 
+	my $extraflags = "";
 	if ($ctx->{TYPE} eq "MODULE" and defined($ctx->{INIT_FUNCTION})) {
 		my $init_fn = $ctx->{INIT_FUNCTION_TYPE};
 		$init_fn =~ s/\(\*\)/init_module/;
 		my $proto_fn = $ctx->{INIT_FUNCTION_TYPE};
 		$proto_fn =~ s/\(\*\)/$ctx->{INIT_FUNCTION}/;
+		$extraflags = "\$(SHLD_UNDEF_FLAGS)";
 
 		$self->output(<< "__EOD__"
 bin/$ctx->{NAME}_init_module.c:
@@ -285,7 +288,7 @@
 	\@echo Linking \$\@
 	\@mkdir -p $ctx->{SHAREDDIR}
 	\@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
-		\$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) \\
+		\$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) $extraflags \\
 		\$($ctx->{TYPE}_$ctx->{NAME}\_FULL_OBJ_LIST) $soarg \\
 		$init_obj $singlesoarg 
 __EOD__



More information about the samba-cvs mailing list