From patchwork Thu Apr 14 14:58:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dichtel X-Patchwork-Id: 610486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 3qm3hr3MHNz9t3m for ; Fri, 15 Apr 2016 00:58:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AB2B332D5F; Thu, 14 Apr 2016 14:58:51 +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 sExZd-BbvraP; Thu, 14 Apr 2016 14:58:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A536A32AFD; Thu, 14 Apr 2016 14:58:49 +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 5FC8C1C129D for ; Thu, 14 Apr 2016 14:58:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5B06A8753B for ; Thu, 14 Apr 2016 14:58:48 +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 uvXTBdnshKgS for ; Thu, 14 Apr 2016 14:58:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by whitealder.osuosl.org (Postfix) with ESMTP id EA7B687BD9 for ; Thu, 14 Apr 2016 14:58:47 +0000 (UTC) Received: from schnaps.dev.6wind.com (unknown [10.16.0.7]) by proxy.6wind.com (Postfix) with ESMTPS id 7BF932509E; Thu, 14 Apr 2016 16:58:03 +0200 (CEST) Received: from root by schnaps.dev.6wind.com with local (Exim 4.80) (envelope-from ) id 1aqij5-0002FP-F5; Thu, 14 Apr 2016 16:58:35 +0200 From: Nicolas Dichtel To: buildroot@buildroot.org Date: Thu, 14 Apr 2016 16:58:32 +0200 Message-Id: <1460645912-8568-1-git-send-email-nicolas.dichtel@6wind.com> X-Mailer: git-send-email 2.4.2 Cc: nicolas.dichtel@6wind.com Subject: [Buildroot] [PATCH] Reset LD and AR environment variables X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The goal is to fix the compilation of perf (from linux) when LD or AR variables are inherited from the environment. After the linux upstream commits 5ef7bbb09f7b ("perf tools: Allow to specify custom linker command") and 3c71ba3f80bb ("perf tools: Really allow to specify custom CC, AR or LD") CC, AR, and LD variables are not overridden if they are inherited. In case of a cross compilation, it results in an inconsistent state: CC is overridden but not LD and AR. Linux-patch: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5ef7bbb09f7b Linux-patch: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3c71ba3f80bb Signed-off-by: Nicolas Dichtel Reviewed-by: Arnout Vandecappelle (Essensium/Mind) --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index ea8b1e4e51c8..55735ea735ae 100644 --- a/Makefile +++ b/Makefile @@ -343,6 +343,8 @@ ifeq ($(BR2_HAVE_DOT_CONFIG),y) unexport CROSS_COMPILE unexport ARCH unexport CC +unexport LD +unexport AR unexport CXX unexport CPP unexport RANLIB