summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2021-07-06 12:26:17 +1200
committerStefan Metzmacher <metze@samba.org>2021-11-30 18:30:30 +0000
commitde18c9bf4108dd4f838a4711eda0ed2a59f6ff09 (patch)
tree9eb45d498ef7ab6f5fd9b9f8c990d93b04998739
parent75e1000d280a1310d64c9bfffe55f7b67b402463 (diff)
downloadsamba-de18c9bf4108dd4f838a4711eda0ed2a59f6ff09.tar.gz
heimdal_build: Allow errors integer overflow errors in gen.c (only)
This is in preperation for the Heimdal upgrade. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source4/heimdal_build/wscript_build14
-rw-r--r--source4/heimdal_build/wscript_configure7
2 files changed, 16 insertions, 5 deletions
diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build
index 4f0dfbde425..1e5c3dc75f1 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -854,6 +854,15 @@ HEIMDAL_SUBSYSTEM('HEIMDAL_VERS_HOSTCC',
use_global_deps=False,
use_hostcc=True)
+HEIMDAL_SUBSYSTEM('HEIMDAL_ASN1_GEN_HOSTCC',
+ 'lib/asn1/gen.c',
+ includes='../heimdal/lib/asn1',
+ group='hostcc_build_main',
+ cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS,
+ deps='ROKEN_HOSTCC',
+ use_global_deps=False,
+ use_hostcc=True)
+
HEIMDAL_SUBSYSTEM('HEIMDAL_VERS',
'lib/vers/print_version.c ../heimdal_build/version.c',
deps='roken replace')
@@ -862,7 +871,7 @@ HEIMDAL_SUBSYSTEM('HEIMDAL_VERS',
if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
# here is the asn1 compiler build rule
HEIMDAL_BINARY('asn1_compile',
- 'lib/asn1/gen.c lib/asn1/gen_copy.c '
+ 'lib/asn1/gen_copy.c '
'lib/asn1/gen_decode.c lib/asn1/gen_encode.c lib/asn1/gen_free.c '
'lib/asn1/gen_glue.c lib/asn1/gen_length.c lib/asn1/gen_seq.c '
'lib/asn1/gen_template.c lib/asn1/hash.c lib/asn1/symbol.c '
@@ -871,7 +880,8 @@ if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
use_global_deps=False,
includes='../heimdal/lib/asn1',
group='hostcc_build_main',
- deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
+ deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC '
+ 'HEIMDAL_ASN1_GEN_HOSTCC',
install=False
)
bld.env['ASN1_COMPILE'] = os.path.join(bld.bldnode.parent.abspath(), 'asn1_compile')
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index c4a3b1de99f..7ac54190590 100644
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -81,6 +81,10 @@ for flag in heimdal_no_error_flags:
flag,
testflags=True)
+conf.ADD_NAMED_CFLAGS('HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS',
+ '-Wno-strict-overflow',
+ testflags=True)
+
if len(bld.env.HEIMDAL_NO_ERROR_CFLAGS) == len(heimdal_no_error_flags):
Logs.info("Most warnings in Heimdal code will "
"error due to -Werror (good)")
@@ -88,9 +92,6 @@ else:
conf.env.allow_heimdal_warnings = True
# Needed on CentOS 7 and Ubuntu 16.04 only for Bison generated
# files when we are not doing strict warnings -> errors
- conf.ADD_NAMED_CFLAGS('HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS',
- '-Wno-strict-overflow',
- testflags=True)
conf.ADD_NAMED_CFLAGS('HEIMDAL_UNPICKY_WNO_MAYBE_UNINITIALIZED_CFLAGS',
'-Wno-error=maybe-uninitialized',
testflags=True)