[hackers] [sbase] [PATCH] Use ar(1)'s s-flag instead of invoking ranlib(1)

From: Tom Schwindl <schwindl_AT_posteo.de>
Date: Wed, 20 Jul 2022 14:21:59 +0000

ranlib(1) is legacy and not even part of POSIX anymore, ar(1) can do the
same job with the s-flag (which is an XSI-extension, but whatever).

---
shamelessly stole Laslos commit message
---
 Makefile  | 6 ++----
 config.mk | 1 -
 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 3243b1cfacef..ee2e7fea1cba 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -202,12 +202,10 @@ $(OBJ): $(HDR) config.mk
 	$(CC) $(CFLAGS) $(CPPFLAGS) -o $_AT_ -c $<
 
 $(LIBUTF): $(LIBUTFOBJ)
-	$(AR) rc $_AT_ $?
-	$(RANLIB) $_AT_
+	$(AR) -rcs $_AT_ $?
 
 $(LIBUTIL): $(LIBUTILOBJ)
-	$(AR) rc $_AT_ $?
-	$(RANLIB) $_AT_
+	$(AR) -rcs $_AT_ $?
 
 getconf.o: getconf.h
 
diff --git a/config.mk b/config.mk
index 9fb18da1463c..a03fe29b9c8f 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -7,7 +7,6 @@ MANPREFIX = $(PREFIX)/share/man
 
 CC = cc
 AR = ar
-RANLIB = ranlib
 
 # for NetBSD add -D_NETBSD_SOURCE
 # -lrt might be needed on some systems
-- 
2.37.1
Received on Wed Jul 20 2022 - 16:21:59 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 20 2022 - 16:24:31 CEST