From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id 93D8C3858417 for ; Tue, 23 Nov 2021 02:30:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 93D8C3858417 Received: by mail-pg1-x52c.google.com with SMTP id t4so9600460pgn.9 for ; Mon, 22 Nov 2021 18:30:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z9rY/+jcMFwu+3HjMTE6NnuCzZh/2Rw13mnuUgfIcng=; b=bUOFD+AjmeNTzobDSgyrKOXalOGEvmf05WuG2O2i3QC3DCnvDYf7fQ3ybAqXYHytAv XBnbnFTivq765l53tf8rAK4mJUehIvhrSS/INTeXWoMZXTi3iCYz0UkucT8Oz1ZGMPJ7 n3/cEosU+nU5GFjlmK4tAw1NtvcvxqPgW1WuXr0nIYmsu9TNIv4omDbrxU5CFUTwjd2a UFgSpGOYYb3N7jPjrzAcA/zcYWyZ/TCsBUS0Z6vLCeO7QCK59yaawJebxfsT5YQPNBXl CcQRxMlQBwxxg/znLTo5KjyfTSbNSDnvY1e+8LZCzr6gUQO2jyar/8G7VAERLIFR0zr8 FJrw== X-Gm-Message-State: AOAM5323IEhPOA5l4otvR4BPxwNsqzHe2E+Q3YhqHrNsdCD3DUzeoycR UVMPckaJT1M6hkxio3V6SZOHt4IK+kAHxHZrsb4= X-Google-Smtp-Source: ABdhPJxnCYwjlxRAX8hcTiaEGn41+6lo/6gLS/E27tSxKb16rZWsjnPqxeyoYwRuhudxG2YY1zKIOHG2cyiFebJZ8DY= X-Received: by 2002:a63:2155:: with SMTP id s21mr1337967pgm.20.1637634619591; Mon, 22 Nov 2021 18:30:19 -0800 (PST) MIME-Version: 1.0 References: <20211113163353.5374-1-hjl.tools@gmail.com> <20211113163353.5374-2-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Mon, 22 Nov 2021 18:29:44 -0800 Message-ID: Subject: Re: [PATCH 1/2] Sync with binutils: GCC: Pass --plugin to AR and RANLIB To: Jeff Law Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3022.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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-List-Received-Date: Tue, 23 Nov 2021 02:30:21 -0000 On Mon, Nov 22, 2021 at 4:29 PM Jeff Law wrote: > > > > On 11/13/2021 9:33 AM, H.J. Lu via Gcc-patches wrote: > > Sync with binutils for building binutils with LTO: > > > > From 50ad1254d5030d0804cbf89c758359ae202e8d55 Mon Sep 17 00:00:00 2001 > > From: "H.J. Lu" > > Date: Sat, 9 Jan 2021 06:43:11 -0800 > > Subject: [PATCH] GCC: Pass --plugin to AR and RANLIB > > > > Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO > > build. > > > > * Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@ > > (RANLIB): Add @RANLIB_PLUGIN_OPTION@. > > * configure.ac: Include config/gcc-plugin.m4. > > AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. > > * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and > > RANLIB if possible. > > * Makefile.in: Regenerated. > > * configure: Likewise. > > > > config/ > > > > * gcc-plugin.m4 (GCC_PLUGIN_OPTION): New. > > > > libiberty/ > > > > * Makefile.in (AR): Add @AR_PLUGIN_OPTION@ > > (RANLIB): Add @RANLIB_PLUGIN_OPTION@. > > (configure_deps): Depend on ../config/gcc-plugin.m4. > > * configure.ac: AC_SUBST AR_PLUGIN_OPTION and > > RANLIB_PLUGIN_OPTION. > > * aclocal.m4: Regenerated. > > * configure: Likewise. > > > > zlib/ > > > > * configure: Regenerated. > I thought the plugins were automatically loaded if they're in the right > place in the filesystem. Wouldn't that make this patch unnecessary? Am > I missing something? > It only works for system GCC and binutils. It doesn't work for non-system GCC nor binutils since either GCC plugin isn't installed in the binutils plugin search patch. -- H.J.