From patchwork Wed Oct 27 20:05:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46714 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3ED983858018 for ; Wed, 27 Oct 2021 20:05:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3ED983858018 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635365139; bh=D6yvOI6AT7Gigt+7GYWQknGG3zQjRwc18eQ6jVCZt1Q=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=RzDVdS+uvayWxXPKxHb0VjCy5zxO7g+8fhX4EF4PLn0Oh/gHIRZ1ykZRCmInNoHu4 Es3GhOql2kTz+4Nhv5toW2mBn9lCUaUX2XQM8wjZzRm35UGT4VoYjHfk79KxJqpAoJ 7GezBTqYjpz6UyORiayIc3OWSBbiIyfAJz+Y7t2o= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id D61193858404 for ; Wed, 27 Oct 2021 20:05:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D61193858404 Received: by mail-wr1-x42c.google.com with SMTP id v17so6066550wrv.9 for ; Wed, 27 Oct 2021 13:05:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D6yvOI6AT7Gigt+7GYWQknGG3zQjRwc18eQ6jVCZt1Q=; b=dIWf/EThD36TqZGy8LvSvu8FAciUjDK/0CBz9oZG2YoRqmt0BJIZ2wYaZ9kK0DXlHP 8p+TigeNGEfjJPPrQZNPcSfC7QWzvtkjdnEAAjP08EG3zHzQMoamBBltCnlzHoDAxWHJ 69WBkFramPJjc+Ko1Lhstczd45/C8kkS0cm5F1/9iiOXn9MxH2d1gXTox/3w2zP+Iwsu 5ipO9/7aNXZmhBl+UYg+psgt7qFTa0k7TjsugrPt5JDvZl0QZR2lyeuR5QQ0ub+lYGEj KBqzISzLjK+9up+uloQEjr+Ny99PSN/DWp6ycWEbhR2APBPk5dejyqK5uxrxRgF77yoe HBIg== X-Gm-Message-State: AOAM531dWHkauX36IJDDPNeLyziS2ykt8Vq4JdD3PxjUh2ZxDDERUK+J z1vKOk/dQ99vJrrbUeQubrF3ltvyF92FdA== X-Google-Smtp-Source: ABdhPJzeBe93YGrtqUpTCBhRo8ibs9CLKxzLit47CtObE9kLKhdyFCZvYt90e+WH4K9Dl0ZtAQ/3bA== X-Received: by 2002:a05:6000:15c6:: with SMTP id y6mr43083659wry.210.1635365108299; Wed, 27 Oct 2021 13:05:08 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:9748:b7d4:9e30:95e]) by smtp.gmail.com with ESMTPSA id c17sm847914wrv.22.2021.10.27.13.05.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 13:05:07 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/5] gcc: Fix "argument list too long" from install-plugins Date: Wed, 27 Oct 2021 21:05:02 +0100 Message-Id: <20211027200505.3340725-3-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> References: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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 --- gcc/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 658093c11c0..89482c6dd4e 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3685,7 +3685,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 \