DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, David Marchand <david.marchand@redhat.com>
Subject: [PATCH] build: detect backtrace availability
Date: Sun,  8 Jan 2023 10:59:20 +0100	[thread overview]
Message-ID: <20230108095920.327672-1-thomas@monjalon.net> (raw)

Backtrace dump is available:
	- always on Windows
	- on Linux/BSD if execinfo.h is available (not anymore on Alpine)

The flag RTE_BACKTRACE was set unconditionnaly in rte_config.h.
It is now set only if the feature is available.

Note: Alpine Linux has decided to remove libexecinfo support,
so this change will allow to compile DPDK on recent Alpine Linux.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 config/meson.build                | 3 ++-
 config/rte_config.h               | 1 -
 doc/guides/linux_gsg/sys_reqs.rst | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 80564eec52..0c4d1f06e5 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -200,10 +200,11 @@ if fdt_dep.found() and cc.has_header('fdt.h')
 endif
 
 libexecinfo = cc.find_library('libexecinfo', required: false)
-if libexecinfo.found() and cc.has_header('execinfo.h')
+if libexecinfo.found()
     add_project_link_arguments('-lexecinfo', language: 'c')
     dpdk_extra_ldflags += '-lexecinfo'
 endif
+dpdk_conf.set('RTE_BACKTRACE', cc.has_header('execinfo.h') or is_windows)
 
 libarchive = dependency('libarchive', required: false, method: 'pkg-config')
 if libarchive.found()
diff --git a/config/rte_config.h b/config/rte_config.h
index 3c4876d434..7b8c85e948 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -37,7 +37,6 @@
 #define RTE_MAX_MEMZONE 2560
 #define RTE_MAX_TAILQ 32
 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO
-#define RTE_BACKTRACE 1
 #define RTE_MAX_VFIO_CONTAINERS 64
 
 /* bsd module defines */
diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
index e4f9b41251..2a7988cf46 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -32,7 +32,7 @@ Compilation of the DPDK
 
     * For RHEL/Fedora systems these can be installed using ``dnf groupinstall "Development Tools"``
     * For Ubuntu/Debian systems these can be installed using ``apt install build-essential``
-    * For Alpine Linux, ``apk add alpine-sdk bsd-compat-headers libexecinfo-dev``
+    * For Alpine Linux, ``apk add alpine-sdk bsd-compat-headers``
 
 .. note::
 
-- 
2.39.0


             reply	other threads:[~2023-01-08  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-08  9:59 Thomas Monjalon [this message]
2023-01-09  9:08 ` Bruce Richardson
2023-02-02 21:54   ` Thomas Monjalon

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=20230108095920.327672-1-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).