diff options
Diffstat (limited to 'meta/recipes-devtools/flex/flex')
5 files changed, 132 insertions, 18 deletions
diff --git a/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch b/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch new file mode 100644 index 0000000000..c8202b6bd5 --- /dev/null +++ b/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch @@ -0,0 +1,32 @@ +From 440f3f55739468cd26e22f31871eca8cbbd53294 Mon Sep 17 00:00:00 2001 +From: Oleksiy Obitotskyy <oobitots@cisco.com> +Date: Wed, 6 Jan 2021 06:12:14 -0800 +Subject: [PATCH] Emit no #line directives if gen_line_dirs is false + +If we set --noline we should not print line directives. +But setting --noline means gen_line_dirs is false. + +Upstream-Status: Submitted +Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> +--- + src/buf.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/buf.c b/src/buf.c +index 185083c..4439e28 100644 +--- a/src/buf.c ++++ b/src/buf.c +@@ -95,8 +95,8 @@ struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno) + const char *src; + size_t tsz; + +- if (gen_line_dirs) +- return buf; ++ if (!gen_line_dirs) ++ return buf; + + tsz = strlen("#line \"\"\n") + /* constant parts */ + 2 * strlen (filename) + /* filename with possibly all backslashes escaped */ +-- +2.26.2.Cisco + diff --git a/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch new file mode 100644 index 0000000000..60bf7ce8cf --- /dev/null +++ b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch @@ -0,0 +1,32 @@ +From ed1f7e9de0d6a1d5a9e581e02a63593d22cf1e52 Mon Sep 17 00:00:00 2001 +From: Explorer09 <explorer09@gmail.com> +Date: Mon, 4 Sep 2017 10:47:33 +0800 +Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac. + +This would, e.g. define _GNU_SOURCE in config.h, enabling the +reallocarray() prototype in glibc 2.26+ on Linux systems with that +version of glibc. + +Fixes #241. + +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 55e774b..c879fe1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,8 +25,10 @@ + # autoconf requirements and initialization + + AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex]) ++AC_PREREQ([2.60]) + AC_CONFIG_SRCDIR([src/scan.l]) + AC_CONFIG_AUX_DIR([build-aux]) ++AC_USE_SYSTEM_EXTENSIONS + LT_INIT + AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects]) + AC_CONFIG_HEADER([src/config.h]) diff --git a/meta/recipes-devtools/flex/flex/check-funcs.patch b/meta/recipes-devtools/flex/flex/check-funcs.patch new file mode 100644 index 0000000000..762275e7f8 --- /dev/null +++ b/meta/recipes-devtools/flex/flex/check-funcs.patch @@ -0,0 +1,67 @@ +Subject: build: Move dnl comments out of AC_CHECK_FUNCS + +Due to a bug, autoheader (2.69) will treat M4 dnl comments in a quoted +argument of AC_CHECK_FUNCS as function tokens and generate a lot of +redundant and useless HAVE_* macros in config.h.in. +(Examples: HAVE_DNL, HAVE_AVAILABLE_, HAVE_BY) + +It seems to be this commit dbb4e94dc7bacbcfd4acef4f085ef752fe1aa03f of +mine that revealed this autoheader bug, and the affected config.h.in +had been shipped within flex-2.6.4 release tarball. + +I have reported the autoheader bug here: +<https://lists.gnu.org/archive/html/bug-autoconf/2018-02/msg00005.html> + +As a workaround, let's move comments out of AC_CHECK_FUNCS. + +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@arm.com> + +Signed-off-by: Kang-Che Sung <explorer09@gmail.com> +Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +--- + configure.ac | 28 +++++++++++++--------------- + 1 file changed, 13 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 55e774b..5ea3a93 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -153,21 +153,19 @@ AC_FUNC_REALLOC + AS_IF([test "$cross_compiling" = yes], + AC_MSG_WARN([result $ac_cv_func_realloc_0_nonnull guessed because of cross compilation])) + +-AC_CHECK_FUNCS([dup2 dnl +-memset dnl +-regcomp dnl +-strcasecmp dnl +-strchr dnl +-strdup dnl +-strtol dnl +-], [], [AC_MSG_ERROR(required library function not found on your system)]) +- +-# Optional library functions +-AC_CHECK_FUNCS([dnl +-pow dnl Used only by "examples/manual/expr" +-setlocale dnl Needed only if NLS is enabled +-reallocarray dnl OpenBSD function. We have replacement if not available. +-]) ++dnl Autoheader (<= 2.69) bug: "dnl" comments in a quoted argument of ++dnl AC_CHECK_FUNCS will expand wierdly in config.h.in. ++dnl (https://lists.gnu.org/archive/html/bug-autoconf/2018-02/msg00005.html) ++ ++AC_CHECK_FUNCS([dup2 memset regcomp strcasecmp strchr strdup strtol], [], ++ [AC_MSG_ERROR(required library function not found on your system)]) ++ ++# Optional library functions: ++# pow - Used only by "examples/manual/expr". ++# setlocale - Needed only if NLS is enabled. ++# reallocarr - NetBSD function. Use reallocarray if not available. ++# reallocarray - OpenBSD function. We have replacement if not available. ++AC_CHECK_FUNCS([pow setlocale reallocarr reallocarray]) + + AC_CONFIG_FILES( + Makefile +-- +2.25.1 + diff --git a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch deleted file mode 100644 index 032833ae7a..0000000000 --- a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Inappropriate (embedded specific) - -Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> - -Index: flex-2.5.37/doc/Makefile.am -=================================================================== ---- flex-2.5.37.orig/doc/Makefile.am 2012-07-21 04:18:27.000000000 +0300 -+++ flex-2.5.37/doc/Makefile.am 2013-07-30 17:57:09.834834531 +0300 -@@ -2,7 +2,7 @@ - - info_TEXINFOS = flex.texi - dist_man_MANS = flex.1 --dist_doc_DATA= flex.pdf -+EXTRA_DIST= flex.pdf - - CLEANFILES = \ - flex.hks \ diff --git a/meta/recipes-devtools/flex/flex/run-ptest b/meta/recipes-devtools/flex/flex/run-ptest index 19db337900..037301c40f 100755 --- a/meta/recipes-devtools/flex/flex/run-ptest +++ b/meta/recipes-devtools/flex/flex/run-ptest @@ -2,4 +2,4 @@ # make would want to rebuild some files with a compiler otherwise :-/ make FLEX=/usr/bin/flex -t check-TESTS || true -make FLEX=/usr/bin/flex check-TESTS +make FLEX=/usr/bin/flex abs_builddir=./ check-TESTS |