cmd: add asn1_compiler
Imported from linux kernel v5.3:
asn1.h without changes
asn1_ber_bytecode.h without changes
asn1_decoder.h without changes
asn1_compiler.c without changes
This host command will be used to create a ASN1 parser, for example,
for pkcs7 messages or x509 certificates. More specifically, it will
generate *byte code* which will be interpreted by asn1 decoder library.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
diff --git a/tools/Makefile b/tools/Makefile
index 24581ad..345bc84 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -207,6 +207,9 @@
hostprogs-$(CONFIG_MIPS) += mips-relocs
+hostprogs-$(CONFIG_ASN1_COMPILER) += asn1_compiler
+HOSTCFLAGS_asn1_compiler.o = -idirafter $(srctree)/include
+
# We build some files with extra pedantic flags to try to minimize things
# that won't build on some weird host compiler -- though there are lots of
# exceptions for files that aren't complaint.