From 3db8db8a329d6bcc46b5aaf41571309a489540c7 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 17 May 2022 12:40:33 +0900 Subject: `AR` does not need the absolute path Still use `find` to get rid of potential ARGV limit overflow, since rustc-genrated object file names are mangled and very long. --- template/Makefile.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'template/Makefile.in') diff --git a/template/Makefile.in b/template/Makefile.in index 9a2fa1c93a..3cfc745bd5 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -309,11 +309,12 @@ $(LIBRUBY_A): $(Q) if [ 'no' != '$(YJIT_SUPPORT)' ]; then \ set -eu && \ echo 'merging $(YJIT_LIBS) into $@' && \ - $(RMALL) '$(CARGO_TARGET_DIR)/libyjit/' && \ - $(MAKEDIRS) '$(CARGO_TARGET_DIR)/libyjit/' && \ - $(CP) '$(YJIT_LIBS)' '$(CARGO_TARGET_DIR)/libyjit/' && \ - (cd '$(CARGO_TARGET_DIR)/libyjit/' && $(AR) -x libyjit.a) && \ - find '$(CARGO_TARGET_DIR)/libyjit/' -name '*.o' -exec $(AR) $(ARFLAGS) $@ '{}' '+' ; \ + $(RMALL) libyjit/ && \ + $(MAKEDIRS) libyjit/ && \ + $(CP) '$(YJIT_LIBS)' libyjit/ && \ + (cd libyjit/ && $(AR) -x libyjit.a) && \ + : "$(AR) $(ARFLAGS) $@ libyjit/*.$(OBJEXT)" && \ + find libyjit/ -name '*.$(OBJEXT)' -exec $(AR) $(ARFLAGS) $@ '{}' '+' ; \ fi @-$(RANLIB) $@ 2> /dev/null || true -- cgit v1.2.1