summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/flex
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2020-07-16 12:55:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-18 11:06:32 +0100
commitbd17c6bade219eac2af3bc6ca18c58d1946cffba (patch)
treed74392ef58935fa8069b646c6c518d6482b52374 /meta/recipes-devtools/flex
parent60114299f09fbb35cda6ac4b08c0f75e2c6c1320 (diff)
downloadpoky-bd17c6bade219eac2af3bc6ca18c58d1946cffba.tar.gz
flex: fix build with autoconf 2.70
autoconf 2.70 is coming soon which has some small behavioural fixes, so backport a patch from upstream to fix the build with that release. (From OE-Core rev: 946610f2cc8cd42265ee3fab6c73ad4831aaeb4e) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/flex')
-rw-r--r--meta/recipes-devtools/flex/flex/check-funcs.patch79
-rw-r--r--meta/recipes-devtools/flex/flex_2.6.4.bb1
2 files changed, 80 insertions, 0 deletions
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..037ca81fdc
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex/check-funcs.patch
@@ -0,0 +1,79 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From c42de062bbdc7c31d7181c10a74202d493280ada Mon Sep 17 00:00:00 2001
5From: Explorer09 <explorer09@gmail.com>
6Date: Tue, 27 Feb 2018 09:10:12 +0800
7Subject: [PATCH] build: Move dnl comments out of AC_CHECK_FUNCS
8
9Due to a bug, autoheader (2.69) will treat M4 dnl comments in a quoted
10argument of AC_CHECK_FUNCS as function tokens and generate a lot of
11redundant and useless HAVE_* macros in config.h.in.
12(Examples: HAVE_DNL, HAVE_AVAILABLE_, HAVE_BY)
13
14It seems to be this commit dbb4e94dc7bacbcfd4acef4f085ef752fe1aa03f of
15mine that revealed this autoheader bug, and the affected config.h.in
16had been shipped within flex-2.6.4 release tarball.
17
18I have reported the autoheader bug here:
19<https://lists.gnu.org/archive/html/bug-autoconf/2018-02/msg00005.html>
20
21As a workaround, let's move comments out of AC_CHECK_FUNCS.
22
23Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
24---
25 configure.ac | 29 +++++++++++++----------------
26 1 file changed, 13 insertions(+), 16 deletions(-)
27
28diff --git a/configure.ac b/configure.ac
29index 55e774b0..d0f3b7da 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -166,6 +166,7 @@ strtol dnl
33 AC_CHECK_FUNCS([dnl
34 pow dnl Used only by "examples/manual/expr"
35 setlocale dnl Needed only if NLS is enabled
36+reallocarr dnl NetBSD function. Use reallocarray if not available.
37 reallocarray dnl OpenBSD function. We have replacement if not available.
38 ])
39
40diff --git a/configure.ac b/configure.ac
41index 3c977a4e..9c53590f 100644
42--- a/configure.ac
43+++ b/configure.ac
44@@ -158,22 +158,19 @@ AC_FUNC_REALLOC
45 AS_IF([test "$cross_compiling" = yes],
46 AC_MSG_WARN([result $ac_cv_func_realloc_0_nonnull guessed because of cross compilation]))
47
48-AC_CHECK_FUNCS([dup2 dnl
49-memset dnl
50-regcomp dnl
51-strcasecmp dnl
52-strchr dnl
53-strdup dnl
54-strtol dnl
55-], [], [AC_MSG_ERROR(required library function not found on your system)])
56-
57-# Optional library functions
58-AC_CHECK_FUNCS([dnl
59-pow dnl Used only by "examples/manual/expr"
60-setlocale dnl Needed only if NLS is enabled
61-reallocarr dnl NetBSD function. Use reallocarray if not available.
62-reallocarray dnl OpenBSD function. We have replacement if not available.
63-])
64+dnl Autoheader (<= 2.69) bug: "dnl" comments in a quoted argument of
65+dnl AC_CHECK_FUNCS will expand wierdly in config.h.in.
66+dnl (https://lists.gnu.org/archive/html/bug-autoconf/2018-02/msg00005.html)
67+
68+AC_CHECK_FUNCS([dup2 memset regcomp strcasecmp strchr strdup strtol], [],
69+ [AC_MSG_ERROR(required library function not found on your system)])
70+
71+# Optional library functions:
72+# pow - Used only by "examples/manual/expr".
73+# setlocale - Needed only if NLS is enabled.
74+# reallocarr - NetBSD function. Use reallocarray if not available.
75+# reallocarray - OpenBSD function. We have replacement if not available.
76+AC_CHECK_FUNCS([pow setlocale reallocarr reallocarray])
77
78 AC_CONFIG_FILES(
79 Makefile
diff --git a/meta/recipes-devtools/flex/flex_2.6.4.bb b/meta/recipes-devtools/flex/flex_2.6.4.bb
index 43b2547fc6..3d57572865 100644
--- a/meta/recipes-devtools/flex/flex_2.6.4.bb
+++ b/meta/recipes-devtools/flex/flex_2.6.4.bb
@@ -15,6 +15,7 @@ SRC_URI = "https://github.com/westes/flex/releases/download/v${PV}/flex-${PV}.ta
15 file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ 15 file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
16 ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \ 16 ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
17 file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \ 17 file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \
18 file://check-funcs.patch \
18 " 19 "
19 20
20SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d" 21SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d"