[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha2-930-g8c2f658
Andrew Bartlett
abartlet at samba.org
Wed Feb 20 08:21:29 GMT 2008
The branch, v4-0-test has been updated
via 8c2f658a9688f0c51d2f3b948dc3213b65c7b77f (commit)
from 02cb396d42976efc03fcb0082e914eb17ae72e11 (commit)
http://gitweb.samba.org/?samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit 8c2f658a9688f0c51d2f3b948dc3213b65c7b77f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Wed Feb 20 19:20:13 2008 +1100
Simpler specification of CFLAGS and LDFLAGS
By being more consistant in applying CFLAGS and LDFLAGS (in
particular) to every invocation, we make it simpler to enable gcov
code coverage, both in the build system and on the build farm.
Andrew Bartlett
-----------------------------------------------------------------------
Summary of changes:
source/Makefile | 4 ++--
source/build/m4/check_ld.m4 | 17 ++++++++++-------
source/build/smb_build/makefile.pm | 4 ++--
source/torture/config.mk | 10 ++--------
4 files changed, 16 insertions(+), 19 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/Makefile b/source/Makefile
index ea98b5e..1fddfef 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -14,10 +14,10 @@ SETUPDIR = $(datadir)/setup
NCALRPCDIR = $(localstatedir)/ncalrpc
BNLD = $(LD)
-BNLD_FLAGS = $(LDFLAGS)
+BNLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
HOSTCC_FLAGS = -D_SAMBA_HOSTCC_ $(CFLAGS)
-HOSTLD_FLAGS = $(LDFLAGS)
+HOSTLD_FLAGS = $(LDFLAGS) $(SYS_LDFLAGS)
default: all
diff --git a/source/build/m4/check_ld.m4 b/source/build/m4/check_ld.m4
index 3b69057..0d0742e 100644
--- a/source/build/m4/check_ld.m4
+++ b/source/build/m4/check_ld.m4
@@ -13,6 +13,7 @@ LD=""
AC_SUBST(BLDSHARED)
AC_SUBST(LD)
+AC_SUBST(SYS_LDFLAGS)
AC_SUBST(LDFLAGS)
# Assume non-shared by default and override below
@@ -32,13 +33,13 @@ AC_MSG_CHECKING([whether to try to build shared libraries on $host_os])
case "$host_os" in
*linux*)
BLDSHARED="true"
- LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ SYS_LDFLAGS="-Wl,--export-dynamic"
;;
*solaris*)
BLDSHARED="true"
if test "${GCC}" = "yes"; then
if test "${ac_cv_prog_gnu_ld}" = "yes"; then
- LDFLAGS="$LDFLAGS -Wl,-E"
+ SYS_LDFLAGS="-Wl,-E"
fi
fi
;;
@@ -47,26 +48,26 @@ case "$host_os" in
;;
*netbsd* | *freebsd* | *dragonfly* )
BLDSHARED="true"
- LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ SYS_LDFLAGS="-Wl,--export-dynamic"
;;
*openbsd*)
BLDSHARED="true"
- LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
+ SYS_LDFLAGS="-Wl,-Bdynamic"
;;
*irix*)
BLDSHARED="true"
;;
*aix*)
BLDSHARED="true"
- LDFLAGS="$LDFLAGS -Wl,-brtl,-bexpall,-bbigtoc"
+ SYS_LDFLAGS="-Wl,-brtl,-bexpall,-bbigtoc"
;;
*hpux*)
# Use special PIC flags for the native HP-UX compiler.
BLDSHARED="true" # I hope this is correct
if test "$host_cpu" = "ia64"; then
- LDFLAGS="$LDFLAGS -Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
+ SYS_LDFLAGS="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
else
- LDFLAGS="$LDFLAGS -Wl,-E,+b/usr/local/lib:/usr/lib"
+ SYS_LDFLAGS="-Wl,-E,+b/usr/local/lib:/usr/lib"
fi
;;
*osf*)
@@ -86,6 +87,8 @@ AC_MSG_CHECKING([LD])
AC_MSG_RESULT([$LD])
AC_MSG_CHECKING([LDFLAGS])
AC_MSG_RESULT([$LDFLAGS])
+AC_MSG_CHECKING([SYS_LDFLAGS])
+AC_MSG_RESULT([$SYS_LDFLAGS])
AC_SUBST(HOSTLD)
diff --git a/source/build/smb_build/makefile.pm b/source/build/smb_build/makefile.pm
index d11e761..498b619 100644
--- a/source/build/smb_build/makefile.pm
+++ b/source/build/smb_build/makefile.pm
@@ -187,7 +187,7 @@ __EOD__
$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) $init_obj
\@echo Linking \$\@
\@mkdir -p $ctx->{SHAREDDIR}
- \@\$(MDLD) \$(MDLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
+ \@\$(MDLD) \$(LDFLAGS) \$(MDLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
\$($ctx->{NAME}\_FULL_OBJ_LIST) $init_obj \\
\$($ctx->{NAME}_LINK_FLAGS)
__EOD__
@@ -242,7 +242,7 @@ sub SharedLibrary($$)
$ctx->{RESULT_SHARED_LIBRARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST)
\@echo Linking \$\@
\@mkdir -p $ctx->{SHAREDDIR}
- \@\$(SHLD) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
+ \@\$(SHLD) \$(LDFLAGS) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
\$($ctx->{NAME}\_FULL_OBJ_LIST) \\
\$($ctx->{NAME}_LINK_FLAGS) \\
$soarg$lns
diff --git a/source/torture/config.mk b/source/torture/config.mk
index 82e32e1..626349a 100644
--- a/source/torture/config.mk
+++ b/source/torture/config.mk
@@ -370,17 +370,11 @@ MANPAGE = man/locktest.1
# End BINARY locktest
#################################
-GCOV_FLAGS = --coverage
-
COV_TARGET = test
COV_VARS = \
- CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \
- BNLD_FLAGS="$(BNLD_FLAGS) $(GCOV_FLAGS)" \
- SHLD_FLAGS="$(SHLD_FLAGS) $(GCOV_FLAGS)" \
- MDLD_FLAGS="$(MDLD_FLAGS) $(GCOV_FLAGS)" \
- HOSTCC_FLAGS="$(HOSTCC_FLAGS) $(GCOV_FLAGS)" \
- HOSTLD_FLAGS="$(HOSTLD_FLAGS) $(GCOV_FLAGS)"
+ CFLAGS="$(CFLAGS) --coverage" \
+ LDFLAGS="$(LDFLAGS) --coverage"
test_cov:
-$(MAKE) $(COV_TARGET) $(COV_VARS)
--
Samba Shared Repository
More information about the samba-cvs
mailing list