[PATCH] Add a --{enable,disable}-progs configure option

2020-10-01 Thread Fabrice Fontaine via Elfutils-devel
From: Thomas Petazzoni 

Add a --{enable,disable}-progs configuration option to elfutils. This
allows to selectively disable the compilation of the elfutils programs
(in which case only the libraries are built and installed). This is
useful because the programs are often not needed, and also because
building the programs against uClibc causes several issues (lack of
obstack_printf() in uClibc for example).

Based on the former patch by Thomas Petazzoni.

[Vincent: tweak patch for 0.166]
[Bernd: rebased patch for 0.177]

Signed-off-by: Thomas Petazzoni 
Signed-off-by: Vicente Olivert Riera 
Signed-off-by: Bernd Kuhls 
---
 Makefile.am  | 6 +-
 configure.ac | 6 ++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 2ff444e7bf1d..70443abb4fb6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,8 +26,12 @@ AM_MAKEFLAGS = --no-print-directory

 pkginclude_HEADERS = version.h

+if ENABLE_PROGS
+PROGS_SUBDIR = src
+endif
+
 SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl libdw \
- libasm debuginfod src po doc tests
+ libasm debuginfod $(PROGS_SUBDIR) po doc tests

 EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
 COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/configure.ac b/configure.ac
index c2c1d90b2133..7b4c38381cca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -390,6 +390,12 @@
   [tests_use_rpath=$enableval], [tests_use_rpath=no])
 AM_CONDITIONAL(TESTS_RPATH, test "$tests_use_rpath" = yes)

+AC_ARG_ENABLE([progs],
+   AS_HELP_STRING([--enable-progs], [enable progs]),
+   enable_progs=$enableval,
+   enable_progs=yes)
+AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes)
+
 dnl zlib is mandatory.
 save_LIBS="$LIBS"
 LIBS=
--
2.11.0



[Bug libdw/26696] New: Support SVE dwarf

2020-10-01 Thread woodard at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=26696

Bug ID: 26696
   Summary: Support SVE dwarf
   Product: elfutils
   Version: unspecified
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: libdw
  Assignee: unassigned at sourceware dot org
  Reporter: woodard at redhat dot com
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

SVE is starting to appear on aarch64. There are a few enhancements needed
within elfutils's DWARF support needed to support SVE. These changes are
outlined here:
https://static.docs.arm.com/100985//abi_sve_aadwarf_100985__00_en.pdf

In particular it the Z registers aren't yet described in
backends/aarch64_regs.c 
and neither is the Vector granule pseudo register.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[patch] PR25461 default DEBUGINFOD_URLS

2020-10-01 Thread Frank Ch. Eigler via Elfutils-devel


>From 2c0c0234ea151e00e7f3a26bbc80e5be3b16d627 Mon Sep 17 00:00:00 2001
From: "Frank Ch. Eigler" 
Date: Thu, 1 Oct 2020 16:56:49 -0400
Subject: [PATCH] PR25461: add /etc/profile.d files for default
 $DEBUGINFOD_URLS

To give distros a simple knob to let their userbase enjoy debuginfod
services, we add a --enable-debuginfod-urls[=URLS] to the configury.
This propagates to $DEBUGINFOD_URLS environment variable settings
in /etc/profile.d/elfutils.{sh,csh} files.

The default is nothing.  If simply enabled, the current prototype
public server is used.  If enabled with parameters, the builder/distro
can specify a default URL search path of their own.

Signed-off-by: Frank Ch. Eigler 
---
 ChangeLog   |  5 +
 config/ChangeLog|  8 
 config/Makefile.am  |  6 +-
 config/elfutils.spec.in |  2 +-
 config/profile.csh.in   |  2 ++
 config/profile.sh.in|  3 +++
 configure.ac| 13 +
 7 files changed, 37 insertions(+), 2 deletions(-)
 create mode 100644 config/profile.csh.in
 create mode 100644 config/profile.sh.in

diff --git a/ChangeLog b/ChangeLog
index 021b06f3ff25..72e8397cc43f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-10-01  Frank Ch. Eigler  
+
+   PR25461
+   * configure.ac: Add --enable-debuginfod-urls[=URLS] option.
+
 2020-09-18  Mark Wielaard  
 
