Re: [PATCH] configure: Test for _FORTIFY_SOURCE=3 support.

2022-03-14 Thread Mark Wielaard
Hi,

On Thu, 2022-03-10 at 18:06 +0100, Mark Wielaard wrote:
> _FORTIFY_SOURCE=3 adds extra glibc (dynamic) fortification checks
> when using GCC 12.
> 
> This adds a configure check to see if -D_FORTIFY_SOURCE=3 can be
> used.
> If not, configure will fall back to -D_FORTIFY_SOURCE=2.
> 
> On some older glibc versions (glibc 2.17) using -D_FORTIFY_SOURCE=3
> provides the same fortification as _FORTIFY_SOURCE=2. On some newer
> glibc versions and older GCC (glibc 2.34 amd gcc 11) using
> -D_FORTIFY_SOURCE=3 produces a not supported warning (and we fall
> back to -D_FORTIFY_SOURCE=2). With newer glibc and newer GCC versions
> (glibc 2.35 and gcc 12) -D_FORTIFY_SOURCE=3 will use the newer
> dynamic
> fortification checks.
> 
> This patch also makes sure that AC_PROG_CXX is used earlier so that
> CXXFLAGS is always setup correctly (even if we then don't use it).
> And it outputs both the CFLAGS and CXXFLAGS as used at the end.

Pushed.

Cheers,

Mark


Re: [PATCH] addr2line: Make --absolute the default, add --relative option.

2022-03-14 Thread Mark Wielaard
On Fri, 2022-03-11 at 15:49 +0100, Mark Wielaard wrote:
> Make --absolute (including the compilation directory in file names)
> the default and add a new option --relative to get the previous
> default behavior.
> 
> https://www.sourceware.org/bugzilla/show_bug.cgi?id=28951

Pushed,

Mark


[Bug tools/28951] eu-addr2line produces relative path names, should be absolute

2022-03-14 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28951

Mark Wielaard  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Mark Wielaard  ---
commit 9e39d31c4ec1c8f7eb16886f8b7fd04c0a4f2462
Author: Mark Wielaard 
Date:   Fri Mar 11 15:44:21 2022 +0100

addr2line: Make --absolute the default, add --relative option.

Make --absolute (including the compilation directory in file names)
the default and add a new option --relative to get the previous
default behavior.

https://www.sourceware.org/bugzilla/show_bug.cgi?id=28951

Signed-off-by: Mark Wielaard 

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

[COMMITTED] configure: Use AS_HELP_STRING instead of AC_HELP_STRING.

2022-03-14 Thread Mark Wielaard
In most places we already used AS_HELP_STRING. A few places used
AC_HELP_STRING. Which has been deprecated for a long time. Use
AS_HELP_STRING instead of AC_HELP_STRING everywhere.

Signed-off-by: Mark Wielaard 
---
 ChangeLog| 4 
 configure.ac | 4 ++--
 m4/ChangeLog | 5 +
 m4/biarch.m4 | 2 +-
 m4/zip.m4| 2 +-
 5 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f0ea04be..2f46f903 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-03-14  Mark Wielaard  
+
+   * configure.ac: Use AS_HELP_STRING instead of AC_HELP_STRING.
+
 2021-03-11  Mark Wielaard  
 
* NEWS: Document new --relative option for addr2line.
diff --git a/configure.ac b/configure.ac
index 52882fa9..1aff9f30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -744,7 +744,7 @@ AC_CHECK_PROG(HAVE_ZSTD, zstd, yes, no)
 AM_CONDITIONAL([HAVE_ZSTD],[test "x$HAVE_ZSTD" = "xyes"])
 
 # Look for libcurl for libdebuginfod minimum version as per rhel7.
-AC_ARG_ENABLE([libdebuginfod],AC_HELP_STRING([--enable-libdebuginfod], [Build 
debuginfod client library (can be =dummy)]))
+AC_ARG_ENABLE([libdebuginfod],AS_HELP_STRING([--enable-libdebuginfod], [Build 
debuginfod client library (can be =dummy)]))
 AS_IF([test "x$enable_libdebuginfod" != "xno"], [
 if test "x$enable_libdebuginfod" != "xdummy"; then
   AC_MSG_NOTICE([checking libdebuginfod dependencies, 
--disable-libdebuginfod or --enable-libdebuginfo=dummy to skip])
@@ -771,7 +771,7 @@ AM_CONDITIONAL([DUMMY_LIBDEBUGINFOD],[test 
"x$enable_libdebuginfod" = "xdummy"])
 
 # Look for libmicrohttpd, libarchive, sqlite for debuginfo server
 # minimum versions as per rhel7.
-AC_ARG_ENABLE([debuginfod],AC_HELP_STRING([--enable-debuginfod], [Build 
debuginfod server]))
+AC_ARG_ENABLE([debuginfod],AS_HELP_STRING([--enable-debuginfod], [Build 
debuginfod server]))
 AS_IF([test "x$enable_debuginfod" != "xno"], [
 AC_MSG_NOTICE([checking debuginfod C++11 support, --disable-debuginfod to 
skip])
 AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 32832693..d4c3c28c 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,8 @@
+2022-03-14  Mark Wielaard  
+
+   * biarch.m4: Use AS_HELP_STRING instead of AC_HELP_STRING.
+   * zip.m4: Likewise.
+
 2020-12-15  Dmitry V. Levin  
 
* .gitignore: New file.
diff --git a/m4/biarch.m4 b/m4/biarch.m4
index c238d8d1..68618473 100644
--- a/m4/biarch.m4
+++ b/m4/biarch.m4
@@ -28,7 +28,7 @@ biarch_CC="$biarch_CC $utrace_biarch"])])
 AC_DEFUN([utrace_BIARCH], [AC_REQUIRE([utrace_HOST64])
 utrace_biarch_forced=no
 AC_ARG_WITH([biarch],
-   AC_HELP_STRING([--with-biarch],
+   AS_HELP_STRING([--with-biarch],
   [enable biarch tests despite build problems]),
[AS_IF([test "x$with_biarch" != xno], [utrace_biarch_forced=yes])])
 AS_IF([test $utrace_biarch_forced = yes], [dnl
diff --git a/m4/zip.m4 b/m4/zip.m4
index ab6fd57e..8affa3fa 100644
--- a/m4/zip.m4
+++ b/m4/zip.m4
@@ -4,7 +4,7 @@ dnl and sets AC_DEFINE(USE_$2) and LIBS.
 
 AC_DEFUN([eu_ZIPLIB], [dnl
 AC_ARG_WITH([[$1]],
-AC_HELP_STRING([--with-[$1]], [support [$1] compression in libdwfl]),,
+AS_HELP_STRING([--with-[$1]], [support [$1] compression in libdwfl]),,
[with_[$1]=default])
 if test $with_[$1] != no; then
   AC_SEARCH_LIBS([$4], [$3], [with_[$1]=yes],
-- 
2.18.4