commit 3697387a0a5fcb53df0094d988496f7a681ae54c
Author:     Laslo Hunhold <d...@frign.de>
AuthorDate: Tue Aug 16 17:43:07 2022 +0200
Commit:     Laslo Hunhold <d...@frign.de>
CommitDate: Tue Aug 16 17:43:07 2022 +0200

    Revert "Use ar(1)'s s-flag instead of invoking ranlib(1)"
    
    After further discussion with Roberto on the mailing list, it makes
    more sense to keep ranlib(1). There are good reasons why POSIX does not
    define it, given it relies on the binary format. Specifying the s-flag
    for ar(1) is thus very surprising, but should not be a reason not to use
    ranlib(1).
    
    This reverts commit 5fc87aedad86a8410a360ba718096e613ddf11f6.

diff --git a/Makefile b/Makefile
index 1eb9507..d53cf96 100644
--- a/Makefile
+++ b/Makefile
@@ -187,7 +187,8 @@ $(TEST):
        $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<
 
 libgrapheme.a: $(SRC:=.o)
-       $(AR) -rcs $@ $?
+       $(AR) -rc $@ $?
+       $(RANLIB) $@
 
 libgrapheme.so: $(SRC:=.o)
        $(CC) -o $@ -shared $(SRC:=.o)
diff --git a/config.mk b/config.mk
index 5425da4..3408f44 100644
--- a/config.mk
+++ b/config.mk
@@ -17,3 +17,4 @@ LDFLAGS  = -s
 # tools
 CC = cc
 AR = ar
+RANLIB = ranlib

Reply via email to