From patchwork Thu Jan 31 09:07:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 10790137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1456891E for ; Thu, 31 Jan 2019 09:07:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1031830418 for ; Thu, 31 Jan 2019 09:07:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0211B30437; Thu, 31 Jan 2019 09:07:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95E7C30418 for ; Thu, 31 Jan 2019 09:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725932AbfAaJH1 (ORCPT ); Thu, 31 Jan 2019 04:07:27 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:44071 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbfAaJH1 (ORCPT ); Thu, 31 Jan 2019 04:07:27 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gp8Jh-0007i2-Tx; Thu, 31 Jan 2019 10:07:25 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1gp8Jh-0007Ae-Mb; Thu, 31 Jan 2019 10:07:25 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: linux-sparse@vger.kernel.org Subject: [PATCH] Makefile: default to LD = CC Date: Thu, 31 Jan 2019 10:07:24 +0100 Message-Id: <20190131090724.11157-1-uwe@kleine-koenig.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-sparse@vger.kernel.org Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Usually the compiler is used as linker. Assuming that if someone wants to change the compiler the linker should be changed, too, simplify that use case by using "$(CC)" as linker instead of the hard coded "gcc". This also matches the behaviour of make when using the built-in rules of GNU Make which include: LINK.o = $(CC) $(LDFLAGS) $(TARGET_ARCH) %: %.o $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@ Signed-off-by: Uwe Kleine-König --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9c4bafffcd6e..025bce296cdf 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ OS = linux CC = gcc CFLAGS = -O2 -g CFLAGS += -Wall -Wwrite-strings -LD = gcc +LD = $(CC) AR = ar PKG_CONFIG = pkg-config CHECKER = CHECK=./sparse ./cgcc -no-compile