[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Mon Sep 10 20:50:02 UTC 2018


The branch, master has been updated
       via  ad04275 wafsamba: remove tru64cc.py as it's not compatible with waf 2
       via  b35ac32 wafsamba: remove hpuxcc.py as it's not compatible with waf 2
       via  420d0b5 wafsamba: remove irixcc.py as we don't support IRIX any more
       via  0cd9452 wafsamba: fix generic_cc.py to work with waf 2
       via  230796d buildtools/wafsamba: undefine a define for a failed test unless asked to keep it
       via  93b2357 Revert "wafsamba/samba_autoconf: when setting undefined result, use empty tuple"
       via  200ddf8 Revert "lib/replace: force to unset defines if check has failed"
      from  4e5d6f8 selftext: Mark py3 visualize test as flapping

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


- Log -----------------------------------------------------------------
commit ad0427576903b002193afd3eef0cbb40d768129c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Sep 7 16:40:44 2018 +0200

    wafsamba: remove tru64cc.py as it's not compatible with waf 2
    
    third_party/waf/waflib/Tools/compiler_c.py proposed
    gcc for osf1V/Tru64.
    
    If there's more needed on Tru64 someone with a Tru64 box needs to
    provide a waf 2 compatible fix.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Mon Sep 10 22:49:31 CEST 2018 on sn-devel-144

commit b35ac32b2e378baf06353aeb101cc7c75a82338d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Sep 7 16:40:44 2018 +0200

    wafsamba: remove hpuxcc.py as it's not compatible with waf 2
    
    third_party/waf/waflib/Tools/compiler_c.py proposed
    gcc for HPUX.
    
    If there's more needed on HPUX someone with a HPUX box needs to
    provide a waf 2 compatible fix.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 420d0b5606b998df006f30966dffa5877175f608
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Sep 7 16:32:28 2018 +0200

    wafsamba: remove irixcc.py as we don't support IRIX any more
    
    There's still a irixcc.py in waf itself.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 0cd9452ea6b6e402124bee970df5484c4a264368
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Sep 7 16:27:58 2018 +0200

    wafsamba: fix generic_cc.py to work with waf 2
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 230796d7ee7384aa7310d5601b2136679857b277
Author: Alexander Bokovoy <ab at samba.org>
Date:   Fri Sep 7 14:34:48 2018 +0000

    buildtools/wafsamba: undefine a define for a failed test unless asked to keep it
    
    If conf.CHECK_CODE() is called without `always=True` and the test has
    failed, undefine the define already set to '0' by conf.check_code().
    
    This restores expectations that undefined symbols are not considered to
    be set by CONFIG_SET() method.
    
    Signed-off-by: Alexander Bokovoy <ab at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 93b23570358e143a90a8aaaa007bb0d482a531ec
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 10 10:22:16 2018 +0200

    Revert "wafsamba/samba_autoconf: when setting undefined result, use empty tuple"
    
    This reverts commit 95ba6b97441b75f28aef5ec1ee5a9442683f3763.
    
    There was already a better fix under discusion.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 200ddf8e731af3d30d844ad0f8e5e73d46aba52c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 10 10:22:13 2018 +0200

    Revert "lib/replace: force to unset defines if check has failed"
    
    This reverts commit 8ec7eb0c0129518557d1f446191860a62ef3ff79.
    
    There was already a better fix under discusion.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 buildtools/wafsamba/generic_cc.py     | 100 +++++++++++++++++-----------------
 buildtools/wafsamba/hpuxcc.py         |  56 -------------------
 buildtools/wafsamba/irixcc.py         |  79 ---------------------------
 buildtools/wafsamba/samba_autoconf.py |   9 +--
 buildtools/wafsamba/tru64cc.py        |  77 --------------------------
 buildtools/wafsamba/wafsamba.py       |   3 -
 lib/replace/wscript                   |   3 +-
 7 files changed, 52 insertions(+), 275 deletions(-)
 delete mode 100644 buildtools/wafsamba/hpuxcc.py
 delete mode 100644 buildtools/wafsamba/irixcc.py
 delete mode 100644 buildtools/wafsamba/tru64cc.py


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/generic_cc.py b/buildtools/wafsamba/generic_cc.py
index f6f8b18..1352c54 100644
--- a/buildtools/wafsamba/generic_cc.py
+++ b/buildtools/wafsamba/generic_cc.py
@@ -3,70 +3,68 @@
 # based on suncc.py from waf
 
 import os, optparse
-from waflib import Utils, Options, Configure
+from waflib import Errors
 from waflib.Tools import ccroot, ar
-from waflib.Configure import conftest
+from waflib.Configure import conf
 
+#
+# Let waflib provide useful defaults, but
+# provide generic_cc as last resort fallback on
+# all platforms
+#
 from waflib.Tools.compiler_c import c_compiler
+for key in c_compiler.keys():
+    c_compiler[key].append('generic_cc')
 
-c_compiler['default'] = ['gcc', 'generic_cc', 'clang']
-c_compiler['freebsd'] = ['clang', 'generic_cc', 'gcc']
-c_compiler['hpux'] = ['gcc', 'generic_cc']
-
- at conftest
+ at conf
 def find_generic_cc(conf):
     v = conf.env
     cc = None
-    if v['CC']: cc = v['CC']
-    elif 'CC' in conf.environ: cc = conf.environ['CC']
-    if not cc: cc = conf.find_program('cc', var='CC')
-    if not cc: conf.fatal('generic_cc was not found')
-    cc = conf.cmd_to_list(cc)
-    v['CC']  = cc
-    v['CC_NAME'] = 'generic'
-
- at conftest
-def generic_cc_common_flags(conf):
-    v = conf.env
+    if v.CC:
+        cc = v.CC
+    elif 'CC' in conf.environ:
+        cc = conf.environ['CC']
+    if not cc:
+        cc = conf.find_program('cc', var='CC')
+    if not cc:
+        conf.fatal('generic_cc was not found')
 
-    v['CC_SRC_F']            = ''
-    v['CC_TGT_F']            = ['-c', '-o', '']
-    v['CPPPATH_ST']          = '-I%s' # template for adding include paths
+    try:
+        conf.cmd_and_log(cc + ['--version'])
+    except Errors.WafError:
+        conf.fatal('%r --version could not be executed' % cc)
 
-    # linker
-    if not v['LINK_CC']: v['LINK_CC'] = v['CC']
-    v['CCLNK_SRC_F']         = ''
-    v['CCLNK_TGT_F']         = ['-o', '']
+    v.CC = cc
+    v.CC_NAME = 'generic_cc'
 
-    v['LIB_ST']              = '-l%s' # template for adding libs
-    v['LIBPATH_ST']          = '-L%s' # template for adding libpaths
-    v['STATICLIB_ST']        = '-l%s'
-    v['STATICLIBPATH_ST']    = '-L%s'
-    v['CCDEFINES_ST']        = '-D%s'
+ at conf
+def generic_cc_common_flags(conf):
+    v = conf.env
 
-#    v['SONAME_ST']           = '-Wl,-h -Wl,%s'
-#    v['SHLIB_MARKER']        = '-Bdynamic'
-#    v['STATICLIB_MARKER']    = '-Bstatic'
+    v.CC_SRC_F            = ''
+    v.CC_TGT_F            = ['-c', '-o']
+    v.CPPPATH_ST          = '-I%s'
+    v.DEFINES_ST          = '-D%s'
 
-    # program
-    v['program_PATTERN']     = '%s'
+    if not v.LINK_CC:
+        v.LINK_CC = v.CC
 
-    # shared library
-#    v['shlib_CCFLAGS']       = ['-Kpic', '-DPIC']
-#    v['shlib_LINKFLAGS']     = ['-G']
-    v['shlib_PATTERN']       = 'lib%s.so'
+    v.CCLNK_SRC_F         = ''
+    v.CCLNK_TGT_F         = ['-o']
 
-    # static lib
-#    v['staticlib_LINKFLAGS'] = ['-Bstatic']
-#    v['staticlib_PATTERN']   = 'lib%s.a'
+    v.LIB_ST              = '-l%s' # template for adding libs
+    v.LIBPATH_ST          = '-L%s' # template for adding libpaths
+    v.STLIB_ST            = '-l%s'
+    v.STLIBPATH_ST        = '-L%s'
 
-detect = '''
-find_generic_cc
-find_cpp
-find_ar
-generic_cc_common_flags
-cc_load_tools
-cc_add_flags
-link_add_flags
-'''
+    v.cprogram_PATTERN    = '%s'
+    v.cshlib_PATTERN      = 'lib%s.so'
+    v.cstlib_PATTERN      = 'lib%s.a'
 
+def configure(conf):
+    conf.find_generic_cc()
+    conf.find_ar()
+    conf.generic_cc_common_flags()
+    conf.cc_load_tools()
+    conf.cc_add_flags()
+    conf.link_add_flags()
diff --git a/buildtools/wafsamba/hpuxcc.py b/buildtools/wafsamba/hpuxcc.py
deleted file mode 100644
index 5938811..0000000
--- a/buildtools/wafsamba/hpuxcc.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# compiler definition for HPUX
-# based on suncc.py from waf
-
-import os, optparse, sys
-from waflib import Utils, Options, Configure
-from waflib.Tools import ccroot, ar
-from waflib.Configure import conftest
-from waflib.Tools import gcc
-
-
- at conftest
-def gcc_modifier_hpux(conf):
-    v=conf.env
-    v['CCFLAGS_DEBUG']=['-g']
-    v['CCFLAGS_RELEASE']=['-O2']
-    v['CC_SRC_F']=''
-    v['CC_TGT_F']=['-c','-o','']
-    v['CPPPATH_ST']='-I%s'
-    if not v['LINK_CC']:v['LINK_CC']=v['CC']
-    v['CCLNK_SRC_F']=''
-    v['CCLNK_TGT_F']=['-o','']
-    v['LIB_ST']='-l%s'
-    v['LIBPATH_ST']='-L%s'
-    v['STATICLIB_ST']='-l%s'
-    v['STATICLIBPATH_ST']='-L%s'
-    v['RPATH_ST']='-Wl,-rpath,%s'
-    v['CCDEFINES_ST']='-D%s'
-    v['SONAME_ST']='-Wl,-h,%s'
-    v['SHLIB_MARKER']=[]
-#    v['STATICLIB_MARKER']='-Wl,-Bstatic'
-    v['FULLSTATIC_MARKER']='-static'
-    v['program_PATTERN']='%s'
-    v['shlib_CCFLAGS']=['-fPIC','-DPIC']
-    v['shlib_LINKFLAGS']=['-shared']
-    v['shlib_PATTERN']='lib%s.sl'
-#   v['staticlib_LINKFLAGS']=['-Wl,-Bstatic']
-    v['staticlib_PATTERN']='lib%s.a'
-
-gcc.gcc_modifier_hpux = gcc_modifier_hpux
-
-from waflib.TaskGen import feature, after
- at feature('cprogram', 'cshlib')
- at after('apply_link', 'apply_lib_vars', 'apply_obj_vars')
-def hpux_addfullpath(self):
-  if sys.platform == 'hp-ux11':
-    link = getattr(self, 'link_task', None)
-    if link:
-        lst = link.env.LINKFLAGS
-        buf = []
-        for x in lst:
-           if x.startswith('-L'):
-               p2 = x[2:]
-               if not os.path.isabs(p2):
-                   x = x[:2] + self.bld.srcnode.abspath(link.env) + "/../" + x[2:].lstrip('.')
-           buf.append(x)
-        link.env.LINKFLAGS = buf
diff --git a/buildtools/wafsamba/irixcc.py b/buildtools/wafsamba/irixcc.py
deleted file mode 100644
index c33c96b..0000000
--- a/buildtools/wafsamba/irixcc.py
+++ /dev/null
@@ -1,79 +0,0 @@
-
-# compiler definition for irix/MIPSpro cc compiler
-# based on suncc.py from waf
-
-import os, optparse
-from waflib import Utils, Options, Configure
-from waflib.Tools import ccroot, ar
-from waflib.Configure import conftest
-
-from waflib.Tools.compiler_c import c_compiler
-
-c_compiler['irix'] = ['gcc', 'irixcc']
-
- at conftest
-def find_irixcc(conf):
-    v = conf.env
-    cc = None
-    if v['CC']: cc = v['CC']
-    elif 'CC' in conf.environ: cc = conf.environ['CC']
-    if not cc: cc = conf.find_program('cc', var='CC')
-    if not cc: conf.fatal('irixcc was not found')
-    cc = conf.cmd_to_list(cc)
-
-    try:
-        if Utils.cmd_output(cc + ['-c99'] + ['-version']) != '':
-            conf.fatal('irixcc %r was not found' % cc)
-    except ValueError:
-        conf.fatal('irixcc -v could not be executed')
-
-    conf.env.append_unique('CCFLAGS', '-c99')
-
-    v['CC']  = cc
-    v['CC_NAME'] = 'irix'
-
- at conftest
-def irixcc_common_flags(conf):
-    v = conf.env
-
-    v['CC_SRC_F']            = ''
-    v['CC_TGT_F']            = ['-c', '-o', '']
-    v['CPPPATH_ST']          = '-I%s' # template for adding include paths
-
-    # linker
-    if not v['LINK_CC']: v['LINK_CC'] = v['CC']
-    v['CCLNK_SRC_F']         = ''
-    v['CCLNK_TGT_F']         = ['-o', '']
-
-    v['LIB_ST']              = '-l%s' # template for adding libs
-    v['LIBPATH_ST']          = '-L%s' # template for adding libpaths
-    v['STATICLIB_ST']        = '-l%s'
-    v['STATICLIBPATH_ST']    = '-L%s'
-    v['CCDEFINES_ST']        = '-D%s'
-
-#    v['SONAME_ST']           = '-Wl,-h -Wl,%s'
-#    v['SHLIB_MARKER']        = '-Bdynamic'
-#    v['STATICLIB_MARKER']    = '-Bstatic'
-
-    # program
-    v['program_PATTERN']     = '%s'
-
-    # shared library
-#    v['shlib_CCFLAGS']       = ['-Kpic', '-DPIC']
-#    v['shlib_LINKFLAGS']     = ['-G']
-    v['shlib_PATTERN']       = 'lib%s.so'
-
-    # static lib
-#    v['staticlib_LINKFLAGS'] = ['-Bstatic']
-#    v['staticlib_PATTERN']   = 'lib%s.a'
-
-detect = '''
-find_irixcc
-find_cpp
-find_ar
-irixcc_common_flags
-cc_load_tools
-cc_add_flags
-link_add_flags
-'''
-
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 6bc34c0..5f203fc 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -445,11 +445,9 @@ def CHECK_CODE(conf, code, define,
                      exec_args=exec_args,
                      define_ret=define_ret)
     except Exception:
-        # Even when exception happened, conf.check might have set the define
-        # already to int(ret). We want to undefine it in the case of 'always'.
-        # Otherwise, we'd get defines set to 0 when they should be undefined
-        # and it foils #ifdef check
         if always:
+            conf.DEFINE(define, 0)
+        else:
             conf.undefine(define)
         conf.COMPOUND_END(False)
         if mandatory:
@@ -899,9 +897,6 @@ def CHECK_CC_ENV(conf):
     The build farm sometimes puts a space at the start"""
     if os.environ.get('CC'):
         conf.env.CC = TO_LIST(os.environ.get('CC'))
-        if len(conf.env.CC) == 1:
-            # make for nicer logs if just a single command
-            conf.env.CC = conf.env.CC[0]
 
 
 @conf
diff --git a/buildtools/wafsamba/tru64cc.py b/buildtools/wafsamba/tru64cc.py
deleted file mode 100644
index 28b560f..0000000
--- a/buildtools/wafsamba/tru64cc.py
+++ /dev/null
@@ -1,77 +0,0 @@
-
-# compiler definition for tru64/OSF1 cc compiler
-# based on suncc.py from waf
-
-import os, optparse
-from waflib import Utils, Options, Configure
-from waflib.Tools import ccroot, ar
-from waflib.Configure import conftest
-
-from waflib.Tools.compiler_c import c_compiler
-
-c_compiler['osf1V'] = ['gcc', 'tru64cc']
-
- at conftest
-def find_tru64cc(conf):
-    v = conf.env
-    cc = None
-    if v['CC']: cc = v['CC']
-    elif 'CC' in conf.environ: cc = conf.environ['CC']
-    if not cc: cc = conf.find_program('cc', var='CC')
-    if not cc: conf.fatal('tru64cc was not found')
-    cc = conf.cmd_to_list(cc)
-
-    try:
-        if not Utils.cmd_output(cc + ['-V']):
-            conf.fatal('tru64cc %r was not found' % cc)
-    except ValueError:
-        conf.fatal('tru64cc -V could not be executed')
-
-    v['CC']  = cc
-    v['CC_NAME'] = 'tru64'
-
- at conftest
-def tru64cc_common_flags(conf):
-    v = conf.env
-
-    v['CC_SRC_F']            = ''
-    v['CC_TGT_F']            = ['-c', '-o', '']
-    v['CPPPATH_ST']          = '-I%s' # template for adding include paths
-
-    # linker
-    if not v['LINK_CC']: v['LINK_CC'] = v['CC']
-    v['CCLNK_SRC_F']         = ''
-    v['CCLNK_TGT_F']         = ['-o', '']
-
-    v['LIB_ST']              = '-l%s' # template for adding libs
-    v['LIBPATH_ST']          = '-L%s' # template for adding libpaths
-    v['STATICLIB_ST']        = '-l%s'
-    v['STATICLIBPATH_ST']    = '-L%s'
-    v['CCDEFINES_ST']        = '-D%s'
-
-#    v['SONAME_ST']           = '-Wl,-h -Wl,%s'
-#    v['SHLIB_MARKER']        = '-Bdynamic'
-#    v['STATICLIB_MARKER']    = '-Bstatic'
-
-    # program
-    v['program_PATTERN']     = '%s'
-
-    # shared library
-#    v['shlib_CCFLAGS']       = ['-Kpic', '-DPIC']
-    v['shlib_LINKFLAGS']     = ['-shared']
-    v['shlib_PATTERN']       = 'lib%s.so'
-
-    # static lib
-#    v['staticlib_LINKFLAGS'] = ['-Bstatic']
-#    v['staticlib_PATTERN']   = 'lib%s.a'
-
-detect = '''
-find_tru64cc
-find_cpp
-find_ar
-tru64cc_common_flags
-cc_load_tools
-cc_add_flags
-link_add_flags
-'''
-
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 7aa6b37..d6754e9 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -25,9 +25,6 @@ import samba_install
 import samba_conftests
 import samba_abi
 import samba_headers
-import tru64cc
-import irixcc
-import hpuxcc
 import generic_cc
 import samba_dist
 import samba_wildcard
diff --git a/lib/replace/wscript b/lib/replace/wscript
index cbb6fd5..3d47c37 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -616,7 +616,6 @@ def configure(conf):
                        define='HAVE_WORKING_STRPTIME',
                        execute=True,
                        addmain=False,
-                       always=True,
                        msg='Checking for working strptime')
 
     conf.CHECK_C_PROTOTYPE('gettimeofday',
@@ -647,7 +646,7 @@ def configure(conf):
     # OpenBSD (and I've heard HPUX) doesn't sync between mmap and write.
     # FIXME: Anything other than a 0 or 1 exit code should abort configure!
     conf.CHECK_CODE('#include "test/incoherent_mmap.c"',
-                    addmain=False, add_headers=False, execute=True, always=True,
+                    addmain=False, add_headers=False, execute=True,
                     define='HAVE_INCOHERENT_MMAP',
                     msg="Checking for HAVE_INCOHERENT_MMAP")
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list