[SCM] Samba Shared Repository - branch v3-5-test updated
Karolin Seeger
kseeger at samba.org
Tue May 11 06:46:43 MDT 2010
The branch, v3-5-test has been updated
via 47e2bd2... s3:configure: use correct SONAMEFLAG on Solaris depending on which linker is being used (cherry picked from commit 358a3855c20153d7fe742ca2e6b9bd8a9c92e525)
via eff42fa... s3:configure: not simply check for "ld" but for the linker used by $CC
from b4b36e1... s3-net: Fix Bug #7417. 'net rpc user password' can set the wrong password.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test
- Log -----------------------------------------------------------------
commit 47e2bd2e29dca9cb5b503ae07f8935e70c687c71
Author: Björn Jacke <bj at sernet.de>
Date: Fri May 7 11:56:38 2010 +0200
s3:configure: use correct SONAMEFLAG on Solaris depending on which linker is being used
(cherry picked from commit 358a3855c20153d7fe742ca2e6b9bd8a9c92e525)
Fix bug #7385 (Can't compile. Undefined symbol 'main').
commit eff42fa66e561069959c401492c3b82a09b4742b
Author: Björn Jacke <bj at sernet.de>
Date: Wed May 5 20:17:39 2010 +0200
s3:configure: not simply check for "ld" but for the linker used by $CC
this hopefully fixes Solaris' gcc build which uses the system ld by default.
All in all we should clean up most of the compiler and linker flags depending
on the actual compilers and linkers we use. Only some tweaks are OS-specific.
A cleanup in this area should be done along with the move to a new build
system (whensoever that will be ...).
(cherry picked from commit 1969b4acc3fd7c124e288d0495b9b4665d4b42db)
Fix bug #7385 (Can't compile. Undefined symbol 'main').
-----------------------------------------------------------------------
Summary of changes:
source3/configure.in | 14 +++++++++-----
source3/m4/aclocal.m4 | 4 ++--
2 files changed, 11 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/configure.in b/source3/configure.in
index 3111d5a..74a2479 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -208,15 +208,14 @@ AC_SAMBA_PERL([true], [merged_build_possible=no])
AC_CHECK_TOOL(AR, ar)
-dnl Check if we use GNU ld
-LD=ld
+dnl Check if we (actually our C compiler!) use GNU 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_cv_gnu_ld_version=`$CC -Wl,-v /dev/null 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'`
@@ -1510,20 +1509,25 @@ DSO_EXPORTS=""
;;
*solaris*) AC_DEFINE(SUNOS5,1,[Whether the host os is solaris])
BLDSHARED="true"
- LDSHFLAGS="-G"
- SONAMEFLAG="-h "
if test "${GCC}" = "yes"; then
PICFLAG="-fPIC"
SONAMEFLAG="-Wl,-soname="
if test "${ac_cv_prog_gnu_ld}" = "yes"; then
DYNEXP="-Wl,-E"
fi
+ # TODO: need to add $CFLAGS here for explicit 64-bit builds?
+ LDSHFLAGS="-shared"
else
PICFLAG="-KPIC"
## ${CFLAGS} added for building 64-bit shared
## libs using Sun's Compiler
LDSHFLAGS="-G \${CFLAGS}"
fi
+ if test "$ac_cv_prog_gnu_ld" = "yes"; then
+ SONAMEFLAG="-Wl,-soname="
+ else
+ SONAMEFLAG="-Wl,-h,"
+ fi
AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly])
;;
diff --git a/source3/m4/aclocal.m4 b/source3/m4/aclocal.m4
index bdad6fa..7722487 100644
--- a/source3/m4/aclocal.m4
+++ b/source3/m4/aclocal.m4
@@ -363,9 +363,9 @@ EOF
dnl Copied from libtool.m4
AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[AC_CACHE_CHECK([if the linker used by compiler is GNU ld], ac_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+if $CC -Wl,-v /dev/null 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
ac_cv_prog_gnu_ld=yes
else
ac_cv_prog_gnu_ld=no
--
Samba Shared Repository
More information about the samba-cvs
mailing list