[Buildroot] [git commit branch/2023.02.x] package/haproxy: fix runtime 'FATAL ERROR: invalid code detected -- cannot go further'
Peter Korsgaard
peter at korsgaard.com
Thu Feb 29 14:20:56 UTC 2024
commit: https://git.buildroot.net/buildroot/commit/?id=d3657f363f662c028089c4aeaf6f78f13563c7df
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2023.02.x
Setting HAPROXY_CFLAGS on the haproxy build command line overrides CFLAGS
which were internally set by the haproxy Makefile.
Among those omitted CFLAGS is -fwrapv. Compiling haproxy without it and
and then running the program results in runtime error:
$ haproxy
FATAL ERROR: invalid code detected -- cannot go further, please recompile!
...
To address this issue, include HAPROXY_CFLAGS in the DEFINE variable instead
of CFLAGS in haproxy.mk.
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
(cherry picked from commit 9b90ef61784d314147ace4972f9bdc0cb4fcce77)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
package/haproxy/haproxy.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/haproxy/haproxy.mk b/package/haproxy/haproxy.mk
index 63a92090f3..61a9ebebe4 100644
--- a/package/haproxy/haproxy.mk
+++ b/package/haproxy/haproxy.mk
@@ -82,7 +82,7 @@ endif
define HAPROXY_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
- $(HAPROXY_MAKE_OPTS) CFLAGS="$(HAPROXY_CFLAGS)" -C $(@D)
+ $(HAPROXY_MAKE_OPTS) DEFINE="$(HAPROXY_CFLAGS)" -C $(@D)
endef
define HAPROXY_INSTALL_TARGET_CMDS
More information about the buildroot
mailing list