]> git.ipfire.org Git - thirdparty/elfutils.git/commit
Update minimum C compiler supported to C11 plus stdatomic.h
authorMark Wielaard <mark@klomp.org>
Mon, 18 Nov 2024 23:45:39 +0000 (00:45 +0100)
committerMark Wielaard <mark@klomp.org>
Fri, 10 Jan 2025 23:19:28 +0000 (00:19 +0100)
commitd5fe635875628a9de431c883c0e5037dec0f85f3
treed70587cd48a43d5db07030c97043e6f182066cc1
parent977c4dba220db572fe5ff43b6eb8b81673be0ef7
Update minimum C compiler supported to C11 plus stdatomic.h

We were using a somewhat odd mix of gnu99 with a fallback atomics.h so
we could build with gcc 4.7. Lets requires a compiler that can do at
least C11 and has a stdatomic.h. So we can build against any C
standard >= C11 (including C17 and C23). That means GCC 4.9+.
GCC 4.9 was released in 2014.

The lowest compiler version we check in the buildbots is currently
GCC 8.3.0 (Debian old old stable, released in 2018).

Also update the minimum autoconf version to 2.69. We would really like
2.70+ so we don't need the gnulib gnu11.m4. But 2.69 still seems in
use on various stable systems. autoconf 2.70 was released end of 2020,
autoconf 2.69 in 2012.

      * configure.ac (AC_PACKAGE_URL): Removed workaround for
      autoconf < 2.64.
      (AC_PREREQ): Update from 2.63 to 2.69.
      (AC_PROG_CC): Test for ac_cv_prog_cc_c11.
      (AC_CACHE_CHECK for stdatomic.h
      * config/eu.am (AM_CFLAGS): Remove -std=gnu99.
      * lib/Makefile.am (noinst_HEADERS): Remove atomics.h and
      stdatomic-fbsd.h.
      * lib/atomics.h: Removed.
      * lib/stdatomic-fbsd.h: Removed.
      * lib/dynamicsizehash_concurrent.h: Include stdatomic.h.
      * libdw/libdw_alloc.c: Likewise.
      * m4/.gitignore: Add !/std-gnu11.m4.
      * m4/std-gnu11.m4: New file from gnulib to provide AC_PROG_CC
      from autoconf 2.70.

Signed-off-by: Mark Wielaard <mark@klomp.org>
config/eu.am
configure.ac
lib/Makefile.am
lib/atomics.h [deleted file]
lib/dynamicsizehash_concurrent.h
lib/stdatomic-fbsd.h [deleted file]
libdw/libdw_alloc.c
m4/.gitignore
m4/std-gnu11.m4 [new file with mode: 0644]