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)"