From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) From: "H.J. Lu" To: binutils@sourceware.org Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, Matthias Klose , Martin Liska 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-Spam-Status: No, score=-3034.0 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Sat, 19 Dec 2020 18:10:45 -0000 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