libbsd: Branch 'main' - 7 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 21 01:27:18 UTC 2024
configure.ac | 205 +++++++++++++++++++++--------------------------------
m4/libbsd-funcs.m4 | 57 ++++++++++++++
man/Makefile.am | 50 ++++++------
src/Makefile.am | 72 +++++++++---------
test/Makefile.am | 71 ++++++++++--------
5 files changed, 245 insertions(+), 210 deletions(-)
New commits:
commit de124dcafac678351366b0572938398ea7ae93e4
Author: Guillem Jover <guillem at hadrons.org>
Date: Tue Feb 20 04:28:01 2024 +0100
build: Make digest function checks conditional on their use
The digest function checks where unconditionally requiring the functions
to exist or they would error out. But these functions are not required
on all systems, they depend on the ABI to be exposed.
diff --git a/configure.ac b/configure.ac
index 91e8fbf..a6e63db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ need_err=yes
need_errc=yes
need_fpurge=yes
need_funopen=yes
-need_md5=yes
+need_md5=no
need_name_from_id=yes
need_nlist=yes
need_progname=yes
@@ -169,20 +169,28 @@ AM_CONDITIONAL([HAVE_LIBTESTU01],
[test "x$ac_cv_lib_testu01_unif01_CreateExternGenBits" = "xyes"])
saved_LIBS="$LIBS"
-AC_SEARCH_LIBS([MD5Update], [md], [
- AS_IF([test "x$ac_cv_search_MD5Update" != "xnone required"], [
- MD5_LIBS="$MD5_LIBS $ac_cv_search_MD5Update"
- need_transparent_libmd=yes
+AS_IF([test "$need_md5" = "yes"], [
+ AC_SEARCH_LIBS([MD5Update], [md], [
+ AS_IF([test "x$ac_cv_search_MD5Update" != "xnone required"], [
+ MD5_LIBS="$MD5_LIBS $ac_cv_search_MD5Update"
+ need_transparent_libmd=yes
+ ])
+ ], [
+ AC_MSG_ERROR([cannot find required MD5 functions in libc or libmd])
])
-], [
- AC_MSG_ERROR([cannot find required MD5 functions in libc or libmd])
])
-AC_SEARCH_LIBS([SHA512Update], [md], [
- AS_IF([test "x$ac_cv_search_SHA512Update" != "xnone required"], [
- LIBBSD_LIBS="$LIBBSD_LIBS $ac_cv_search_SHA512Update"
+AS_IF([test "$need_arc4random" = "yes"], [
+ AC_CHECK_FUNCS([getentropy])
+
+ AS_IF([test "$ac_cv_func_getentropy" != "yes"], [
+ AC_SEARCH_LIBS([SHA512Update], [md], [
+ AS_IF([test "x$ac_cv_search_SHA512Update" != "xnone required"], [
+ LIBBSD_LIBS="$SHA512_LIBS $ac_cv_search_SHA512Update"
+ ])
+ ], [
+ AC_MSG_ERROR([cannot find required SHA-2 functions in libc or libmd])
+ ])
])
-], [
- AC_MSG_ERROR([cannot find required SHA-2 functions in libc or libmd])
])
LIBS="$saved_LIBS"
commit 1d287295146a719585b6c92a57e283ee8bc169a3
Author: Guillem Jover <guillem at hadrons.org>
Date: Tue Feb 20 04:13:59 2024 +0100
build: Move ABI selection at the top of configure.ac
Merge the existing host_os block for the OS detection with the ABI
selection one, as these are related. This way we will be able to make
some of the latter checks conditional on the selected ABI.
diff --git a/configure.ac b/configure.ac
index 7e3fb35..91e8fbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,12 +34,71 @@ AM_PROG_AR
LT_INIT
LIBBSD_LINKER_VERSION_SCRIPT
+## Select library ABI to expose.
+
is_windows=no
+
+need_arc4random=yes
+need_bsd_getopt=yes
+need_err=yes
+need_errc=yes
+need_fpurge=yes
+need_funopen=yes
+need_md5=yes
+need_name_from_id=yes
+need_nlist=yes
+need_progname=yes
+need_strl=yes
+need_strmode=yes
+need_wcsl=yes
+
AS_CASE([$host_os],
+ [*-gnu*], [
+ # On glibc >= 2.38, strlcpy() and strlcat() got added,
+ # so these could then be dropped on the next SOVERSION bump.
+ #need_strl=no
+ need_err=no
+ ],
+ [*-musl*], [
+ # On musl >= 0.9.7, optreset got implemented, so bsd_getopt() can then
+ # be dropped on the next SOVERSION bump.
+ #need_bsd_getopt=no
+ need_err=no
+ # On musl >= 1.1.19, fopencookie() got implemented, and because we were
+ # checking for its presence to decide whether to build funopen(), it got
+ # included in builds even when previously it had not been included, which
+ # is partially an ABI issue, but given that disabling it now would be
+ # worse, we'll ignore this as this is only a problem with downgrades. And
+ # enable it explicitly
+ need_funopen=yes
+ # On musl >= 0.5.0, strlcpy() and strlcat() were already implemented,
+ # so these can then be dropped on the next SOVERSION bump.
+ #need_strl=no
+ ],
+ [darwin*], [
+ # On macOS these are provided by the system, and libbsd has never built
+ # there, so we can avoid providing these with no ABI breakage.
+ need_arc4random=no
+ need_bsd_getopt=no
+ need_err=no
+ need_errc=no
+ need_fpurge=no
+ # On macOS we do not have fopencookie(), and cannot implement it.
+ need_funopen=no
+ need_md5=no
+ need_name_from_id=no
+ need_nlist=no
+ need_progname=no
+ need_strl=no
+ need_strmode=no
+ need_transparent_libmd=no
+ need_wcsl=no
+ ],
[mingw*], [
is_windows=yes
],
)
+
AM_CONDITIONAL([OS_WINDOWS], [test "x$is_windows" = "xyes"])
# Checks for programs.
@@ -210,63 +269,6 @@ AC_CHECK_FUNCS([\
group_from_gid \
])
-need_arc4random=yes
-need_bsd_getopt=yes
-need_err=yes
-need_errc=yes
-need_progname=yes
-need_md5=yes
-need_nlist=yes
-need_strl=yes
-need_wcsl=yes
-need_strmode=yes
-need_name_from_id=yes
-need_fpurge=yes
-need_funopen=yes
-AS_CASE([$host_os],
- [*-gnu*], [
- # On glibc >= 2.38, strlcpy() and strlcat() got added,
- # so these could then be dropped on the next SOVERSION bump.
- #need_strl=no
- need_err=no
- ],
- [*-musl*], [
- # On musl >= 0.5.0, strlcpy() and strlcat() were already implemented,
- # so these can then be dropped on the next SOVERSION bump.
- #need_strl=no
- # On musl >= 0.9.7, optreset got implemented, so bsd_getopt() can then
- # be dropped on the next SOVERSION bump.
- #need_bsd_getopt=no
- need_err=no
- # On musl >= 1.1.19, fopencookie() got implemented, and because we were
- # checking for its presence to decide whether to build funopen(), it got
- # included in builds even when previously it had not been included, which
- # is partially an ABI issue, but given that disabling it now would be
- # worse, we'll ignore this as this is only a problem with downgrades. And
- # enable it explicitly
- need_funopen=yes
- ],
- [darwin*], [
- # On macOS these are provided by the system, and libbsd has never built
- # there, so we can avoid providing these with no ABI breakage.
- need_arc4random=no
- need_bsd_getopt=no
- need_err=no
- need_errc=no
- need_progname=no
- need_transparent_libmd=no
- need_md5=no
- need_nlist=no
- need_strl=no
- need_wcsl=no
- need_strmode=no
- need_name_from_id=no
- need_fpurge=no
- # On macOS we do not have fopencookie(), and cannot implement it.
- need_funopen=no
- ],
-)
-
AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = "xyes"])
AM_CONDITIONAL([NEED_ARC4RANDOM], [test "x$need_arc4random" = "xyes"])
commit a81d0b711354a9eb2621d67d3a47c2ae5cf33b9e
Author: Guillem Jover <guillem at hadrons.org>
Date: Sun Feb 11 23:55:40 2024 +0100
build: Sort variables and their contents in automake files
This should make it easier to add new entries, and find them afterwards.
diff --git a/man/Makefile.am b/man/Makefile.am
index 4fe372a..51cbdd7 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -243,48 +243,40 @@ dist_man_MANS += \
# EOL
endif
-if NEED_PROGNAME
-dist_man_MANS += \
- getprogname.3bsd \
- setprogname.3bsd \
- # EOL
-endif
-
-if NEED_MD5
+if NEED_FPURGE
dist_man_MANS += \
- md5.3bsd \
+ fpurge.3bsd \
# EOL
endif
-if NEED_NLIST
+if NEED_FUNOPEN
dist_man_MANS += \
- nlist.3bsd \
+ funopen.3bsd \
# EOL
endif
-if NEED_STRL
+if NEED_MD5
dist_man_MANS += \
- strlcat.3bsd \
- strlcpy.3bsd \
+ md5.3bsd \
# EOL
endif
-if NEED_WCSL
+if NEED_NLIST
dist_man_MANS += \
- wcslcat.3bsd \
- wcslcpy.3bsd \
+ nlist.3bsd \
# EOL
endif
-if NEED_STRMODE
+if NEED_PROGNAME
dist_man_MANS += \
- strmode.3bsd \
+ getprogname.3bsd \
+ setprogname.3bsd \
# EOL
endif
dist_man_MANS += \
- uid_from_user.3bsd \
gid_from_group.3bsd \
+ uid_from_user.3bsd \
# EOL
if NEED_NAME_FROM_ID
@@ -294,14 +286,22 @@ dist_man_MANS += \
# EOL
endif
-if NEED_FPURGE
+if NEED_STRL
dist_man_MANS += \
- fpurge.3bsd \
+ strlcat.3bsd \
+ strlcpy.3bsd \
# EOL
endif
-if NEED_FUNOPEN
+if NEED_STRMODE
dist_man_MANS += \
- funopen.3bsd \
+ strmode.3bsd \
+ # EOL
+endif
+
+if NEED_WCSL
+dist_man_MANS += \
+ wcslcat.3bsd \
+ wcslcpy.3bsd \
# EOL
endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 67a01df..b4ec241 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -113,44 +113,50 @@ libbsd_la_SOURCES = \
vis.c \
# EOL
-if NEED_ERR
+if NEED_ARC4RANDOM
+if !HAVE_GETENTROPY
libbsd_la_SOURCES += \
- err.c \
+ getentropy.c \
+ # EOL
+endif
+libbsd_la_SOURCES += \
+ arc4random.c \
+ arc4random.h \
+ arc4random_linux.h \
+ arc4random_uniform.c \
+ arc4random_unix.h \
+ arc4random_win.h \
+ chacha_private.h \
# EOL
endif
-if NEED_ERRC
+if NEED_BSD_GETOPT
libbsd_la_SOURCES += \
- errc.c \
+ bsd_getopt.c \
# EOL
endif
-if NEED_PROGNAME
+if NEED_ERR
libbsd_la_SOURCES += \
- progname.c \
+ err.c \
# EOL
endif
-if NEED_BSD_GETOPT
+if NEED_ERRC
libbsd_la_SOURCES += \
- bsd_getopt.c \
+ errc.c \
# EOL
endif
-if NEED_ARC4RANDOM
-if !HAVE_GETENTROPY
+if NEED_FPURGE
libbsd_la_SOURCES += \
- getentropy.c \
+ fpurge.c \
# EOL
endif
+
+if NEED_FUNOPEN
libbsd_la_SOURCES += \
- arc4random.c \
- arc4random.h \
- arc4random_linux.h \
- arc4random_uniform.c \
- arc4random_unix.h \
- arc4random_win.h \
- chacha_private.h \
+ funopen.c \
# EOL
endif
@@ -166,17 +172,16 @@ libbsd_la_SOURCES += \
# EOL
endif
-if NEED_STRL
+if NEED_PROGNAME
libbsd_la_SOURCES += \
- strlcat.c \
- strlcpy.c \
+ progname.c \
# EOL
endif
-if NEED_WCSL
+if NEED_STRL
libbsd_la_SOURCES += \
- wcslcat.c \
- wcslcpy.c \
+ strlcat.c \
+ strlcpy.c \
# EOL
endif
@@ -186,15 +191,10 @@ libbsd_la_SOURCES += \
# EOL
endif
-if NEED_FPURGE
-libbsd_la_SOURCES += \
- fpurge.c \
- # EOL
-endif
-
-if NEED_FUNOPEN
+if NEED_WCSL
libbsd_la_SOURCES += \
- funopen.c \
+ wcslcat.c \
+ wcslcpy.c \
# EOL
endif
diff --git a/test/Makefile.am b/test/Makefile.am
index 459012c..7b53bc1 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -49,21 +49,27 @@ check_PROGRAMS = \
vis-openbsd \
# EOL
-if NEED_PROGNAME
-check_PROGRAMS += progname
-endif
+if NEED_ARC4RANDOM
+if HAVE_LIBTESTU01
+check_PROGRAMS += arc4random
-if NEED_NLIST
-check_PROGRAMS += nlist
+arc4random_LDADD = $(LDADD) $(TESTU01_LIBS)
endif
-
-if NEED_STRL
-check_PROGRAMS += strl
endif
-if NEED_STRMODE
-check_PROGRAMS += strmode
-endif
+fgetln_SOURCES = \
+ test-stream.c \
+ test-stream.h \
+ fgetln.c \
+ # EOL
+
+fgetln_CFLAGS = -Wno-deprecated-declarations
+
+fparseln_SOURCES = \
+ test-stream.c \
+ test-stream.h \
+ fparseln.c \
+ # EOL
if NEED_FPURGE
check_PROGRAMS += fpurge
@@ -73,38 +79,45 @@ if NEED_FUNOPEN
check_PROGRAMS += funopen
endif
-if NEED_ARC4RANDOM
-if HAVE_LIBTESTU01
-arc4random_LDADD = $(LDADD) $(TESTU01_LIBS)
+if NEED_MD5
+check_PROGRAMS += md5
-check_PROGRAMS += arc4random
+if NEED_TRANSPARENT_LIBMD
+# On the installed system this is handled via the ld script.
+md5_LDADD = $(LDADD) $(MD5_LIBS)
endif
endif
+if NEED_NLIST
+check_PROGRAMS += nlist
+endif
+
+proctitle_init_SOURCES = \
+ proctitle.c \
+ # EOL
+
+proctitle_init_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_USE_SETPROCTITLE_INIT=1
+
if BUILD_LIBBSD_CTOR
+check_PROGRAMS += proctitle
+
proctitle_LDFLAGS = \
-Wl,-u,libbsd_init_func \
$(top_builddir)/src/libbsd-ctor.a \
$(top_builddir)/src/libbsd.la \
# EOL
-
-check_PROGRAMS += proctitle
endif
-if NEED_MD5
-check_PROGRAMS += md5
-
-if NEED_TRANSPARENT_LIBMD
-# On the installed system this is handled via the ld script.
-md5_LDADD = $(LDADD) $(MD5_LIBS)
-endif
+if NEED_PROGNAME
+check_PROGRAMS += progname
endif
-fgetln_SOURCES = test-stream.c test-stream.h fgetln.c
-fgetln_CFLAGS = -Wno-deprecated-declarations
-fparseln_SOURCES = test-stream.c test-stream.h fparseln.c
+if NEED_STRL
+check_PROGRAMS += strl
+endif
-proctitle_init_SOURCES = proctitle.c
-proctitle_init_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_USE_SETPROCTITLE_INIT=1
+if NEED_STRMODE
+check_PROGRAMS += strmode
+endif
TESTS = $(check_SCRIPTS) $(check_PROGRAMS)
commit c8e5338a7c5010d131a920c245d27618b01bde59
Author: Guillem Jover <guillem at hadrons.org>
Date: Wed Feb 21 02:05:57 2024 +0100
build: Rename LIBBSD_ABI to SOVERSION
This matches the semantics of the variable, and makes it independent of
the project, just as the package variables.
diff --git a/configure.ac b/configure.ac
index b9930e5..7e3fb35 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,12 +16,12 @@ AM_INIT_AUTOMAKE(
)
AM_SILENT_RULES([yes])
-LIBBSD_ABI_MAJOR=0
-LIBBSD_ABI_MINOR=11
-LIBBSD_ABI_PATCH=8
+SOVERSION_MAJOR=0
+SOVERSION_MINOR=11
+SOVERSION_PATCH=8
-LIBBSD_ABI="$LIBBSD_ABI_MAJOR:$LIBBSD_ABI_MINOR:$LIBBSD_ABI_PATCH"
-AC_SUBST([LIBBSD_ABI])
+SOVERSION="$SOVERSION_MAJOR:$SOVERSION_MINOR:$SOVERSION_PATCH"
+AC_SUBST([SOVERSION])
# Check and store if we got user supplied variables
user_CFLAGS=${CFLAGS-unset}
diff --git a/src/Makefile.am b/src/Makefile.am
index 060e360..67a01df 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -61,7 +61,7 @@ libbsd_la_LIBADD = \
# EOL
libbsd_la_LDFLAGS = \
-no-undefined \
- -version-number $(LIBBSD_ABI) \
+ -version-number $(SOVERSION) \
# EOL
if HAVE_LINKER_VERSION_SCRIPT
libbsd_la_LDFLAGS += \
commit b6d6da4cd46ac2c20bd8febe935e1af3ae96c4a9
Author: Guillem Jover <guillem at hadrons.org>
Date: Tue Feb 20 04:40:32 2024 +0100
build: Refactor function checks into a new libbsd-funcs.m4 file
These are complex enough to clutter the main configure.ac. Move them
into their own file.
diff --git a/configure.ac b/configure.ac
index 7878743..b9930e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -187,53 +187,8 @@ AC_CHECK_DECLS([environ], [], [], [[
LIBBSD_HAS_GNU_INIT_ARRAY
# Checks for library functions.
-AC_MSG_CHECKING([for program_invocation_short_name])
-AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-#include <errno.h>
- ]], [[
-const char *p = program_invocation_short_name;
- ]])
-], [
- AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
- [Define to 1 if you have program_invocation_short_name])
- AC_MSG_RESULT([yes])
-], [
- AC_MSG_RESULT([no])
-])
-
-AC_MSG_CHECKING([for __progname])
-AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-#include <stdio.h>
-extern char *__progname;
- ]], [[
-printf("%s", __progname);
- ]])
-], [
- AC_DEFINE([HAVE___PROGNAME], [1], [Define to 1 if you have __progname])
- AC_MSG_RESULT([yes])
-], [
- AC_MSG_RESULT([no])
-])
-
-AC_MSG_CHECKING([for __register_atfork])
-AC_LINK_IFELSE([
- AC_LANG_PROGRAM([[
-#include <stddef.h>
-extern void *__dso_handle;
-extern int __register_atfork(void (*)(void), void(*)(void), void (*)(void), void *);
- ]], [[
-__register_atfork(NULL, NULL, NULL, __dso_handle);
- ]])
-], [
- AC_DEFINE([HAVE___REGISTER_ATFORK], [1],
- [Define to 1 if you have __register_atfork])
- AC_MSG_RESULT([yes])
-], [
- LIBBSD_LIBS="$LIBBSD_LIBS -pthread"
- AC_MSG_RESULT([no])
-])
+LIBBSD_CHECK_PROGNAME
+LIBBSD_CHECK_REGISTER_ATFORK
AC_CHECK_FUNCS([\
clearenv \
diff --git a/m4/libbsd-funcs.m4 b/m4/libbsd-funcs.m4
new file mode 100644
index 0000000..379afc5
--- /dev/null
+++ b/m4/libbsd-funcs.m4
@@ -0,0 +1,57 @@
+# Copyright © 2011-2024 Guillem Jover <guillem at hadrons.org>
+
+# LIBBSD_CHECK_PROGNAME
+# ---------------------
+AC_DEFUN([LIBBSD_CHECK_PROGNAME], [
+ AC_MSG_CHECKING([for program_invocation_short_name])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+#include <errno.h>
+ ]], [[
+const char *p = program_invocation_short_name;
+ ]])
+ ], [
+ AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
+ [Define to 1 if you have program_invocation_short_name])
+ AC_MSG_RESULT([yes])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+
+ AC_MSG_CHECKING([for __progname])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+#include <stdio.h>
+extern char *__progname;
+ ]], [[
+printf("%s", __progname);
+ ]])
+ ], [
+ AC_DEFINE([HAVE___PROGNAME], [1], [Define to 1 if you have __progname])
+ AC_MSG_RESULT([yes])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+])
+
+# LIBBSD_CHECK_REGISTER_ATFORK
+# ----------------------------
+AC_DEFUN([LIBBSD_CHECK_REGISTER_ATFORK], [
+ AC_MSG_CHECKING([for __register_atfork])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+#include <stddef.h>
+extern void *__dso_handle;
+extern int __register_atfork(void (*)(void), void(*)(void), void (*)(void), void *);
+ ]], [[
+__register_atfork(NULL, NULL, NULL, __dso_handle);
+ ]])
+ ], [
+ AC_DEFINE([HAVE___REGISTER_ATFORK], [1],
+ [Define to 1 if you have __register_atfork])
+ AC_MSG_RESULT([yes])
+ ], [
+ LIBBSD_LIBS="$LIBBSD_LIBS -pthread"
+ AC_MSG_RESULT([no])
+ ])
+])
commit f8cb9d8b28048c76a3a8dd724d28a6ecd130d835
Author: Guillem Jover <guillem at hadrons.org>
Date: Tue Feb 20 03:57:37 2024 +0100
build: Remove space before shell redirection
This makes it more clear what the redirection applies to.
diff --git a/man/Makefile.am b/man/Makefile.am
index b878fef..4fe372a 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -11,7 +11,7 @@ CLEANFILES = \
SED_MD5_SUBST = -e 's/mdX/md5/g' -e 's/mdY/md4/g' -e 's/MDX/MD5/g'
md5.3bsd: $(srcdir)/mdX.3bsd
- $(AM_V_GEN) $(SED) $(SED_MD5_SUBST) $< > $@
+ $(AM_V_GEN) $(SED) $(SED_MD5_SUBST) $< >$@
dist_man_MANS = \
LIST_CLASS_ENTRY.3bsd \
diff --git a/src/Makefile.am b/src/Makefile.am
index f0e770e..060e360 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -221,14 +221,14 @@ libbsd.map: libbsd.map.in
# Generate a simple libtool symbol export list to be used as a fallback if
# there is no version script support.
libbsd.sym: libbsd.map
- $(AM_V_GEN) $(SED) -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9_]\{1,\}\);/\1/p' libbsd.map > $@
+ $(AM_V_GEN) $(SED) -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9_]\{1,\}\);/\1/p' libbsd.map >$@
if NEED_TRANSPARENT_LIBMD
TRANSPARENT_LIBMD_DEPENDS = format.ld
format.ld:
$(CC) -shared -nostdlib -nostartfiles -x assembler /dev/null -o $@.so
- $(OBJDUMP) -f $@.so | sed -n 's/.*file format \(.*\)/OUTPUT_FORMAT(\1)/;T;p' > $@
+ $(OBJDUMP) -f $@.so | sed -n 's/.*file format \(.*\)/OUTPUT_FORMAT(\1)/;T;p' >$@
rm -f $@.so
endif
commit 154624ab459723b204d031405f4321eba83ccc36
Author: Guillem Jover <guillem at hadrons.org>
Date: Sun Feb 18 20:40:24 2024 +0100
build: Add support for silent rules for the libbsd.map generation
The new rule was introduced w/o silent rule support.
Fixes: commit 19e06407eb365a2bedc9bdd29a83c1e1803e3f92
diff --git a/src/Makefile.am b/src/Makefile.am
index 1877ad6..f0e770e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -216,7 +216,7 @@ libbsd_ctor_a_SOURCES = \
# Generate the library map file with the pre-processor to selectively include
# symbols depending on the host system, otherwise some linkers might fail.
libbsd.map: libbsd.map.in
- $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -P - <$(srcdir)/libbsd.map.in >$@
+ $(AM_V_GEN) $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -P - <$(srcdir)/libbsd.map.in >$@
# Generate a simple libtool symbol export list to be used as a fallback if
# there is no version script support.
More information about the libbsd
mailing list