From patchwork Sat Oct 17 22:17:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1383793 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=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=oOFFopGl; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CDHTZ3wfwz9sSf for ; Sun, 18 Oct 2020 09:18:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1129587818; Sat, 17 Oct 2020 22:18:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Txxw0VhovrGO; Sat, 17 Oct 2020 22:18:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 47B3887813; Sat, 17 Oct 2020 22:18:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 733791BF59D for ; Sat, 17 Oct 2020 22:18:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6A2158740A for ; Sat, 17 Oct 2020 22:18:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OnpPbISBNLzF for ; Sat, 17 Oct 2020 22:18:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id 99F6E87406 for ; Sat, 17 Oct 2020 22:18:06 +0000 (UTC) Received: by mail-ej1-f65.google.com with SMTP id dt13so8592257ejb.12 for ; Sat, 17 Oct 2020 15:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gH5Pl09P9gwDNakh46VyDE6aCoM6WVNDxNG71Jr9BLI=; b=oOFFopGlp0702SJfltQ2ZIxZQTVb+ufsglIybsZmM0rIrEwr8VzkqDRxFJjK0xu1pC A2UIJSW6cFWuiQCxGAPj/gfjMpfmpeszJ4lB6bpQtKiGQGb93OVLby8jMYMWve3nBbNc E2Gjg/RIJTH6P4338z54pKLOEkEdPuuq5xSKVEyRsfGivRiTSTibWqb/gu+YALyu2pm4 dZmPzA1Dr8ZomxOQbIHIGeU3tsOm81VpQM96GJ7s8XA6qNFTWr6OasUzvMsHQ/+hCDHm 7mBnZJi+DKgtitw9xDZiXX1KU4DGA+DUctDLmD7ed05rqAwFDY1d9qA/yulNk2GuBgkP OL6w== 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=gH5Pl09P9gwDNakh46VyDE6aCoM6WVNDxNG71Jr9BLI=; b=ZnyjkSQ4q0RPpDWETVTainmcVvE2UrG2Lsfq/jTtdA0V2TBTZ8EdHBmLdlGuiUCqC0 HI5LR9MdFVBxcg6+g1nKzbfrP28LBweKbV8YAj3jMVaSC6YrvT7TZnB91gm9tygYt8F5 sdL1BGy4mtCufiD0csjuWFQHvW26pwspyyg4/ExkjwYYFTTcKlL/cFT21zBW2jnIuF6x UWmMu07jvAAM2vp99dwJNlQiMxratI9qvnjXkj8yUsxeDIi/2n6blVcQXA3IQtgr5+PF AFQBMw6Q9ZzPZ2UASNQqnq4E6xzUR9XF6Naqr9BfuTLvQcotW83R8aeveWuktm7OiNLr svyg== X-Gm-Message-State: AOAM530fuPcj0lqN9LlvY8/+QCfin5wVrFXW2VOybfsnACcBHByIsWTM L9u/pDtnR6beYNk7uTvJRRAFryPkTTVzbw== X-Google-Smtp-Source: ABdhPJzYvHcK99r6NcDHGhqf+AGLasz7IVXsOEuHrd5yS9VbY8DcHciOjKnC0ekq7ohlHJKbsMjkCA== X-Received: by 2002:a17:906:c1d4:: with SMTP id bw20mr10225491ejb.91.1602973084739; Sat, 17 Oct 2020 15:18:04 -0700 (PDT) Received: from localhost.localdomain (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id a13sm5950524edx.53.2020.10.17.15.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 15:18:04 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Sun, 18 Oct 2020 00:17:40 +0200 Message-Id: <20201017221743.160029-1-nolange79@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/4] package/Makefile.in: use gcc wrappers for binutils tools X-BeenThere: buildroot@busybox.net 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: Thomas Petazzoni , Romain Naour , Norbert Lange , yann.morin.1998@free.fr, Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This will use gcc-ar, gcc-nm and gcc-ranlib instead of the normal binutils tools. The difference is that with the wrappers, gcc plugins will be automatically picked up. gcc 4.7 introduced these wrappers, to detect the prefix and keep gcc specifics out of Makefile.in, a new variable BR2_TOOLCHAIN_BUTILS_PREFIX will be used to carry the prefix on supported versions. Note that binutils added some automatic loading with the 'bfd-plugins' directory (somewhere around 2.28), but the first implementation had issues, and generally depends on correctly setup symlinks (often broken, may point to some other gcc's library). The wrappers always work painless. The original motivation (now ~2 years in use) was to add "-flto -ffat-lto-objects" to both BR2_TARGET_OPTIMIZATION and BR2_TARGET_LDFLAGS, and have target binaries lto optimized. Not all packages will compile with this option, further work could white/blacklist packages (adding -fno-lto to the options). Signed-off-by: Norbert Lange --- v1->v2: * support older gcc versions missing those wrappers --- package/Makefile.in | 6 +++--- toolchain/Config.in | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package/Makefile.in b/package/Makefile.in index 51f5cbce4f..665edec539 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -198,15 +198,15 @@ TARGET_CROSS = $(HOST_DIR)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)- endif # Define TARGET_xx variables for all common binutils/gcc -TARGET_AR = $(TARGET_CROSS)ar +TARGET_AR = $(TARGET_CROSS)$(call qstrip,$(BR2_TOOLCHAIN_BUTILS_PREFIX))ar TARGET_AS = $(TARGET_CROSS)as TARGET_CC = $(TARGET_CROSS)gcc TARGET_CPP = $(TARGET_CROSS)cpp TARGET_CXX = $(TARGET_CROSS)g++ TARGET_FC = $(TARGET_CROSS)gfortran TARGET_LD = $(TARGET_CROSS)ld -TARGET_NM = $(TARGET_CROSS)nm -TARGET_RANLIB = $(TARGET_CROSS)ranlib +TARGET_NM = $(TARGET_CROSS)$(call qstrip,$(BR2_TOOLCHAIN_BUTILS_PREFIX))nm +TARGET_RANLIB = $(TARGET_CROSS)$(call qstrip,$(BR2_TOOLCHAIN_BUTILS_PREFIX))ranlib TARGET_READELF = $(TARGET_CROSS)readelf TARGET_OBJCOPY = $(TARGET_CROSS)objcopy TARGET_OBJDUMP = $(TARGET_CROSS)objdump diff --git a/toolchain/Config.in b/toolchain/Config.in index db2ab0f059..7a2becc09a 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -732,4 +732,11 @@ config BR2_TOOLCHAIN_HAS_LIBQUADMATH bool default y if BR2_i386 || BR2_x86_64 +# gcc ships with wrappers that will automatically pass arguments +# to the binutils tools. +# So far, those are paths to necessary linker plugins +config BR2_TOOLCHAIN_BUTILS_PREFIX + string + default "gcc-" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + endmenu From patchwork Sat Oct 17 22:17:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1383794 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=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=SMHYDaYf; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CDHTf55mBz9sSf for ; Sun, 18 Oct 2020 09:18:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 26DE187848; Sat, 17 Oct 2020 22:18:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gjy68VPVfvXP; Sat, 17 Oct 2020 22:18:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D52BD87815; Sat, 17 Oct 2020 22:18:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 6A3A11BF59D for ; Sat, 17 Oct 2020 22:18:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6690D8740A for ; Sat, 17 Oct 2020 22:18:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VaKKvVpymEqa for ; Sat, 17 Oct 2020 22:18:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id 20BF987406 for ; Sat, 17 Oct 2020 22:18:08 +0000 (UTC) Received: by mail-ej1-f66.google.com with SMTP id h24so8636731ejg.9 for ; Sat, 17 Oct 2020 15:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XWvV6DKNIVeIyFy8B8uIXig0h8yxHgy4ANdgMxW7LWA=; b=SMHYDaYfcvIGEXJgOfu3zJ8Vb5j75TshK9OiYcCo9TQ/bDObCbI2uZSkgoJH8qLkwE bLxi3xTuKUtB7dUHvpK+HlfSo+EXm5Y45CdnDFcoc4LtKmRXJ45T8sdHM53PS5pxG0Qn LqkKlC3Ebcl8+lJTxWmINZ+T/NmAg7jZjO13DoltuldeCd0WPyK0QWQhumADyK0eIq81 e4ygoQ/SzROrMuG1Da2SWRqr6FP2z6buhKJZ7GuwIgKC4VbQyru6nYS0WB5KQRwmKhcb E093aAqRhOiTx1UvmVQ1B0QJJH97neBvnTlnPkX7kLbSOlviD4fQXUliApv3lNthCDZ4 hTAA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=XWvV6DKNIVeIyFy8B8uIXig0h8yxHgy4ANdgMxW7LWA=; b=Dh+xSyEDPl9AVX37HW38F+h2y1dE0DD4WWQ8UKH/xsG9LjFmhXGS3SoKEsFNyrurdj Lrg1r9UVIiKE7jVcMuLV376FZs8+ficnKAJMR1n+9kBm7kkA/3DU9WXw4Y6hrTidMYDn iUOtSwx8FzVaSQN/eiY62ftpB4b2VaKjg+kOB4AGJdmp0HPHe4KlZNXMFGJFVt/gBTDi g+PrGdciStRFjH0uTYYLhsrdQ+TGo8eWJwf834F5dxbM+p7z7RRukcnTedn1AI+Bl915 epEg1k/VYMUbl6uaBUiWfCrN7d1jX05BrtUnRHN4ikjaaXdjutnqHhEtgs5jT8yOLjhp HjbA== X-Gm-Message-State: AOAM533H3xfaTCzTIDgYmjEMwTF1kkac/KohTNXxt1UdKSW+o/JmcxAP 0XsqlRQhws9Wc1dtXbUML2FBo9ai/fYupw== X-Google-Smtp-Source: ABdhPJw190M339PmO8E2PqWeTfH48vM2gozQe4+pA2Dju37SC6Ypd3d/KhFAP283NV66XoyKyu48bA== X-Received: by 2002:a17:907:20b2:: with SMTP id pw18mr10086196ejb.159.1602973086348; Sat, 17 Oct 2020 15:18:06 -0700 (PDT) Received: from localhost.localdomain (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id a13sm5950524edx.53.2020.10.17.15.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 15:18:05 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Sun, 18 Oct 2020 00:17:41 +0200 Message-Id: <20201017221743.160029-2-nolange79@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201017221743.160029-1-nolange79@gmail.com> References: <20201017221743.160029-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 2/4] package/gcc: use binutils wrappers for target libs X-BeenThere: buildroot@busybox.net 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: Romain Naour , Norbert Lange , yann.morin.1998@free.fr, Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This will use gcc-ar, gcc-nm and gcc-ranlib instead of the normal binutils tools. The difference is that with the wrappers, gcc plugins will be automatically picked up, which might be necessary with some flags. Signed-off-by: Norbert Lange --- v1->v2: * Only set those wrappers if gc 4.7 or newer --- package/gcc/gcc.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index 114c2887a0..a24ffe3ee2 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -99,6 +99,9 @@ GCC_COMMON_TARGET_CFLAGS += -Wno-error endif # Propagate options used for target software building to GCC target libs +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7),y) +HOST_GCC_COMMON_CONF_ENV += AR_FOR_TARGET=gcc-ar NM_FOR_TARGET=gcc-nm RANLIB_FOR_TARGET=gcc-ranlib +endif HOST_GCC_COMMON_CONF_ENV += CFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CFLAGS)" HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)" From patchwork Sat Oct 17 22:17:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1383795 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=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=X+lMt+R1; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CDHTj4R2Yz9sSf for ; Sun, 18 Oct 2020 09:18:17 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0113A2048C; Sat, 17 Oct 2020 22:18:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YyzV-DM2DOvR; Sat, 17 Oct 2020 22:18:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3BE31204E3; Sat, 17 Oct 2020 22:18:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2F9691BF59D for ; Sat, 17 Oct 2020 22:18:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2C1688740A for ; Sat, 17 Oct 2020 22:18:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h3lmrSKeQL1d for ; Sat, 17 Oct 2020 22:18:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8E09E87406 for ; Sat, 17 Oct 2020 22:18:09 +0000 (UTC) Received: by mail-ed1-f68.google.com with SMTP id t21so6404332eds.6 for ; Sat, 17 Oct 2020 15:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S8j6U+kqkcCKqnBdxy4BZpguxny5FRT/GG0J0O+6M7E=; b=X+lMt+R1QgsalRCrHd2pAakuHqC2J34Zsu60zEPOJRbEaYnlAWpbQSGRmxfPHMbSkv 3aQbpF0Q0OFlnRvlONt14j8qUAvmAYt+lt05LJ2RVCDmJGY5qVpz7uAiItp/9PNqc7iB J06PATHRvF+dEsuQBbYV8AYJMFQB2Hv1iA6mwcR8x/jjzYzyw69JkKmAkEcHhXaFD5+9 6qTEurOETzVNuZXa4+3b6LwhifdM1ZKfHko/ef1lTvlLd1q040/VV6pkIpRQDgDkAzp+ aZUTEvh3TfZgK4xsz24iL8638A+3NoBHUHJVllwSOkM2c3A1jB8cXDwOrw1zIHDohYF1 98WQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=S8j6U+kqkcCKqnBdxy4BZpguxny5FRT/GG0J0O+6M7E=; b=nv8hUb86u727UssZelvtWojIANbHBapcgE23KDKWycQNx2FbAF8vvqY1d79S7PO1X2 oN8KxS4d2WBkJ9711m2R05O45uR5IbpvF5pKOJR1E+FI9d7Yqt+RBoWUPWWgHkgsBu1N j1k+sh3/0M8of8yYzCmaTIzWuFK7jmrzytxjxhJsodYsKiFqnrLGqYWKdVYBudmmoOFK EiFp8nuvrCD+a8pWYFmm7vJT5n139VtiyK36b29IKSm8QaI3vS2GbaijQl7DkqT1lkti mw0/VkYaH1KLCMHCGHIwHHAiejcHn5Tredcrb2hjS/svM0AbRMOsLLOXLhyG99ldibSb /QRw== X-Gm-Message-State: AOAM531Pvuwv5TVCjcj8+d2Ecn7BNQtxLm5NVOZ8/qgmjZmsm2F+CReY EMo3C1ZUZA8DHC6s2vVWNmk+1dexqZi9EQ== X-Google-Smtp-Source: ABdhPJxcUQ+fMxl5KmMwfbFWiBO32DxsPbxAJ4fukTtnyTbOdbJjnfRXxzgVxTYYn6c0QO2OZYm8UQ== X-Received: by 2002:a05:6402:287:: with SMTP id l7mr10785861edv.212.1602973087865; Sat, 17 Oct 2020 15:18:07 -0700 (PDT) Received: from localhost.localdomain (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id a13sm5950524edx.53.2020.10.17.15.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 15:18:07 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Sun, 18 Oct 2020 00:17:42 +0200 Message-Id: <20201017221743.160029-3-nolange79@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201017221743.160029-1-nolange79@gmail.com> References: <20201017221743.160029-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 3/4] package/busybox: explicitly state binutil paths X-BeenThere: buildroot@busybox.net 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: Norbert Lange , yann.morin.1998@free.fr Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Pass paths to ar, nm, ranlib binaries. This allows linker-plugins to be used. Signed-off-by: Norbert Lange --- package/busybox/busybox.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk index 01f7331221..221b8adf59 100644 --- a/package/busybox/busybox.mk +++ b/package/busybox/busybox.mk @@ -94,6 +94,9 @@ BUSYBOX_MAKE_ENV += \ endif BUSYBOX_MAKE_OPTS = \ + AR="$(TARGET_AR)" \ + NM="$(TARGET_NM)" \ + RANLIB="$(TARGET_RANLIB)" \ CC="$(TARGET_CC)" \ ARCH=$(KERNEL_ARCH) \ PREFIX="$(TARGET_DIR)" \ From patchwork Sat Oct 17 22:17:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1383796 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=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=LXXnro4d; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CDHTl0lFBz9sSf for ; Sun, 18 Oct 2020 09:18:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ABA3B875F0; Sat, 17 Oct 2020 22:18:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ce2NkPNeI7kT; Sat, 17 Oct 2020 22:18:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 683B2875F9; Sat, 17 Oct 2020 22:18:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 30FA51BF59D for ; Sat, 17 Oct 2020 22:18:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 28AC6204E3 for ; Sat, 17 Oct 2020 22:18:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FUGI+qqZ15oG for ; Sat, 17 Oct 2020 22:18:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by silver.osuosl.org (Postfix) with ESMTPS id 31AB82048C for ; Sat, 17 Oct 2020 22:18:11 +0000 (UTC) Received: by mail-ej1-f65.google.com with SMTP id md26so8597904ejb.10 for ; Sat, 17 Oct 2020 15:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6Zm/CUUnGiH0pWDThOrcINKGwmj/itRoCvh7d2MflH8=; b=LXXnro4dbHtzr3SbAgVi1NimYCyGQwK5wiiEAREYcsQa5xkv2uZ1pI+OsbdFKmfObn 55RHgYfKn4IZPyvXaGKVg5+1Rj9GwYVHsxBofDc6rowKqlsYLS4CEWx0+GP/AUklR+Ub N1TLN6PrIE+DOjMjsfsvOsWpZCXgqiIz2fazK0SjcFulsA6yedup/QiWCYdN350fGRa/ FWd6bNXt1MYOHMC0Wr79MpSMlfVt8tCFIeGktAqbRVxWJN+2s18qkz+h1jAlzuYqE0TK X1JMZI+4B9wTwTUF3QbL/KGz3xYzUriWB8+b/E9kDFdezE0VFcEZen4IW4D5H67bZ+AQ gpfg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=6Zm/CUUnGiH0pWDThOrcINKGwmj/itRoCvh7d2MflH8=; b=nstID5zNg1rYgetBPhTPhG260HIjNDFLJuAoXNL9zE6Sl5rrkzcPi7Gmw6EDHWRWB5 ya5/ktrLey5ii7E/8Q2y/53OckpzWT14zAqRs6YTBIOR1T7hZov7ARfTT477wwJg/BVF F0vwlACBhG0icebo+E/lAESDMnhc0Xt/Yl6PmaQOIflqt57hLvgIXWJ85m6K1EzFK7T7 hLZkKBEdmc0S0eLgFccHJTYal1ZCCQv4s0PO/Gv1oTNjaiEARzeEUlM2vYLA+nDVLAh+ hur/L5v99L31KZzoXiBSbFrnSiSTVXLJ1DbMm1H1+Mutd6/LYV6cBKZ162hirAwZs8Al 897w== X-Gm-Message-State: AOAM531FWi75iJkGLmh3C8bdCwGg/ZdvUSik5yJh0BFgAnxce85yUDgQ 5dcrBbNrBMMaTfSuYgYdS+dnLCgxOBks0Q== X-Google-Smtp-Source: ABdhPJzr4e0EVi0h/qX/tyumFc1U6/DXFb4YBjPSk0Yt8ZO9lkiQFn8wWtIsPCPMvWr1s7gpJk9peg== X-Received: by 2002:a17:906:3397:: with SMTP id v23mr10158061eja.212.1602973089516; Sat, 17 Oct 2020 15:18:09 -0700 (PDT) Received: from localhost.localdomain (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id a13sm5950524edx.53.2020.10.17.15.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 15:18:08 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Sun, 18 Oct 2020 00:17:43 +0200 Message-Id: <20201017221743.160029-4-nolange79@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201017221743.160029-1-nolange79@gmail.com> References: <20201017221743.160029-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 4/4] package/glibc: force -fno-lto X-BeenThere: buildroot@busybox.net 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: Romain Naour , Norbert Lange , yann.morin.1998@free.fr Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" glibc requires compilation barriers between files, and will fail with LTO enabled. So force LTO off by appending -fno-lto to the flags, but only if the GCC version is recent enough that an LTO build would be possible. Signed-off-by: Norbert Lange --- package/glibc/glibc.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index 4721177d83..6d07495edc 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -67,6 +67,11 @@ ifeq ($(BR2_ENABLE_DEBUG),y) GLIBC_EXTRA_CFLAGS += -g endif +# glibc explicitly requires compile barriers between files +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7),y) +GLIBC_EXTRA_CFLAGS += -fno-lto +endif + # The stubs.h header is not installed by install-headers, but is # needed for the gcc build. An empty stubs.h will work, as explained # in http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html. The same trick