[PATCH] Update minimum C compiler supported to C11 plus stdatomic.h
Aaron Merey
amerey@redhat.com
Fri Jan 10 22:31:09 GMT 2025
Hi Mark,
On Thu, Nov 21, 2024 at 6:34 PM Mark Wielaard <mark@klomp.org> wrote:
>
> 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>
LGTM.
Aaron
More information about the Elfutils-devel
mailing list