All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steve Sakoman" <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 04/21] flex: fix build with autoconf 2.70
Date: Mon,  1 Feb 2021 06:24:35 -1000	[thread overview]
Message-ID: <4a977fba25e9fa0a14b49d5f8ac992f14a6ca254.1612188857.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1612188857.git.steve@sakoman.com>

From: Ross Burton <ross.burton@intel.com>

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.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 946610f2cc8cd42265ee3fab6c73ad4831aaeb4e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 .../flex/flex/check-funcs.patch               | 79 +++++++++++++++++++
 meta/recipes-devtools/flex/flex_2.6.4.bb      |  1 +
 2 files changed, 80 insertions(+)
 create mode 100644 meta/recipes-devtools/flex/flex/check-funcs.patch

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 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From c42de062bbdc7c31d7181c10a74202d493280ada Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Tue, 27 Feb 2018 09:10:12 +0800
+Subject: [PATCH] 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.
+
+Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
+---
+ configure.ac | 29 +++++++++++++----------------
+ 1 file changed, 13 insertions(+), 16 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 55e774b0..d0f3b7da 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -166,6 +166,7 @@ strtol dnl
+ AC_CHECK_FUNCS([dnl
+ pow dnl           Used only by "examples/manual/expr"
+ setlocale dnl     Needed only if NLS is enabled
++reallocarr dnl    NetBSD function. Use reallocarray if not available.
+ reallocarray dnl  OpenBSD function. We have replacement if not available.
+ ])
+ 
+diff --git a/configure.ac b/configure.ac
+index 3c977a4e..9c53590f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -158,22 +158,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
+-reallocarr dnl    NetBSD function. Use reallocarray if not available.
+-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
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
            file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
            ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
            file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \
+           file://check-funcs.patch \
            "
 
 SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d"
-- 
2.25.1


  parent reply	other threads:[~2021-02-01 16:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 16:24 [OE-core][dunfell 00/21] Patch review Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 01/21] sanity: Verify that user isn't building in PSEUDO_IGNORE_PATHS Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 02/21] sanity.bbclass: sanity check for if bitbake is present in PATH Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 03/21] oeqa/ptest: print a warning if ptests failed Steve Sakoman
2021-02-01 16:24 ` Steve Sakoman [this message]
2021-02-01 16:24 ` [OE-core][dunfell 05/21] flex: Refresh patch Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 06/21] flex: Fix --noline option behavior Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 07/21] toolchain-shar-relocate.sh: Fix handling files with colons Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 08/21] devtool: Fix source extraction for gcc shared source Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 09/21] externalsrc: Fix parsing error with devtool non-git sources Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 10/21] oeqa/selftest/cases/tinfoil.py: increase timeout 10->60s test_wait_event Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 11/21] devtool: Fix file:// fetcher symlink directory structure Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 12/21] dtc: improve reproducibility Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 13/21] core-image-sato-sdk-ptest: these images need ptest Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 14/21] ovmf-shell-image: image is only buildable on x86-64 Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 15/21] selftest/devtool: Add modify_localfiles_only test checking symlink path Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 16/21] timezone: upgrade to 2021a Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 17/21] strace: increase ptest timeout duration 120->240s Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 18/21] externalsrc: Detect code changes in submodules Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 19/21] ncurses: Don't put terminfo into the sysroot Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 20/21] python3: Avoid installing test data into recipe-sysroot Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 21/21] staging: Clean up files installed into the sysroot Steve Sakoman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a977fba25e9fa0a14b49d5f8ac992f14a6ca254.1612188857.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.