diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-11-08 02:01:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:25:21 -0500 |
commit | 667eedac90fd58e3a8bcc4450fdf493b6ca5faea (patch) | |
tree | a0bb595bf26d573c64292ba397332f9cbdd5aa01 /source4 | |
parent | f722b0743811a4a5caf5288fa901cc8f683b9ffd (diff) | |
download | samba-667eedac90fd58e3a8bcc4450fdf493b6ca5faea.tar.gz samba-667eedac90fd58e3a8bcc4450fdf493b6ca5faea.tar.bz2 samba-667eedac90fd58e3a8bcc4450fdf493b6ca5faea.zip |
r19634: Only use --allow-undef-shlib for modules.
(This used to be commit e8f2a086be2a0553467738df711b1450ba559848)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/m4/check_ld.m4 | 4 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4 index 129ee00ebc..ad514054cd 100644 --- a/source4/build/m4/check_ld.m4 +++ b/source4/build/m4/check_ld.m4 @@ -19,6 +19,7 @@ AC_SUBST(LD) 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 @@ AC_MSG_CHECKING([ability to build shared libraries]) 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=" diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 4cd7e5681b..eab713a4f3 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -146,6 +146,7 @@ STLD_FLAGS=$self->{config}->{STLD_FLAGS} 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 @@ sub SharedLibrary($$) 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 @@ $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_ \@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__ |