svn commit: samba r2894 - branches/SAMBA_3_0/source trunk/source

tpot at samba.org tpot at samba.org
Sun Oct 10 12:01:15 GMT 2004


Author: tpot
Date: 2004-10-10 12:01:14 +0000 (Sun, 10 Oct 2004)
New Revision: 2894

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2894&nolog=1

Log:
Certain versions of GNU ld the default is not to have the 
--allow-shlib-undefined flag defined.  This causes a stackload of
warnings when building modules.

Fix by Michel Gravey which closes bugzilla #1776.

Modified:
   branches/SAMBA_3_0/source/configure.in
   trunk/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===================================================================
--- branches/SAMBA_3_0/source/configure.in	2004-10-10 05:29:59 UTC (rev 2893)
+++ branches/SAMBA_3_0/source/configure.in	2004-10-10 12:01:14 UTC (rev 2894)
@@ -288,6 +288,21 @@
 LD=ld
 AC_PROG_LD_GNU
 
+dnl Certain versions of GNU ld the default is not to have the 
+dnl --allow-shlib-undefined flag defined.  This causes a stackload of
+dnl warnings when building modules.
+if test "$ac_cv_prog_gnu_ld" = "yes"; then
+	ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
+	AC_MSG_CHECKING(GNU ld release date)
+	changequote(,)dnl
+	ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
+	changequote([,])dnl
+	AC_MSG_RESULT(${ac_cv_gnu_ld_date})
+ 	if test "$ac_cv_gnu_ld_date" -lt 20030217; then
+ 		ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
+ 	fi
+fi
+
 dnl needed before AC_TRY_COMPILE
 AC_ISC_POSIX
 
@@ -1129,7 +1144,11 @@
   case "$host_os" in
 		*linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
 			BLDSHARED="true"
-			LDSHFLAGS="-shared -Wl,-Bsymbolic" 
+			if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
+				LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined" 
+			else
+				LDSHFLAGS="-shared -Wl,-Bsymbolic" 
+			fi
 			DYNEXP="-Wl,--export-dynamic"
 			PICFLAGS="-fPIC"
 			SONAMEFLAG="-Wl,-soname="

Modified: trunk/source/configure.in
===================================================================
--- trunk/source/configure.in	2004-10-10 05:29:59 UTC (rev 2893)
+++ trunk/source/configure.in	2004-10-10 12:01:14 UTC (rev 2894)
@@ -289,6 +289,21 @@
 LD=ld
 AC_PROG_LD_GNU
 
+dnl Certain versions of GNU ld the default is not to have the 
+dnl --allow-shlib-undefined flag defined.  This causes a stackload of
+dnl warnings when building modules.
+if test "$ac_cv_prog_gnu_ld" = "yes"; then
+	ac_cv_gnu_ld_version=`$LD -v 2>/dev/null | head -1`
+	AC_MSG_CHECKING(GNU ld release date)
+	changequote(,)dnl
+	ac_cv_gnu_ld_date=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
+	changequote([,])dnl
+	AC_MSG_RESULT(${ac_cv_gnu_ld_date})
+ 	if test "$ac_cv_gnu_ld_date" -lt 20030217; then
+ 		ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
+ 	fi
+fi
+
 dnl needed before AC_TRY_COMPILE
 AC_ISC_POSIX
 
@@ -1131,7 +1146,11 @@
   case "$host_os" in
 		*linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
 			BLDSHARED="true"
-			LDSHFLAGS="-shared -Wl,-Bsymbolic" 
+			if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
+				LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined" 
+			else
+				LDSHFLAGS="-shared -Wl,-Bsymbolic" 
+			fi
 			DYNEXP="-Wl,--export-dynamic"
 			PICFLAGS="-fPIC"
 			SONAMEFLAG="-Wl,-soname="



More information about the samba-cvs mailing list