summaryrefslogtreecommitdiff
path: root/src/Makefile.shlib
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-10-07 11:53:39 -0700
committerAndres Freund <andres@anarazel.de>2022-10-07 11:53:39 -0700
commit2473cb9ff374dff99437138c144fab6d9f7dfd26 (patch)
treef262f82d015d3c4dba373b7fcdca407f25c6269a /src/Makefile.shlib
parent614a406b4ff1b6f0f84b89fb56dca5175978177d (diff)
downloadpostgresql-2473cb9ff374dff99437138c144fab6d9f7dfd26.tar.gz
autoconf: Rely on ar supporting index creation
This way we don't need RANLIB anymore, making it a bit simpler for the meson build to generate Makefile.global for PGXS compatibility. FreeBSD, NetBSD, OpenBSD, the only platforms where we didn't use AROPT=crs, all have supported the 's' option for a long time. On macOS we ran ranlib after installing a static library. This was added a long time ago, in 58ad65ec2def. I cannot reproduce an issue in more recent macOS versions. This is removed now. Based on discussion with Tom, I left the 'touch' at the end of static libraries generation, added in 826eff57c4c, in place. While it looks like current versions of Apple's ar/ranlib don't need it, it was needed not too long ago. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/20221005200710.luvw5evhwf6clig6@awork3.anarazel.de
Diffstat (limited to 'src/Makefile.shlib')
-rw-r--r--src/Makefile.shlib7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index db466b3b84..35abce58d2 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -252,7 +252,7 @@ all-static-lib: $(stlib)
all-shared-lib: $(shlib)
# In this rule, "touch $@" works around a problem on some platforms wherein
-# ranlib updates the library file's mod time with a value calculated to
+# ar updates the library file's mod time with a value calculated to
# seconds precision. If the filesystem has sub-second timestamps, this can
# cause the library file to appear older than its input files, triggering
# parallel-make problems.
@@ -260,7 +260,6 @@ ifndef haslibarule
$(stlib): $(OBJS) | $(SHLIB_PREREQS)
rm -f $@
$(LINK.static) $@ $^
- $(RANLIB) $@
touch $@
endif #haslibarule
@@ -394,10 +393,6 @@ install-lib-pc: lib$(NAME).pc installdirs-lib
install-lib-static: $(stlib) installdirs-lib
$(INSTALL_STLIB) $< '$(DESTDIR)$(libdir)/$(stlib)'
-ifeq ($(PORTNAME), darwin)
- cd '$(DESTDIR)$(libdir)' && \
- $(RANLIB) $(stlib)
-endif
install-lib-shared: $(shlib) installdirs-lib
ifdef soname