diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-05-17 12:40:33 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-05-18 14:33:00 +0900 |
commit | 3db8db8a329d6bcc46b5aaf41571309a489540c7 (patch) | |
tree | b39656aff16f8cbe10716fa7e3dbea875a9d5373 /template | |
parent | c478a3c0a9179298b5ae332268e1e94ff9c912bd (diff) | |
download | ruby-3db8db8a329d6bcc46b5aaf41571309a489540c7.tar.gz |
`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.
Diffstat (limited to 'template')
-rw-r--r-- | template/Makefile.in | 11 |
1 files changed, 6 insertions, 5 deletions
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 |