On Wed, 20 Jul 2022 12:23:01 +0000 Tom Schwindl <schwi...@posteo.de> wrote:
Dear Tom, > I've noticed that we use the non-standard ranlib(1) program to create > symbol tables for archives created by ar(1). This affects, as far as > I can tell, every creation of static libraries we have. > > ranlib(1) is, in fact, legacy. It was used to create symbol tables > for archives before ar(1) was able to do that by itself. > POSIX now specifies that ar(1) should create a symbol table by > default, when there is at least one recognized object file[1]. > Additionally, the `s` option exists which does exactly the same as > ranlib(1)[2]. > > We could replace the ranlib(1) calls with: > > ar rcs files... > > which not only makes the creation of static libraries more portable, > but also simpler. this is a very good observation, thank you! I must admit that I only copied the ar-ranlib-invocation likewise from what I found on the internet for my libraries, so even though I don't think it makes any difference (i.e. increases portability apart from standards-legalese), it helps to make ranlib more and more superfluous and promote the best practice, which is why I pushed your described change for libgrapheme[0]. Thanks for making suckless software suck less. :) With best regards Laslo [0]:https://git.suckless.org/libgrapheme/commit/5fc87aedad86a8410a360ba718096e613ddf11f6.html