[SCM] Samba Shared Repository - branch master updated

Björn Jacke bjacke at samba.org
Tue Oct 30 08:05:02 MDT 2012


The branch, master has been updated
       via  e6643fb wafbuild: use -Wstack-protector if available
       via  9a03cc9 wafbuild: use WERROR_FLAGS in wscript_configure_system_mitkrb5
       via  fdead58 ccan/wafbuild: use WERROR_CFLAGS instead of -Werror
       via  7fcb253 wafbuild: reorder the Werror checks so that the ambigous w2 option is being checked last
       via  5169204 wafbuild: merge the missing IBM compiler Werror flag "-qhalt=w" to waf
       via  0342ca4 wfabuild: fix the -errwarn compile flag test
      from  a3a1cd4 packaging: Add NetworkManager dispatcher script for winbind.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e6643fbf48afccd0acedb65fbe24d3ce84d44c40
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 13:00:58 2012 +0100

    wafbuild: use -Wstack-protector if available
    
    Autobuild-User(master): Björn Jacke <bj at sernet.de>
    Autobuild-Date(master): Tue Oct 30 15:04:30 CET 2012 on sn-devel-104

commit 9a03cc93f45a6908c73afe2d059a4ebf5534fdb7
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 12:19:24 2012 +0100

    wafbuild: use WERROR_FLAGS in wscript_configure_system_mitkrb5

commit fdead585dc11101761ac975935134c6a84ea3b4f
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 12:07:26 2012 +0100

    ccan/wafbuild: use WERROR_CFLAGS instead of -Werror

commit 7fcb2532b99ddf65d78dd02ea06ce8a1a6229949
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 11:48:25 2012 +0100

    wafbuild: reorder the Werror checks so that the ambigous w2 option is being checked last

commit 51692042d9f898c5e8f1cbc78031e37d23ec032a
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 11:37:34 2012 +0100

    wafbuild: merge the missing IBM compiler Werror flag "-qhalt=w" to waf

commit 0342ca40629d5a57db02c7f840809dfa0bde6780
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Oct 30 11:32:52 2012 +0100

    wfabuild: fix the -errwarn compile flag test
    
    as in the autoconf build this must be "-errwarn=%all"

-----------------------------------------------------------------------

Summary of changes:
 lib/ccan/wscript                 |   17 +++++++----------
 lib/replace/wscript              |    9 ++++++++-
 lib/util/util_net.c              |    3 +++
 wscript_configure_system_mitkrb5 |    4 ++--
 4 files changed, 20 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ccan/wscript b/lib/ccan/wscript
index 4af9dd4..59b8205 100644
--- a/lib/ccan/wscript
+++ b/lib/ccan/wscript
@@ -7,26 +7,23 @@ def configure(conf):
     conf.CHECK_HEADERS('err.h')
     conf.CHECK_HEADERS('byteswap.h')
     conf.CHECK_FUNCS('bswap_64', link=False, headers="byteswap.h")
-
-    # FIXME: if they don't have -Werror, these will all fail.  But they
-    # probably will anyway...
     conf.CHECK_CODE('int __attribute__((cold)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_COLD')
     conf.CHECK_CODE('int __attribute__((const)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_CONST')
     conf.CHECK_CODE('void __attribute__((noreturn)) func(int x) { exit(x); }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_NORETURN')
     conf.CHECK_CODE('void __attribute__((format(__printf__, 1, 2))) func(const char *fmt, ...) { }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_PRINTF')
     conf.CHECK_CODE('int __attribute__((unused)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_UNUSED')
     conf.CHECK_CODE('int __attribute__((used)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_ATTRIBUTE_USED')
     # We try to use headers for a compile-time test.
     conf.CHECK_CODE(code = """#ifdef __BYTE_ORDER
@@ -121,7 +118,7 @@ def configure(conf):
                     link=True,
                     define='HAVE_TYPEOF')
     conf.CHECK_CODE('int __attribute__((warn_unused_result)) func(int x) { return x; }',
-                    addmain=False, link=False, cflags="-Werror",
+                    addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'],
                     define='HAVE_WARN_UNUSED_RESULT')
 
     # backtrace could be in libexecinfo or in libc
diff --git a/lib/replace/wscript b/lib/replace/wscript
index c21a8f8..9dfa985 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -53,8 +53,15 @@ struct foo bar = { .y = 'X', .x = 1 };
                 conf.ADD_CFLAGS(f)
             break
 
+    if conf.CHECK_CFLAGS(['-Wstack-protector']):
+	    conf.ADD_CFLAGS('-Wstack-protector')
+
     # Try to find the right extra flags for -Werror behaviour
-    for f in ["-Werror", "-w2", "-errwarn"]:
+    for f in ["-Werror",       # GCC
+	      "-errwarn=%all", # Sun Studio
+	      "-qhalt=w",     # IBM xlc
+	      "-w2",           # Tru64
+	      ]:
         if conf.CHECK_CFLAGS([f], '''
 '''):
             if not 'WERROR_CFLAGS' in conf.env:
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index 83afda4..536c0a4 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -817,6 +817,9 @@ static const smb_socket_option socket_options[] = {
 #ifdef TCP_QUICKACK
   {"TCP_QUICKACK", IPPROTO_TCP, TCP_QUICKACK, 0, OPT_BOOL},
 #endif
+#ifdef TCP_FASTOPEN
+  {"TCP_FASTOPEN", IPPROTO_TCP, TCP_FASTOPEN, 0, OPT_BOOL},
+#endif
 #ifdef TCP_NODELAYACK
   {"TCP_NODELAYACK", IPPROTO_TCP, TCP_NODELAYACK, 0, OPT_BOOL},
 #endif
diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
index 31ed7f7..a62d00b 100644
--- a/wscript_configure_system_mitkrb5
+++ b/wscript_configure_system_mitkrb5
@@ -154,7 +154,7 @@ conf.CHECK_CODE('''
        }''',
     'HAVE_KRB5_ENCTYPE_TO_STRING_WITH_SIZE_T_ARG',
     headers='krb5.h', lib='krb5 k5crypto',
-    addmain=False, cflags='-Werror',
+    addmain=False, cflags=conf.env['WERROR_CFLAGS'],
     msg="Checking whether krb5_enctype_to_string takes size_t argument")
 
 conf.CHECK_CODE('''
@@ -167,7 +167,7 @@ conf.CHECK_CODE('''
        }''',
     'HAVE_KRB5_ENCTYPE_TO_STRING_WITH_KRB5_CONTEXT_ARG',
     headers='krb5.h stdlib.h', lib='krb5',
-    addmain=False, cflags='-Werror',
+    addmain=False, cflags=conf.env['WERROR_CFLAGS'],
     msg="Checking whether krb5_enctype_to_string takes krb5_context argument")
 conf.CHECK_CODE('''
        int main(void) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list