From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2119) id DA9CE3858010; Fri, 3 Dec 2021 03:00:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA9CE3858010 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jeff Law To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5764] gcc: Fix "argument list too long" from install-plugins X-Act-Checkin: gcc X-Git-Author: Richard Purdie X-Git-Refname: refs/heads/master X-Git-Oldrev: 711084c9450c49b372e177d94ae99fc642e1cc73 X-Git-Newrev: 66e157188bd2f789809e17e85f917534c9381599 Message-Id: <20211203030055.DA9CE3858010@sourceware.org> Date: Fri, 3 Dec 2021 03:00:55 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2021 03:00:56 -0000 https://gcc.gnu.org/g:66e157188bd2f789809e17e85f917534c9381599 commit r12-5764-g66e157188bd2f789809e17e85f917534c9381599 Author: Richard Purdie Date: Thu Dec 2 22:00:04 2021 -0500 gcc: Fix "argument list too long" from install-plugins When building in longer build paths (200+ characters), the "echo $(PLUGIN_HEADERS)" from the install-plugins target would cause an "argument list too long error" on some systems. Avoid this by calling make's sort function on the list which removes duplicates and stops the overflow from reaching the echo command. The original sort is left to handle the the .h and .def files. 2021-10-26 Richard Purdie gcc/ChangeLog: * Makefile.in: Fix "argument list too long" from install-plugins. Signed-off-by: Richard Purdie Diff: --- gcc/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 81ea8a73b99..2a0be9e66a6 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3691,7 +3691,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype # We keep the directory structure for files in config, common/config or # c-family and .def files. All other files are flattened to a single directory. $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) - headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ + headers=`echo $(sort $(PLUGIN_HEADERS)) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ for file in $$headers; do \ if [ -f $$file ] ; then \