* configure.ac: Check availability of libzstd and zstd.
diff --git a/config/ChangeLog b/config/ChangeLog
index c8e4fcd43f8b..9c31925f665d 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,11 @@
+2020-10-01  Frank Ch. Eigler  
+
+   PR25461
+   * profile.sh.in, profile.csh.in: New files for /etc/profiles.d
+   to define $DEBUGINFOD_URLS.
+   * elfutils.spec.in: Configure with --enable-debuginfod-urls.
+   * Makefile.am: Install them.
+
 2020-09-18  Mark Wielaard  
 
* elfutils.spec.in: Add BuildRequires for libzstd-devel and zstd.
diff --git a/config/Makefile.am b/config/Makefile.am
index 11f17df06f21..3baccede61cb 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -30,7 +30,7 @@
 ##
 EXTRA_DIST = elfutils.spec.in known-dwarf.awk 10-default-yama-scope.conf \
 libelf.pc.in libdw.pc.in libdebuginfod.pc.in \
-debuginfod.service debuginfod.sysconfig
+debuginfod.service debuginfod.sysconfig profile.sh.in 
profile.csh.in
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libelf.pc libdw.pc
@@ -38,6 +38,10 @@ if DEBUGINFOD
 pkgconfig_DATA += libdebuginfod.pc
 endif
 
+install-data-local:
+   $(INSTALL_DATA) profile.sh -D $(sysconfdir)/profile.d/elfutils.sh
+   $(INSTALL_DATA) profile.csh -D $(sysconfdir)/profile.d/elfutils.csh
+
 if MAINTAINER_MODE
 $(srcdir)/elfutils.spec.in: $(top_srcdir)/NEWS
@tmpname=$$(mktemp $${TMPDIR:-/tmp}/elfutils.XX); \
diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in
index 37af1b076095..946e27498b2e 100644
--- a/config/elfutils.spec.in
+++ b/config/elfutils.spec.in
@@ -181,7 +181,7 @@ such servers to download those files on demand.
 %setup -q
 
 %build
-%configure --program-prefix=%{_programprefix} --enable-debuginfod
+%configure --program-prefix=%{_programprefix} --enable-debuginfod 
--enable-debuginfod-urls
 make -s %{?_smp_mflags}
 
 %install
diff --git a/config/profile.csh.in b/config/profile.csh.in
new file mode 100644
index ..4f25896d1fc5
--- /dev/null
+++ b/config/profile.csh.in
@@ -0,0 +1,2 @@
+
+setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS @DEBUGINFOD_URLS@"
diff --git a/config/profile.sh.in b/config/profile.sh.in
new file mode 100644
index ..8a022489e374
--- /dev/null
+++ b/config/profile.sh.in
@@ -0,0 +1,3 @@
+
+DEBUGINFOD_URLS="$DEBUGINFOD_URLS @DEBUGINFOD_URLS@"
+export DEBUGINFOD_URLS
diff --git a/configure.ac b/configure.ac
index 1b794df316d9..973409f14759 100644
--- a/configure.ac
+++ b/configure.ac
@@ -731,6 +731,18 @@ AS_IF([test "x$enable_debuginfod" != "xno"], [
 AS_IF([test "x$enable_debuginfod" != 
"xno"],AC_DEFINE([ENABLE_DEBUGINFOD],[1],[Build debuginfod]))
 AM_CONDITIONAL([DEBUGINFOD],[test "x$enable_debuginfod" = "xyes"])
 
+dnl for /etc/profile.d/elfutils.{csh,sh}
+default_debuginfod_urls=""
+AC_ARG_ENABLE(debuginfod-urls,
+[AS_HELP_STRING([--enable-debuginfod-urls@<:@=URLS@:>@],[add URLS 
to profile.d DEBUGINFOD_URLS])],
+[if test "x${enableval}" = "xyes";
+ then default_debuginfod_urls="https://debuginfod.elfutils.org/";;
+ elif test "x${enableval}" != "xno"; then
+ default_debuginfod_urls="${enableval}";
+ fi],
+[default_debuginfod_urls=""])
+AC_SUBST(DEBUGINFOD_URLS, $default_debuginfod_urls)
+AC_CONFIG_FILES([config/profile.sh config/profile.csh])
 
 AC_OUTPUT
 
@@ -764,6 +776,7 @@ AC_MSG_NOTICE([
 Extra Valgrind annotations : ${use_vg_annotations}
 libdebuginfod client support   : ${enable_libdebuginfod}
 Debuginfod server support  : ${enabl