install_path = None,
install = install)
+def HEIMDAL_LEX_CFLAGS():
+ lex_cflags = []
+ if bld.CONFIG_SET('HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS'):
+ lex_cflags.append('-Wno-strict-overflow')
+ if bld.CONFIG_SET('HEIMDAL_LEX_WNO_STRICT_PROTOTYPES_CFLAGS'):
+ lex_cflags.append('-Wno-error=strict-prototypes')
+ if bld.CONFIG_SET('HEIMDAL_LEX_WNO_IMPLICIT_FALLTHROUGH_CFLAGS'):
+ lex_cflags.append('-Wno-error=implicit-fallthrough')
+ return lex_cflags
+
if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):
HEIMDAL_HX509_OBJH_SOURCE + ' lib/hx509/sel-lex.l lib/hx509/sel-gram.y',
includes='../heimdal/lib/hx509',
deps='roken com_err asn1 hcrypto asn1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKCS10_ASN1 wind heimbase',
- cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS,
+ cflags=' '.join(HEIMDAL_LEX_CFLAGS()),
version_script='lib/hx509/version-script.map',
)
'lib/asn1/gen.c',
includes='../heimdal/lib/asn1',
group='hostcc_build_main',
- cflags=bld.env.HEIMDAL_UNPICKY_WNO_STRICT_OVERFLOW_CFLAGS,
+ cflags=HEIMDAL_LEX_CFLAGS(),
deps='ROKEN_HOSTCC HEIMBASE_HOSTCC',
use_global_deps=False,
use_hostcc=True)
group='hostcc_build_main',
deps='ROKEN_HOSTCC HEIMBASE_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC '
'HEIMDAL_ASN1_GEN_HOSTCC',
- install=False
+ install=False,
+ cflags=' '.join(HEIMDAL_LEX_CFLAGS())
)
bld.env['ASN1_COMPILE'] = os.path.join(bld.bldnode.parent.abspath(), 'asn1_compile')
+
if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
HEIMDAL_BINARY('compile_et',
'lib/com_err/parse.y lib/com_err/lex.l lib/com_err/compile_et.c',
includes='../heimdal/lib/com_err',
group='hostcc_base_build_main',
deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
- install=False
+ install=False,
+ cflags=' '.join(HEIMDAL_LEX_CFLAGS())
)
bld.env['COMPILE_ET'] = os.path.join(bld.bldnode.parent.abspath(), 'compile_et')
'-Wno-error=discarded-qualifiers',
'-Wno-error=old-style-definition',
'-Wno-error=unused-result',
- '-Wno-error=implicit-fallthrough',
- '-Wno-error=strict-prototypes',
'-Wno-error=unused-variable'
]
for flag in heimdal_no_error_flags:
'-Wno-error=free-nonheap-object',
testflags=True)
+conf.ADD_NAMED_CFLAGS('HEIMDAL_LEX_WNO_IMPLICIT_FALLTHROUGH_CFLAGS',
+ '-Wno-error=implicit-fallthrough',
+ testflags=True)
+
+conf.ADD_NAMED_CFLAGS('HEIMDAL_LEX_WNO_STRICT_PROTOTYPES_CFLAGS',
+ '-Wno-error=strict-prototypes',
+ 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)")