WAF 2.x broken a lot of configure checks
Stefan Metzmacher
metze at samba.org
Mon Sep 10 14:03:08 UTC 2018
Hi,
here're some follow up patches, which seem to fix the problems I saw.
Please review and push:-)
Here's an older pipeline:
https://gitlab.com/samba-team/devel/samba/pipelines/29664377
And here rebased on master:
https://gitlab.com/samba-team/devel/samba/pipelines/29805302
https://gitlab.com/samba-team/devel/samba/pipelines/29819933
Thanks!
metze
Am 06.09.2018 um 12:40 schrieb Alexander Bokovoy via samba-technical:
> On ke, 05 syys 2018, Alexander Bokovoy via samba-technical wrote:
>>>> These two are coming from heimdal explicitly setting them to '0':
>>>> conf.define('HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE', 0)
>>>> conf.define('HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER', 0)
>>>>
>>>>>>>
>>>>>>> and now I have this:
>>>>>>>
>>>>>>> less bin/c4che/default_cache.py | grep '= 0'
>>>>>>> HAVE_BSD_STRTOLL = 0
>>>>>>> HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE = 0
>>>>>>> HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER = 0
>>>>>>> HAVE_INCOHERENT_MMAP = 0
>>>> .. and both HAVE_BSD_STRTOLL and HAVE_INCOHERENT_MMAP are defined using
>>>> conf.CHECK_CODE() which passes 'None' to conf.define().
>>>>
>>>> So I think my proposed patch would cover these two.
>>>>
>>>> I'm not sure we want to change heimdal's definitions.
>>>
>>> Maybe.
>>>
>>> Can you try yours and compare the result of bin/c4che/default.cache.py
>>> with the result of bin/c4che/default_cache.py on a Linux system
>>> and a FreeBSD 11 system?
>>>
>>> It seems my fix only covert the BSD_STROLL thing on Linux,
>>> but FreeBSD still has HAVE_WORKING_STRPTIME = 0.
>> Well, my FreeBSD 11.2 fails working strptime test. If I force printing
>> from the test function, I get under locale C:
>>
>> $ ./mmtest-strptime
>> test: strptime
>> failure: strptime [
>> tm_wday: expected: 6, got: 5
>> ]
>>
>> So it indeed is failing and is not working.
> I fixed detection of this case. In general, a change is that even when
> test is failing, the define is set. We have at least three defines which
> tested with '#ifdef'/'#ifndef' instead of '#if' so for them always-set
> defines mean that '#ifdef' always succeeds.
>
> Because of that, aside from HAVE_WORKING_STRPTIME and
> HAVE_INCOHERENT_MMAP we were failing with HAVE_FALLTHROUGH_ATTRIBUTE:
>
> -----------------------------------------------------------
> $ make
> WAF_MAKE=1 python ./buildtools/bin/waf build
> Waf: Entering directory `/usr/home/ab/src/samba/bin/default'
> Selected embedded Heimdal build
> [145/146] Compiling lib/replace/strptime.c
> ../lib/replace/strptime.c:466:4: error: expected expression
> FALL_THROUGH;
> ^
> ../lib/replace/replace.h:930:24: note: expanded from macro 'FALL_THROUGH'
> # define FALL_THROUGH __attribute__ ((fallthrough))
> ^
> ../lib/replace/strptime.c:616:4: error: expected expression
> FALL_THROUGH;
> ^
> ../lib/replace/replace.h:930:24: note: expanded from macro 'FALL_THROUGH'
> # define FALL_THROUGH __attribute__ ((fallthrough))
> ^
> 2 errors generated.
>
> Waf: Leaving directory `/usr/home/ab/src/samba/bin/default'
> Build failed
> -> task in 'replace.objlist' failed with exit status 1 (run with -v to display more information)
> *** Error code 1
>
> Stop.
> make: stopped in /usr/home/ab/src/samba
> ---------------------------------------------------------
>
> This is an interesting case. Clang has no understanding of a fall
> through attribute and it should have been detected by the test we have in
> lib/replace/wscript but since it is just a warning for, the test code
> was compiled and linked without any issues so we considered the test
> actually succeeded and defined HAVE_FALLTHROUGH_ATTRIBUTE.
>
> I fixed this by forcing a warning with a missing declaration into an
> error and voila, we have undefined HAVE_FALLTHROUGH_ATTRIBUTE:
>
> --------------------------------------------------------------------
> [1/2] Compiling ESC[32mbin/.conf_check_cd4aea0352f3fdcf7437ed2b0237999b/test.cESC[0m
>
> ['/usr/bin/clang', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '-I/usr/local/include', '-MMD', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '-Werror=missing-declarations', '-I/usr/home/ab/src/samba/lib/replace', '-I.', '-I../..', '-I.', '-I../..', '../../test.c', '-c', '-o/usr/home/ab/src/samba/bin/.conf_check_cd4aea0352f3fdcf7437ed2b0237999b/testbuild/default/test.c.1.o']
> err: ../../test.c:237:29: error: declaration does not declare anything [-Werror,-Wmissing-declarations]
> FALL_THROUGH;
> ^
> ../../test.c:222:42: note: expanded from macro 'FALL_THROUGH'
> #define FALL_THROUGH __attribute__((fallthrough))
> ^
> 1 error generated.
>
> from /usr/home/ab/src/samba/lib/replace: Test does not build: Traceback (most recent call last):
> File "/usr/home/ab/src/samba/third_party/waf/waflib/Configure.py", line 584, in run_build
> bld.compile()
> File "/usr/home/ab/src/samba/third_party/waf/waflib/Build.py", line 355, in compile
> raise Errors.BuildError(self.producer.error)
> BuildError: Build failed
> -> task in 'testprog' failed with exit status 1 (run with -v to display more information)
>
> from /usr/home/ab/src/samba/lib/replace: The configuration failed
> --------------------------------------------------------------------
>
>
> Attached patches allow me to compile under FreeBSD 11.2 with default
> settings as
>
> CFLAGS=-I/usr/local/include ./configure.developer
> WAF_MAKE=1 python ./buildtools/bin/waf build --abi-update
>
> (there are various ABI changes in master right now)
>
> I've submitted https://gitlab.com/samba-team/samba/merge_requests/67
> with currently developed patches.
>
-------------- next part --------------
From 223b7475429cd34d7f6baf04dfde19fd90752e23 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Mon, 10 Sep 2018 10:22:13 +0200
Subject: [PATCH 1/7] 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>
---
lib/replace/wscript | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/replace/wscript b/lib/replace/wscript
index cbb6fd5be0bd..3d47c3750447 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")
--
2.17.1
From 23e6a6484c5e20c82c332462eb01b5f3c2ffdfdd Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Mon, 10 Sep 2018 10:22:16 +0200
Subject: [PATCH 2/7] 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>
---
buildtools/wafsamba/samba_autoconf.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 6bc34c086f04..6b940e53c002 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -445,12 +445,8 @@ 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.undefine(define)
+ conf.DEFINE(define, 0)
conf.COMPOUND_END(False)
if mandatory:
raise
--
2.17.1
From e086f41aaa96a9b907ccff982a79d1a4c408e17f Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <ab at samba.org>
Date: Fri, 7 Sep 2018 14:34:48 +0000
Subject: [PATCH 3/7] 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>
---
buildtools/wafsamba/samba_autoconf.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 6b940e53c002..ced824d593d0 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -447,6 +447,8 @@ def CHECK_CODE(conf, code, define,
except Exception:
if always:
conf.DEFINE(define, 0)
+ else:
+ conf.undefine(define)
conf.COMPOUND_END(False)
if mandatory:
raise
--
2.17.1
From 9836d025642ee6109724bdfdcc6e517abd6d23d3 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Fri, 7 Sep 2018 16:27:58 +0200
Subject: [PATCH 4/7] wafsamba: fix generic_cc.py to work with waf 2
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
buildtools/wafsamba/generic_cc.py | 100 +++++++++++++-------------
buildtools/wafsamba/samba_autoconf.py | 3 -
2 files changed, 49 insertions(+), 54 deletions(-)
diff --git a/buildtools/wafsamba/generic_cc.py b/buildtools/wafsamba/generic_cc.py
index f6f8b180f45a..1352c547acf6 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/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index ced824d593d0..5f203fc7d36a 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -897,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
--
2.17.1
From a2f4229d6b33a92e454e461a3d8b407d9b920c18 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Fri, 7 Sep 2018 16:32:28 +0200
Subject: [PATCH 5/7] wafsamba: remove irixcc.py as we don't support IRIX any
more
There's still a irixcc.py
---
buildtools/wafsamba/irixcc.py | 79 ---------------------------------
buildtools/wafsamba/wafsamba.py | 1 -
2 files changed, 80 deletions(-)
delete mode 100644 buildtools/wafsamba/irixcc.py
diff --git a/buildtools/wafsamba/irixcc.py b/buildtools/wafsamba/irixcc.py
deleted file mode 100644
index c33c96bd8f68..000000000000
--- 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/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 7aa6b3792495..33ae1fe566da 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -26,7 +26,6 @@ import samba_conftests
import samba_abi
import samba_headers
import tru64cc
-import irixcc
import hpuxcc
import generic_cc
import samba_dist
--
2.17.1
From 7199f9227662e0d38b924da88ca6de4bbc302683 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Fri, 7 Sep 2018 16:40:44 +0200
Subject: [PATCH 6/7] 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>
---
buildtools/wafsamba/hpuxcc.py | 56 ---------------------------------
buildtools/wafsamba/wafsamba.py | 1 -
2 files changed, 57 deletions(-)
delete mode 100644 buildtools/wafsamba/hpuxcc.py
diff --git a/buildtools/wafsamba/hpuxcc.py b/buildtools/wafsamba/hpuxcc.py
deleted file mode 100644
index 593881179f8e..000000000000
--- 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/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 33ae1fe566da..58b20d395f83 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -26,7 +26,6 @@ import samba_conftests
import samba_abi
import samba_headers
import tru64cc
-import hpuxcc
import generic_cc
import samba_dist
import samba_wildcard
--
2.17.1
From 2dd6570ec85f3ebdcdf2e05f8fe5d017b2a46f68 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Fri, 7 Sep 2018 16:40:44 +0200
Subject: [PATCH 7/7] 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>
---
buildtools/wafsamba/tru64cc.py | 77 ---------------------------------
buildtools/wafsamba/wafsamba.py | 1 -
2 files changed, 78 deletions(-)
delete mode 100644 buildtools/wafsamba/tru64cc.py
diff --git a/buildtools/wafsamba/tru64cc.py b/buildtools/wafsamba/tru64cc.py
deleted file mode 100644
index 28b560f76972..000000000000
--- 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 58b20d395f83..d6754e9127ce 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -25,7 +25,6 @@ import samba_install
import samba_conftests
import samba_abi
import samba_headers
-import tru64cc
import generic_cc
import samba_dist
import samba_wildcard
--
2.17.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180910/284a6b9c/signature.sig>
More information about the samba-technical
mailing list