From patchwork Mon Jul 25 15:22:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1660419 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ls3h00f95z9sB4 for ; Tue, 26 Jul 2022 01:22:40 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8A4B340CE8; Mon, 25 Jul 2022 15:22:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 8A4B340CE8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uYk-rBV7laos; Mon, 25 Jul 2022 15:22:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 8E7A940CD4; Mon, 25 Jul 2022 15:22:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 8E7A940CD4 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6ECBD1BF2BD for ; Mon, 25 Jul 2022 15:22:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 54DCE419F8 for ; Mon, 25 Jul 2022 15:22:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 54DCE419F8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0zDjA4tVAbNU for ; Mon, 25 Jul 2022 15:22:33 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 05B8D419F5 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by smtp4.osuosl.org (Postfix) with ESMTPS id 05B8D419F5 for ; Mon, 25 Jul 2022 15:22:32 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id v13so8685064wru.12 for ; Mon, 25 Jul 2022 08:22:32 -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:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=olTrHzByW8sdEk4ZEprbxFJfBB4s7k6/Kp9ESDHn4L4=; b=8QMNYLxLVxc/mpMokP0OLv4cLAsAMBrHZojUaBoFd5q65Y0orhqeiYIx22r4ZqbHr5 vTJ9O1U+yeWQqaa8A88086oaSk8zGcaTdgxsD413jSTHlks2y8XS9YnwADFuB5RUHVNv CIHGKZ2IqScf8w5Mqd83bhcuE4qXBbyD6PhCSdD47PY3GPXiV7kyc8wY8CtrflO7X3T4 DnWjPzvRlC5wAXquCltbgGJoHEPriXgCYBFsFQu56rMOPt/ziOQT1d9e/zLCFzd7/g2A pw8T5/qs1F3CK0Y7TlZhy0ax8JN4JfNBIVHYWh3SGegM9BrN5VfcyI/a47+Xc4/War3C 9bIQ== X-Gm-Message-State: AJIora9+7y+0h0GHT5sTLoZfJH1ptTC96Cvk6ZwR2Oh1/ZT8VFBSM176 HN+liWz4pYJVsNDmAHBAACbZhDnQgN1kiQ== X-Google-Smtp-Source: AGRyM1u3YUTasvGxwMRcMEPL8EgOvxiiaMkOIUhaQB9wNPloS0UCR57Q7qq/aRn62quY1pzPX04SLg== X-Received: by 2002:a05:6000:114f:b0:21e:8c61:248e with SMTP id d15-20020a056000114f00b0021e8c61248emr2958198wrx.541.1658762551058; Mon, 25 Jul 2022 08:22:31 -0700 (PDT) Received: from arnoutx1.home ([2a01:cb19:8acf:5600:3b0f:2669:24db:51d0]) by smtp.gmail.com with ESMTPSA id o8-20020a05600c378800b003a2e7c13a3asm14244983wmr.42.2022.07.25.08.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 08:22:30 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Mon, 25 Jul 2022 17:22:25 +0200 Message-Id: <20220725152229.3370033-1-arnout@mind.be> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=olTrHzByW8sdEk4ZEprbxFJfBB4s7k6/Kp9ESDHn4L4=; b=GpPYkUXSHIu0nCPzhMjp1UVeeK1fBkBzgbqgQa2GtlCDJndLjqAMjcO8M+2aZ5oEUs JoO9EM5GXIOMM+47AmSAi6Wm62+2kJ2Y5yM+iImL88ZLG/z34xmMLUmw3rEs2c2G/xoN mURDfGx8yvpDKGBSCnBq06hNsnOw11vAgOzQ1q34rTelaw7AplhiIEHfZn5dQXgryTJp 3VZftnGwlkKdUgRhUpgQu6OP1JEAegXsgON7xWFTibwfLvMpf0EwrOS28SBfRZ8g1Mu6 iF7gEVHkwaamR2u5qOvNk1DZv6faK7qQ5zmHbz9D9ww6YTV7E9HpotJ8KvpcWggv6HfV pgIA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=GpPYkUXS Subject: [Buildroot] [PATCH 1/5] Config.in: add new option BR2_ENABLE_LTO to globally enable LTO X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Peter_K=C3=BCmmel?= , Douglas RAILLARD , Dario Binacchi Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Some packages have a configure option to enable LTO. Add a global option to enable/disable this in packages. Note that we could instead (or in addition) pass -flto directly to the compiler in the toolchain wrapper, but that has a *much* bigger impact, so for the time being let's not do that. No toolchain dependency is added for this, because all toolchains now support LTO. - LTO support was merged in GCC years before 4.6 (our minimal version) was released. - Our oldest external toolchain, Sourcery ARM 2014.05, has LTO support. - For our internal toolchains, it is supposedly regulated by BR2_GCC_ENABLE_LTO. However, that option only *enables* it - it doesn't disable LTO support when it's not provided. Since LTO support defaults to enabled for a long time already in GCC, in practice all Buildroot-generated toolchains do support LTO. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- Config.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Config.in b/Config.in index af9052d32b..8fc431a5da 100644 --- a/Config.in +++ b/Config.in @@ -551,6 +551,25 @@ config BR2_OPTIMIZE_FAST endchoice +config BR2_ENABLE_LTO + bool "build packages with link-time optimisation" + help + Enable the link-time optimisation (LTO) option when building + packages. Link-time optimisation re-runs optimisations at link + time, which allows the compiler to do interprocedural analysis + across compilation units and thus come with better results: + smaller size and better performance. + + Note that this analysis is limited to statically linked object + files and libraries. + + This option may significantly increase build times, sometimes + 5 times longer, with only limited gains. + + At this time, this option only enables LTO in packages that + have an explicit configuration option for it. Other packages + always enable LTO, but most packages never enable LTO. + config BR2_GOOGLE_BREAKPAD_ENABLE bool "Enable google-breakpad support" depends on BR2_INSTALL_LIBSTDCPP From patchwork Mon Jul 25 15:22:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1660420 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ls3hG0kL3z9sB4 for ; Tue, 26 Jul 2022 01:22:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3752340D93; Mon, 25 Jul 2022 15:22:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3752340D93 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PLfTURQkWDOm; Mon, 25 Jul 2022 15:22:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id BD547416FD; Mon, 25 Jul 2022 15:22:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org BD547416FD X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2290A1BF2BD for ; Mon, 25 Jul 2022 15:22:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 0B47A84C34 for ; Mon, 25 Jul 2022 15:22:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 0B47A84C34 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LmZjt7tNWz7G for ; Mon, 25 Jul 2022 15:22:34 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B28F7847FF Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by smtp1.osuosl.org (Postfix) with ESMTPS id B28F7847FF for ; Mon, 25 Jul 2022 15:22:33 +0000 (UTC) Received: by mail-wr1-x42b.google.com with SMTP id z13so16458299wro.13 for ; Mon, 25 Jul 2022 08:22:33 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1QEs00wYSz/Hm47+fHafMoHyrOL6CBoswST3nT2JVuM=; b=WpJtoGHbQVLJg/97psKZeIvvidNxtD7yGcNazxyJarcWwH2ivbE0CuLDtJc04J5G8S gsOR0tll59Nx/zWHkGI6jdyXmRnftCHxROz6b80+KN1vkxeATDJuWwCWvmFt8NvJrcIg +a5LQ84yL2O+/qgSb7dwbL3Z5me5o554gvyjmQ5WVO0S+Qsc47auq6r2t8XcgvXZN0Fm FwbDa6A3hXXpeLqx1HdyqRAh9v9K9mN0QHLFjpwMrSH9l0982a+cbZPjrNfogLD0jt2B LjX1dd5BQ3I8W3Cq5RITCRTeKKoZrLY9h3EUHKJAm/4l78mnYQ8mTTRSbxEW4BHO7rE7 3vGw== X-Gm-Message-State: AJIora88puFh7I1/goQ4TRLJbdr1uccTO8/rtBRtdOTZ89/PuGOjZByX UmaExMhhDv5g5JbeMiaYSXphHkiTGkzWvw== X-Google-Smtp-Source: AGRyM1sXd8AigYcVx9/8+qw2WwgaJk0czfSeNiM291I7A3+3PiSMaX2N1vDLNAVseV+pij+i3uj72Q== X-Received: by 2002:a5d:69ca:0:b0:21d:640c:79f6 with SMTP id s10-20020a5d69ca000000b0021d640c79f6mr7781763wrw.309.1658762551757; Mon, 25 Jul 2022 08:22:31 -0700 (PDT) Received: from arnoutx1.home ([2a01:cb19:8acf:5600:3b0f:2669:24db:51d0]) by smtp.gmail.com with ESMTPSA id o8-20020a05600c378800b003a2e7c13a3asm14244983wmr.42.2022.07.25.08.22.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 08:22:31 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Mon, 25 Jul 2022 17:22:26 +0200 Message-Id: <20220725152229.3370033-2-arnout@mind.be> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220725152229.3370033-1-arnout@mind.be> References: <20220725152229.3370033-1-arnout@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1QEs00wYSz/Hm47+fHafMoHyrOL6CBoswST3nT2JVuM=; b=fkCGI9ShxfcSpZtAZMk2rP0PgrFyjcWW2vncMpjsZFw+93WAFDu5/d+X/S2Lx/DcFI yYkcYwQYP8ot1zyA+jV4SGmEmfYbGgTZxJQL6QzRgtBLyoFD/CyrURb299n8hsTclWdA 5bTwSZgTimB7g58GfAQmj0qr5H/fSq1/JI3g620kqhaK7B7AN9wlgzWOrlL3UIm/kVMr nQvhZ86I3v7D5WkgFWpF6XLfkFDG8Otzy70MrPo1Dh9dqeytqkj617hClDgRSThaHuAP Chi8LOwvm4IgdVkVkPJNhyeNbHigzxZwR44yMp3gvvrE/6pdkG83qCLBLd4EDcNZYdFb 4mxA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=fkCGI9Sh Subject: [Buildroot] [PATCH 2/5] package/*: use BR2_ENABLE_LTO to enable LTO instead of BR2_GCC_ENABLE_LTO X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Peter_K=C3=BCmmel?= , Douglas RAILLARD , Dario Binacchi Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The BR2_GCC_ENABLE_LTO controls whether or not LTO is available in the (internal) toolchain - it shouldn't be used to control whether packages are built with LTO. Use the new BR2_ENABLE_LTO option instead. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/fastd/fastd.mk | 2 +- package/log4cplus/log4cplus.mk | 2 +- package/netdata/netdata.mk | 2 +- package/rocksdb/rocksdb.mk | 2 +- package/unbound/unbound.mk | 2 +- package/valgrind/valgrind.mk | 2 +- package/wireshark/wireshark.mk | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package/fastd/fastd.mk b/package/fastd/fastd.mk index 5cd6a909c3..6c496cf9ef 100644 --- a/package/fastd/fastd.mk +++ b/package/fastd/fastd.mk @@ -46,7 +46,7 @@ else FASTD_CONF_OPTS += -Dsystemd=disabled endif -ifeq ($(BR2_GCC_ENABLE_LTO),y) +ifeq ($(BR2_ENABLE_LTO),y) FASTD_CONF_OPTS += -Db_lto=true else FASTD_CONF_OPTS += -Db_lto=false diff --git a/package/log4cplus/log4cplus.mk b/package/log4cplus/log4cplus.mk index b2e9ac3ed1..2dab661654 100644 --- a/package/log4cplus/log4cplus.mk +++ b/package/log4cplus/log4cplus.mk @@ -11,7 +11,7 @@ LOG4CPLUS_LICENSE = Apache-2.0, BSD-2-Clause, BSD-like (threadpool) LOG4CPLUS_LICENSE_FILES = LICENSE LOG4CPLUS_INSTALL_STAGING = YES -ifeq ($(BR2_GCC_ENABLE_LTO),y) +ifeq ($(BR2_ENABLE_LTO),y) LOG4CPLUS_CONF_OPTS += --enable-lto else LOG4CPLUS_CONF_OPTS += --disable-lto diff --git a/package/netdata/netdata.mk b/package/netdata/netdata.mk index 04b146591f..9e661f4943 100644 --- a/package/netdata/netdata.mk +++ b/package/netdata/netdata.mk @@ -23,7 +23,7 @@ NETDATA_DEPENDENCIES = libuv util-linux zlib # provided by autoconf relies on wchar_t. NETDATA_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99 -ifeq ($(BR2_GCC_ENABLE_LTO),y) +ifeq ($(BR2_ENABLE_LTO),y) NETDATA_CONF_OPTS += --enable-lto else NETDATA_CONF_OPTS += --disable-lto diff --git a/package/rocksdb/rocksdb.mk b/package/rocksdb/rocksdb.mk index c355d0012d..bed0634134 100644 --- a/package/rocksdb/rocksdb.mk +++ b/package/rocksdb/rocksdb.mk @@ -69,7 +69,7 @@ else ROCKSDB_MAKE_OPTS += ROCKSDB_DISABLE_ZSTD=1 endif -ifeq ($(BR2_GCC_ENABLE_LTO),y) +ifeq ($(BR2_ENABLE_LTO),y) ROCKSDB_MAKE_OPTS += USE_LTO=1 else ROCKSDB_MAKE_OPTS += USE_LTO=0 diff --git a/package/unbound/unbound.mk b/package/unbound/unbound.mk index 988508576b..8863d039bb 100644 --- a/package/unbound/unbound.mk +++ b/package/unbound/unbound.mk @@ -35,7 +35,7 @@ else UNBOUND_CONF_OPTS += --without-pthreads endif -ifeq ($(BR2_GCC_ENABLE_LTO),y) +ifeq ($(BR2_ENABLE_LTO),y) UNBOUND_CONF_OPTS += --enable-flto else UNBOUND_CONF_OPTS += --disable-flto diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk index b4c4b8b5a2..17b131c3ec 100644 --- a/package/valgrind/valgrind.mk +++ b/package/valgrind/valgrind.mk @@ -52,7 +52,7 @@ VALGRIND_CONF_OPTS += \ --host=$(patsubst arm-%,armv7-%,$(GNU_TARGET_NAME)) endif -ifeq ($(BR2_GCC_ENABLE_LTO),y) +ifeq ($(BR2_ENABLE_LTO),y) VALGRIND_CONF_OPTS += --enable-lto else VALGRIND_CONF_OPTS += --disable-lto diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk index 1a549f7037..e5d5e6f677 100644 --- a/package/wireshark/wireshark.mk +++ b/package/wireshark/wireshark.mk @@ -31,7 +31,7 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) WIRESHARK_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic endif -ifeq ($(BR2_GCC_ENABLE_LTO),y) +ifeq ($(BR2_ENABLE_LTO),y) WIRESHARK_CONF_OPTS += -DENABLE_LTO=ON else WIRESHARK_CONF_OPTS += -DENABLE_LTO=OFF From patchwork Mon Jul 25 15:22:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1660421 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ls3hV3Yjdz9sB4 for ; Tue, 26 Jul 2022 01:23:06 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 4B79A84C69; Mon, 25 Jul 2022 15:23:04 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4B79A84C69 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YboDUk7nxa0x; Mon, 25 Jul 2022 15:23:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 46E6984C55; Mon, 25 Jul 2022 15:23:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 46E6984C55 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 9D67F1BF2BD for ; Mon, 25 Jul 2022 15:22:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 765CD419F8 for ; Mon, 25 Jul 2022 15:22:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 765CD419F8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uP1nbcrgBtWO for ; Mon, 25 Jul 2022 15:22:34 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6DFE341A08 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6DFE341A08 for ; Mon, 25 Jul 2022 15:22:34 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id v13so8685176wru.12 for ; Mon, 25 Jul 2022 08:22:34 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UdqS7Fedh6skijdKZcjoBSzMWU7td13N0uMFq5CK5Hs=; b=qUjb6mUwmGufXUWCJbYYO1QBZkY1+2dH59T5kkXC2aJJ+A+jWMkM/GcHHIpw8OrAI3 v/7uml37kim0HQCQXRuFXi+PkDZPN5SyI9rsCxgnmLFQiwJlSzY2Vxca/Q6tMhylplZS 1ckwk3X/5ScocULDYYyqt88AtjKYMa3GULGldBUJ1MsgudU2YG+SLzcX3VSij9fTAYc+ hrPziYEEyPJuzGliIulsiYo61Y6F0uMMalBdQfwUcQBy1sNbwfOM3eyONAglhqx67neY 19fnxhIQ2D4R9ItOF1i9VEcmJ9lQowswB6OgTpKhCDOm1JD+beLwtkGUEGwQsh4uot7Z RkFg== X-Gm-Message-State: AJIora+sPNT2K4fYLTYa7sB7RLHClQTAg1Fl2XnhdhOrSl62C9NK6x99 I9Z8UiokTo3iyEC5mPGHtUIpk7dEQUYruQ== X-Google-Smtp-Source: AGRyM1s9h0ZiNtrKzF1duC2/moKUjqq/dW2F0N1MaRwRJRPt/43ZGcj06uePotwy2MwtMWtFZvs1LQ== X-Received: by 2002:a5d:67ca:0:b0:21e:5ba8:a067 with SMTP id n10-20020a5d67ca000000b0021e5ba8a067mr8259239wrw.650.1658762552403; Mon, 25 Jul 2022 08:22:32 -0700 (PDT) Received: from arnoutx1.home ([2a01:cb19:8acf:5600:3b0f:2669:24db:51d0]) by smtp.gmail.com with ESMTPSA id o8-20020a05600c378800b003a2e7c13a3asm14244983wmr.42.2022.07.25.08.22.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 08:22:32 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Mon, 25 Jul 2022 17:22:27 +0200 Message-Id: <20220725152229.3370033-3-arnout@mind.be> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220725152229.3370033-1-arnout@mind.be> References: <20220725152229.3370033-1-arnout@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UdqS7Fedh6skijdKZcjoBSzMWU7td13N0uMFq5CK5Hs=; b=e4G7SowaDncA7hSKTX2CVEkij+ZItESefNSKALpyNnAHT8wJL2Fo3ynpHLHnAbir3K cGSipPwRjZt/X7/APqkoxUMgNZmUUEZZcprVAR4sGCuulJmdnmhrEn62sKQStKxdCqyq 534dkBHPjb0jA9n+9ID0YhtNzD2t9c1dlioeREChNyW61MHVV3puIrBCQyOPzIV7+X5+ z0WKAMhWQhVdk+qTpV3V5/L+igKIV4cXsBYcKkPtAwvWEtYCFZncN7lGGFIW0v6IPl4m so0Zbrd7U0K/FpNN1yb7EYiLzpXLRqmFtDw+gt+GTuJgUGua5E3DPKAf4fcicNkAR9iO ZA3A== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=e4G7Sowa Subject: [Buildroot] [PATCH 3/5] configs/*: use BR2_ENABLE_LTO to enable LTO instead of BR2_GCC_ENABLE_LTO X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Peter_K=C3=BCmmel?= , Douglas RAILLARD , Dario Binacchi Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" BR2_GCC_ENABLE_LTO only enables LTO in the toolchain, not in packages. Use BR2_ENABLE_LTO instead to enable it in packages as well. Note that BR2_GCC_ENABLE_LTO is currently non-functional (LTO is still enabled in the toolchain even if it's not set), so we *do* have LTO available in the toolchain. Note that the option has no effect at all on these defconfigs anyway, since they don't contain any package that is affected by the BR2_ENABLE_LTO option. Still, it makes sense to enable it for these really memory-constrained targets for when packages are added. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- configs/stm32f429_disco_xip_defconfig | 2 +- configs/stm32f469_disco_xip_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/stm32f429_disco_xip_defconfig b/configs/stm32f429_disco_xip_defconfig index 01b54c02cc..f9b3270ecd 100644 --- a/configs/stm32f429_disco_xip_defconfig +++ b/configs/stm32f429_disco_xip_defconfig @@ -2,7 +2,7 @@ BR2_arm=y BR2_cortex_m4=y BR2_KERNEL_HEADERS_5_15=y # BR2_UCLIBC_INSTALL_UTILS is not set -BR2_GCC_ENABLE_LTO=y +BR2_ENABLE_LTO=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y diff --git a/configs/stm32f469_disco_xip_defconfig b/configs/stm32f469_disco_xip_defconfig index d95b7759f3..fc3b3f9213 100644 --- a/configs/stm32f469_disco_xip_defconfig +++ b/configs/stm32f469_disco_xip_defconfig @@ -2,7 +2,7 @@ BR2_arm=y BR2_cortex_m4=y BR2_KERNEL_HEADERS_5_15=y # BR2_UCLIBC_INSTALL_UTILS is not set -BR2_GCC_ENABLE_LTO=y +BR2_ENABLE_LTO=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y From patchwork Mon Jul 25 15:22:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1660423 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ls3hl3Y71z9sB4 for ; Tue, 26 Jul 2022 01:23:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8DD7B416ED; Mon, 25 Jul 2022 15:23:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 8DD7B416ED X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eqIA02cgFECV; Mon, 25 Jul 2022 15:23:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 76D1340C4D; Mon, 25 Jul 2022 15:23:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 76D1340C4D X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 1CD581BF2BD for ; Mon, 25 Jul 2022 15:22:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E99ED41A08 for ; Mon, 25 Jul 2022 15:22:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E99ED41A08 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8CY-JR2KUHQk for ; Mon, 25 Jul 2022 15:22:35 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org DC9D4419F5 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by smtp4.osuosl.org (Postfix) with ESMTPS id DC9D4419F5 for ; Mon, 25 Jul 2022 15:22:34 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id bn9so5585062wrb.9 for ; Mon, 25 Jul 2022 08:22:34 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GRwXaWWGm6jwhb2/twP8BiulE/qAO9PCdLj3wL1b6zo=; b=dW/cdEUr1iE3OYFAFROdJUbFPIP20oIoC57WgiFeXPUYSc+3l8mGxCV2LpXku4KDz1 039rV8nDXNrplG1ijp+kbUsoW9hXgqc6aT8/bvGoRMLnklqdYcEw+VsTceIsKYYruzUO B9ktD43nx9ZyN00NRTKsqRoz68apJa7l4mOgc4+PPFJ9PJ7k7EmXSkXcYpFPDyiITp4A 7qXqwOXjZmy0cDkRXWffJmkHFZj4n5zEDReSczABmUrfh0t5pSbhcWwGuQs2IZnMQssd rDa2ANcRn3ppEhrcCb/uLx/oguQO94lTCCNxt8nrfJHi/Nf56Q+2y/wcOaxsPtXHs+Jh FgFA== X-Gm-Message-State: AJIora9TVSfeswwm0RUiYgTlzzmm8eTN4DTht2sot4ltUkFrtnDPgoIT mh0A2Fu+YfzQRv8gpaX75t2PHGrQjDAsWw== X-Google-Smtp-Source: AGRyM1tL/eNOHtwAxcD2rI+S1bOTXE9l+69ihcUu3tIdZbovlKlFf1G3bY6xiLJk547n8PF4Xql87Q== X-Received: by 2002:a5d:5581:0:b0:20f:fc51:7754 with SMTP id i1-20020a5d5581000000b0020ffc517754mr8366723wrv.413.1658762553140; Mon, 25 Jul 2022 08:22:33 -0700 (PDT) Received: from arnoutx1.home ([2a01:cb19:8acf:5600:3b0f:2669:24db:51d0]) by smtp.gmail.com with ESMTPSA id o8-20020a05600c378800b003a2e7c13a3asm14244983wmr.42.2022.07.25.08.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 08:22:32 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Mon, 25 Jul 2022 17:22:28 +0200 Message-Id: <20220725152229.3370033-4-arnout@mind.be> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220725152229.3370033-1-arnout@mind.be> References: <20220725152229.3370033-1-arnout@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GRwXaWWGm6jwhb2/twP8BiulE/qAO9PCdLj3wL1b6zo=; b=INtGKXOdY69r9CCwv+DHNQNJLgAlh5pdb3du3oiXSJlu2iwpHjkmBKMlDiKu+hV7MQ 9/UjhJZowAakWzWZUuLCvly20d/el6dJiFQtMsc68sXV9J6lz8K1m6nuCwcBC50zPiGC 5eGM7012cEstizE4BTz+NdKRSOeOjnLvyrjYPVVVyA2Xw1zm/174wsNuUjTK+ONF4z2L gTjUHqiUd9piT1pIUvUY21jVTURD+DCr5JCNq2fqvKr68MTZe2bKShyUsrX1R0FGQEQZ guWeug6RDCZaDedJyfBIAHg4Wx3nlXP4cLYW8PUSCVtq6Rg5+UtgsEfNyvJK8F0N+gQd cUcA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=INtGKXOd Subject: [Buildroot] [PATCH 4/5] package/binutils: remove BR2_BINUTILS_ENABLE_LTO X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Peter_K=C3=BCmmel?= , Douglas RAILLARD , Dario Binacchi Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Currently, this option doesn't do anything. It only adds --enable-plugins --enable-lto to the configure flags, but doesn't disable them if it is not set. Since both of these default to enabled, plugins and lto are effectively always enabled. There really is no need to make this configurable: it adds a bit of size and build time to host-binutils, but we don't care about that for host tools. It's still up to individual builds to enable the LTO options. Therefore, remove the option entirely. For clarity, explicitly pass --enable-plugins --enable-lto to configure. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/binutils/Config.in.host | 3 --- package/binutils/binutils.mk | 6 ++---- package/gcc/Config.in.host | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host index ef1b2a94db..5bdda25faf 100644 --- a/package/binutils/Config.in.host +++ b/package/binutils/Config.in.host @@ -35,9 +35,6 @@ config BR2_BINUTILS_VERSION default "2.37" if BR2_BINUTILS_VERSION_2_37_X default "2.38" if BR2_BINUTILS_VERSION_2_38_X -config BR2_BINUTILS_ENABLE_LTO - bool - config BR2_BINUTILS_EXTRA_CONFIG_OPTIONS string "Additional binutils options" default "" diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk index c94ebe0995..6362cb1641 100644 --- a/package/binutils/binutils.mk +++ b/package/binutils/binutils.mk @@ -86,6 +86,8 @@ HOST_BINUTILS_CONF_OPTS = \ --with-sysroot=$(STAGING_DIR) \ --enable-poison-system-directories \ --without-debuginfod \ + --enable-plugins \ + --enable-lto \ $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) @@ -120,10 +122,6 @@ HOST_BINUTILS_POST_EXTRACT_HOOKS += BINUTILS_XTENSA_OVERLAY_EXTRACT HOST_BINUTILS_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL) endif -ifeq ($(BR2_BINUTILS_ENABLE_LTO),y) -HOST_BINUTILS_CONF_OPTS += --enable-plugins --enable-lto -endif - # Hardlinks between binaries in different directories cause a problem # with rpath fixup, so we de-hardlink those binaries, and replace them # with copies instead. diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index a7e237c3f7..20187db6fd 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -132,7 +132,6 @@ config BR2_TOOLCHAIN_BUILDROOT_DLANG config BR2_GCC_ENABLE_LTO bool "Enable compiler link-time-optimization support" - select BR2_BINUTILS_ENABLE_LTO help This option enables link-time optimization (LTO) support in gcc. From patchwork Mon Jul 25 15:22:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1660424 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ls3j070hGz9sB4 for ; Tue, 26 Jul 2022 01:23:32 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id EE81A41703; Mon, 25 Jul 2022 15:23:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org EE81A41703 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ivcgiDpeeW4l; Mon, 25 Jul 2022 15:23:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id D4AD140C4D; Mon, 25 Jul 2022 15:23:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D4AD140C4D X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id D0B401BF2BD for ; Mon, 25 Jul 2022 15:22:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B4C66419F5 for ; Mon, 25 Jul 2022 15:22:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B4C66419F5 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9_v5AP4A59Pz for ; Mon, 25 Jul 2022 15:22:35 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A685F419F8 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by smtp4.osuosl.org (Postfix) with ESMTPS id A685F419F8 for ; Mon, 25 Jul 2022 15:22:35 +0000 (UTC) Received: by mail-wr1-x42b.google.com with SMTP id bn9so5585119wrb.9 for ; Mon, 25 Jul 2022 08:22:35 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SwSR0bcybN6pvgBxmrRz0ubl152zLyjwrhhZK9wG5B0=; b=rXoRVfsGgr1Hk3pa4535Cci9jPTLPXiwWQDwwsrfXYwKhgx7S2lwwAGFf7z6WkBvEH qGA3mWqrfWFSVT4OsvmdLv1SqR9c7ie1s7chWJju8EKnd31EIe/1JEXJz/ypMw9xHM6v Ze9ak9JC/pKYlORyuYmit3I6VCltnSxfN6a3cN5vVAoIIIyNZgbbxwPcP+V+KcgY9OC7 lZz/asPLLeSn3bGiB6kkoPkQYGWctgsW2sPlO/qdydBEu8LmyDdkaBXQOFN6ycw8FtzD 41MxcEP/ZRab6kvwqTRMY0QlK3aIZ85y8GoF+1S49LrFoBKvSSTxJeI4ZNcNLx5Oqds7 kQlA== X-Gm-Message-State: AJIora8wNuyWFS87zl3QnRxK+BGOOyt9xMIeGntmgP6PqBrrPHR1LGtY vHuUCzroV4wwUluzE5NRhUBRWhOORXSw4g== X-Google-Smtp-Source: AGRyM1vZfOuF2pLTmwD+JHvz+OTgVDDPgauypA8SdTLrS65CWALkxa3E5PCv0DoAcu61MBrBRePBJg== X-Received: by 2002:adf:f746:0:b0:21e:55e7:b8c3 with SMTP id z6-20020adff746000000b0021e55e7b8c3mr7905077wrp.251.1658762553812; Mon, 25 Jul 2022 08:22:33 -0700 (PDT) Received: from arnoutx1.home ([2a01:cb19:8acf:5600:3b0f:2669:24db:51d0]) by smtp.gmail.com with ESMTPSA id o8-20020a05600c378800b003a2e7c13a3asm14244983wmr.42.2022.07.25.08.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 08:22:33 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Mon, 25 Jul 2022 17:22:29 +0200 Message-Id: <20220725152229.3370033-5-arnout@mind.be> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220725152229.3370033-1-arnout@mind.be> References: <20220725152229.3370033-1-arnout@mind.be> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SwSR0bcybN6pvgBxmrRz0ubl152zLyjwrhhZK9wG5B0=; b=ZyppaR8ruc85ZoACnzYTWHpukup4GavZKt1b5lZMm75zTorTbeACysPNrbcDymOrna fwrIIz8vbT7OW1QRiTyH/0zFu9ouZvnxXfuR7PsTW/xxk9byQfLXeMtBYOKOC8NleM91 JPtT1RIftl2s4Db9isncKV0H6qEOyy1qAm24wUNeWT5H/OKiy58IngUkMjJODFAxYKqf O7FZ5mfrHDgT3yencXP0EruukofGE2VX4CFWsMEaqA8tGOg6L5grLTbbeeqMFlDeUNjF OEH5hhI7Ek1nQnRyxxbRWmN0U1YWsJNi042pm+iIHaqb4bgpRj3xxevtZbLHxvWl3bgH VgQg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=ZyppaR8r Subject: [Buildroot] [PATCH 5/5] package/gcc: remove BR2_GCC_ENABLE_LTO X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Peter_K=C3=BCmmel?= , Douglas RAILLARD , Dario Binacchi Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Currently, this option doesn't do anything. It only adds --enable-plugins --enable-lto to the configure flags, but doesn't disable them if it is not set. Since both of these default to enabled, plugins and lto are effectively always enabled. There really is no need to make this configurable: it adds a bit of size and build time to host-gcc, but we don't care about that for host tools. It's still up to individual builds to enable the LTO options. Therefore, remove the option entirely. For clarity, explicitly pass --enable-plugins --enable-lto to configure. No legacy handling is added for the removed option. Since the behaviour hasn't actually changed (independently of whether the option was enabled or not), there's no point bothering the user with a legacy option. elf2flt was linking with libdl depending on this option. Since the option doesn't do anything, this is probably not needed. Still, to avoid breaking things, and because linking with libdl doesn't cost us anything anyway, always link with libdl. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/elf2flt/elf2flt.mk | 6 +----- package/gcc/Config.in.host | 6 ------ package/gcc/gcc.mk | 6 ++---- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/package/elf2flt/elf2flt.mk b/package/elf2flt/elf2flt.mk index 9230e3ce1a..6cd0786c3d 100644 --- a/package/elf2flt/elf2flt.mk +++ b/package/elf2flt/elf2flt.mk @@ -24,11 +24,7 @@ HOST_ELF2FLT_CONF_OPTS = \ --target=$(GNU_TARGET_NAME) \ --disable-werror -HOST_ELF2FLT_LIBS = -lz - -ifeq ($(BR2_GCC_ENABLE_LTO),y) -HOST_ELF2FLT_LIBS += -ldl -endif +HOST_ELF2FLT_LIBS = -lz -ldl HOST_ELF2FLT_CONF_ENV = LIBS="$(HOST_ELF2FLT_LIBS)" diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index 20187db6fd..9833ae1336 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -130,12 +130,6 @@ config BR2_TOOLCHAIN_BUILDROOT_DLANG D language and you want D libraries to be installed on your target system. -config BR2_GCC_ENABLE_LTO - bool "Enable compiler link-time-optimization support" - help - This option enables link-time optimization (LTO) support in - gcc. - config BR2_GCC_ENABLE_OPENMP bool "Enable compiler OpenMP support" depends on !BR2_PTHREADS_NONE && !BR2_arc && !BR2_microblaze diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index 114e774503..ec6f3b550a 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -75,6 +75,8 @@ HOST_GCC_COMMON_CONF_OPTS = \ --disable-libssp \ --disable-multilib \ --disable-decimal-float \ + --enable-plugins \ + --enable-lto \ --with-gmp=$(HOST_DIR) \ --with-mpc=$(HOST_DIR) \ --with-mpfr=$(HOST_DIR) \ @@ -165,10 +167,6 @@ else HOST_GCC_COMMON_CONF_OPTS += --enable-tls endif -ifeq ($(BR2_GCC_ENABLE_LTO),y) -HOST_GCC_COMMON_CONF_OPTS += --enable-plugins --enable-lto -endif - ifeq ($(BR2_PTHREADS_NONE),y) HOST_GCC_COMMON_CONF_OPTS += \ --disable-threads \