]> git.puffer.fish Git - mirror/frr.git/commitdiff
build: link libatomic if available 15889/head
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 30 Apr 2024 09:52:37 +0000 (11:52 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 30 Apr 2024 12:31:07 +0000 (14:31 +0200)
It'll generally exist but be empty on systems that don't need it.
(Some 32bit platforms now need it due to 64bit time_t, and the platform
may not have 64bit atomic ops.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
configure.ac

index f11b345cf6ef927efc19c499e5674350a7a2a8a7..795417cd291d0202dd65166d258ba00441279662 100644 (file)
@@ -1095,6 +1095,8 @@ dnl -------------------------
 AC_CHECK_HEADERS([stropts.h sys/ksym.h \
        linux/version.h asm/types.h endian.h sys/endian.h])
 
+AC_CHECK_LIB([atomic], [main], [LIBS="$LIBS -latomic"], [], [])
+
 ac_stdatomic_ok=false
 AC_DEFINE([FRR_AUTOCONF_ATOMIC], [1], [did autoconf checks for atomic funcs])
 AC_CHECK_HEADER([stdatomic.h],[