From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wD+8IDBC3l8lGwAAWB0awg (envelope-from ) for ; Sat, 19 Dec 2020 13:10:56 -0500 Received: by simark.ca (Postfix, from userid 112) id 842B21F0AA; Sat, 19 Dec 2020 13:10:56 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8A3151E965 for ; Sat, 19 Dec 2020 13:10:52 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 32B033885C21; Sat, 19 Dec 2020 18:10:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32B033885C21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1608401448; bh=3WTTGLFGns5HZaBbTrIhFKclyMU89HZXdPIMqT0MrPo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=AcZ6ehfwyflRJe+qlGQDWeG5XDBT+w+7SxatFKNKIaawaOC5Uqzn7FrCUM7Twg9nJ qvWjC7aAFRraDEtZLWRY7SnWmYqMgXI2JYAjEGg174grfmi6UuuUEX/3G88MN8GXti O5xyrDQlxiQLPEvDd5Id1gH+Imv+dyH1qXeZJsjY= Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 142AC3857C69; Sat, 19 Dec 2020 18:10:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 142AC3857C69 Received: by mail-pl1-x62c.google.com with SMTP id j1so3191968pld.3; Sat, 19 Dec 2020 10:10:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3WTTGLFGns5HZaBbTrIhFKclyMU89HZXdPIMqT0MrPo=; b=HRgMPzFqqSp+YS5VVo8i9Vp+6SHU0DwIYMrbKYz7RO2AlEvm1UJVyAtIbcfb9ZAnzh 5qP8v1ZP4kIqsHka3ze5JbPtPYM/jbx/bNvXlCpnqJAzzdcyV107SEO3AaG+g1psMFt7 EzchdkMFpkIspDED5dqML0t3SxrPDm89GJWnWTv1T6Y2IhwpUY3zrG/40KxFEShzuSVl DUbZV+RzMj2DpC/igDWz0D4euZtCZxh8nhSyn/Y5tdXrl3a5XI4Dciq0PcWiGsms7vJc 1RJyiOp0HeBtAhNV/Cofrex5n/mi5uAfLkxDoGiKKnP99/0Yblllkeb59eA4tZN65HHA qwAA== X-Gm-Message-State: AOAM533gzzZwRTjG2Pa24P9zAc7lgKN09nG5omMP44uxckARQKSawi/5 t5JTlLpd94GVdKTua6i2gg66zngRQ5A= X-Google-Smtp-Source: ABdhPJz8oYLlVamwbahaU04khhXGfA4m1K7s2CnOeOcjOvNYahTCXnC0HgLQeaYE7FRh6fnbc/iLzA== X-Received: by 2002:a17:90a:31cb:: with SMTP id j11mr10157956pjf.6.1608401440223; Sat, 19 Dec 2020 10:10:40 -0800 (PST) Received: from gnu-cfl-2.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id b2sm11729604pfo.164.2020.12.19.10.10.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Dec 2020 10:10:38 -0800 (PST) Received: from gnu-cfl-2.localdomain (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id EAEA91A0146; Sat, 19 Dec 2020 10:10:37 -0800 (PST) To: binutils@sourceware.org Subject: V3 [PATCH 0/5] Support the PGO build for binutils+gdb Date: Sat, 19 Dec 2020 10:10:31 -0800 Message-Id: <20201219181036.178248-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "H.J. Lu via Gdb-patches" Reply-To: "H.J. Lu" Cc: Matthias Klose , gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Add the --enable-pgo-build[=lto] configure option. When binutils+gdb is not built together with GCC, --enable-pgo-build enables the PGO build: 1. First build with -fprofile-generate. 2. Use "make maybe-check-*" to generate profiling data and pass -i to make to ignore errors when generating profiling data. 3. Use "make clean" to remove the previous build. 4. Rebuild with -fprofile-use. Tested PGO/LTO builds for GDB and binutils with GCC 11 on Fedora 33. Changes from V2: 1. Pass PGO_BUILD_TRAINING=yes for PGO build training. 2. Set TESTS to gdb.dwarf2/*.exp for GDB PGO build training. 3. gnulib: Support variables from the top level Makefile. Changes from V1: 1. Pass -ffat-lto-objects together with -flto=jobserver. 2. Pass -i to make to ignore "make check" errors in PGO training runs. H.J. Lu (5): GCC: Pass --plugin to AR and RANLIB Binutils: Pass --plugin to AR and RANLIB Support the PGO build for binutils+gdb Set TESTS to gdb.dwarf2/*.exp for PGO build training gnulib: Support variables from the top level Makefile Makefile.in | 68 ++++++++++++- Makefile.tpl | 63 +++++++++++- bfd/configure | 27 ++++- binutils/configure | 27 ++++- config/gcc-plugin.m4 | 28 ++++++ configure | 139 ++++++++++++++++++++++++- configure.ac | 80 +++++++++++++++ gas/configure | 27 ++++- gdb/testsuite/Makefile.in | 5 + gnulib/Makefile.am | 39 ++++++++ gnulib/Makefile.in | 40 ++++++++ gprof/configure | 27 ++++- ld/configure | 27 ++++- libctf/configure | 27 ++++- libiberty/Makefile.in | 5 +- libiberty/aclocal.m4 | 1 + libiberty/configure | 37 +++++++ libiberty/configure.ac | 12 +++ libtool.m4 | 25 ++++- opcodes/configure | 27 ++++- zlib/configure | 206 +++++++++++++++++++++++++++++++++++++- 21 files changed, 907 insertions(+), 30 deletions(-) -- 2.29.2