Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp690976imm; Wed, 22 Aug 2018 10:53:39 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb0SMll8cpHTECxk9Xg7wU6MqXwxnb7xFFUtC/uo6Z24PbCGrNicg4bQpJ9YA9Nf8Ek9NL9 X-Received: by 2002:a17:902:f098:: with SMTP id go24mr1007813plb.183.1534960419436; Wed, 22 Aug 2018 10:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534960419; cv=none; d=google.com; s=arc-20160816; b=NijiZfYIGxh7YqnAjJBGC4Sp0mngsme7/mljY2A65qjYuMrP57GvTMndEu10cNipj6 g84Y4t3URTh0uiA8Y0b0lkwe4kOzg9IjLa3wlLXNlr9l1PzkHAeveysKih3U/vYZ8Yab dD5eN6g2iHaytlBidxberIt+E5UJkaEnQHNdn1msimhsz9lVlSx2lekWQEmxBRiNjbfh LqtND2cCGNMaMvlimGMcgbgPLLX6RHrgWiuhb13DyUqh9qCKVQyoyrq3szEWK/DG4PZb fOXEk625Ns8vSRVJ70K6EFbyR5IeX5PRkIAKeu4acJYYxXUXYsG2qfaWEXGrFF9ZeR+E Lofg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature :arc-authentication-results; bh=QgUK2d5jeSwQI6Y8u5Wk7p22DoAHY3S+pJGnLKtV0d8=; b=jsrEvqrnZ5co6ePHKrYKt7885iJ7t8n5eJ5RZjchvZi303ZNgoVSk4gLgmm0pZtl/b JE9Sd7ri+ylxLh+rB/5ValWz99LJwim78s6RrEYEwHPdBr1xoxBMxx3Z7xJLdk2gEXrT m+T9jRgjSwthfvpfVPJM4L2e97pfCj7SZlhWq5qXqNHBmXzh7hzn3A2fMXN/VaNVh4zx FOgrylMmS4jZJF9QeN+SWyrm8m4V9oofpzVr0ledhNZ+UbmJWloS4ujvtBgkdcqfmdLy faOUCQHjTf7o60aopOyj00W4KiotV46Pwq4bquaPBrML+N0ks8+7SRU4/hJuMMrPC/0g Mhjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=R8VFioAW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5-v6si2433860pfd.112.2018.08.22.10.53.24; Wed, 22 Aug 2018 10:53:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=R8VFioAW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727694AbeHVVRK (ORCPT + 99 others); Wed, 22 Aug 2018 17:17:10 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:36577 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727466AbeHVVRK (ORCPT ); Wed, 22 Aug 2018 17:17:10 -0400 Received: by mail-pl0-f65.google.com with SMTP id e11-v6so1191178plb.3 for ; Wed, 22 Aug 2018 10:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=QgUK2d5jeSwQI6Y8u5Wk7p22DoAHY3S+pJGnLKtV0d8=; b=R8VFioAWE9SO6jL6ehDkQefD6V3qANRpM/kevFk76PRfsABpq8dUWC4y+gY8VJqy2K iIsFUf0MjbzEWptwgjfy+JMopxrZV8+C94GMA1m1WgO5exEczGjTcU7KB/zO32DYPgY/ cY4JaZJSVCnsraDvdp4sP6Gu/gXdZ26Xt6y2zlwBO+zxQ+cQyyjWonD1F+VULb4ovQI3 roKMWSWFTcpiiWOYsgzmBnpRvR2wDUB2BN2FrRbhJZwqB8/a2AUN2jwsu43IyB291ULz sUsusCQnag5VhHxnENWvOM055ADtam2L18eUh0FEGssTV9oqbIcWAmxKA3Ok0RhrzUnT qoUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=QgUK2d5jeSwQI6Y8u5Wk7p22DoAHY3S+pJGnLKtV0d8=; b=azsigYFMJuRQD1AOJXiVlCqoBSaJ64ZE5DFa8HN7gx4hhwSjcRNDV+z7TxtRxzazYu UUvwooAKTppyx/U4QNqeHsELg3mXcvo1nXKAtn72i8HCiReCkAJJg2fJsLDnhlBzBqvw TSW0eNoHinv5as8wACcLq6To4aHQKRCmEO269OeytN4Y7reKyp7B2PlnZ66LQgspHvHT NeYIR+yotsHAGsq+Dzuz/GDptpusspAKGgE/yhM/PCp53zVB/9YCN5/B2i3nHApTdwBH CGfx5qFROt5qxPbQEvrG1bmI4D5Xj0GRTwI0IgF6vMGG4uE/3rPf17SIflYRoYdRggKi Y6xA== X-Gm-Message-State: AOUpUlGEkkG0KOM4aT8HyczW1LRqcug1+FraykiNmwEM6yoFF7yxnufs iuobgSz6tulXq/YDxD5dsGON4A== X-Received: by 2002:a17:902:561:: with SMTP id 88-v6mr54373577plf.320.1534960278632; Wed, 22 Aug 2018 10:51:18 -0700 (PDT) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id y3-v6sm3523039pfi.24.2018.08.22.10.51.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Aug 2018 10:51:17 -0700 (PDT) Date: Wed, 22 Aug 2018 10:51:17 -0700 (PDT) X-Google-Original-Date: Wed, 22 Aug 2018 10:30:25 PDT (-0700) Subject: Re: [PATCH v2] kbuild: rename LDFLAGS to KBUILD_LDFLAGS In-Reply-To: <1534945405-16396-1-git-send-email-yamada.masahiro@socionext.com> CC: linux-kbuild@vger.kernel.org, richard@nod.at, jdike@addtoit.com, x86@kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com, rmk+kernel@armlinux.org.uk, openrisc@lists.librecores.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org From: Palmer Dabbelt To: yamada.masahiro@socionext.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 22 Aug 2018 06:43:25 PDT (-0700), yamada.masahiro@socionext.com wrote: > Commit a0f97e06a43c ("kbuild: enable 'make CFLAGS=...' to add > additional options to CC") renamed CFLAGS to KBUILD_CFLAGS. > > Commit 222d394d30e7 ("kbuild: enable 'make AFLAGS=...' to add > additional options to AS") renamed AFLAGS to KBUILD_AFLAGS. > > Commit 06c5040cdb13 ("kbuild: enable 'make CPPFLAGS=...' to add > additional options to CPP") renamed CPPFLAGS to KBUILD_CPPFLAGS. > > For some reason, LDFLAGS was not renamed. > > Using a well-known variable like LDFLAGS may result in accidental > override of the variable. > > Kbuild generally uses KBUILD_ prefixed variables for the internally > appended options, so here is one more conversion to sanitize the > naming convention. > > I did not touch Makefiles under tools/ since the tools build system > is a different world. > > Signed-off-by: Masahiro Yamada > Acked-by: Kirill A. Shutemov > --- > > Changes in v2: > - Rebased on Linus's tree > > Makefile | 6 +++--- > arch/arc/Makefile | 2 +- > arch/arm/Makefile | 4 ++-- > arch/arm64/Makefile | 4 ++-- > arch/c6x/Makefile | 3 +-- > arch/h8300/Makefile | 2 +- > arch/hexagon/Makefile | 4 +--- > arch/m68k/Makefile | 2 +- > arch/microblaze/Makefile | 4 ++-- > arch/mips/Makefile | 2 +- > arch/mips/boot/compressed/Makefile | 2 +- > arch/mips/lasat/image/Makefile | 2 +- > arch/nds32/Makefile | 4 ++-- > arch/powerpc/Makefile | 6 +++--- > arch/riscv/Makefile | 4 ++-- > arch/s390/Makefile | 2 +- > arch/sh/Makefile | 4 ++-- > arch/sparc/Makefile | 4 ++-- > arch/um/Makefile | 2 +- > arch/x86/Makefile | 4 ++-- > arch/x86/Makefile.um | 4 ++-- > arch/x86/boot/compressed/Makefile | 6 +++--- > arch/xtensa/Makefile | 2 +- > arch/xtensa/boot/boot-elf/Makefile | 2 +- > scripts/Kbuild.include | 4 ++-- > scripts/Makefile.build | 4 ++-- > scripts/Makefile.lib | 2 +- > scripts/Makefile.modpost | 2 +- > 28 files changed, 45 insertions(+), 48 deletions(-) [...] > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile > index 9ddd88b..61ec424 100644 > --- a/arch/riscv/Makefile > +++ b/arch/riscv/Makefile > @@ -29,7 +29,7 @@ ifeq ($(CONFIG_ARCH_RV64I),y) > KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128) > > KBUILD_MARCH = rv64im > - LDFLAGS += -melf64lriscv > + KBUILD_LDFLAGS += -melf64lriscv > else > BITS := 32 > UTS_MACHINE := riscv32 > @@ -37,7 +37,7 @@ else > KBUILD_CFLAGS += -mabi=ilp32 > KBUILD_AFLAGS += -mabi=ilp32 > KBUILD_MARCH = rv32im > - LDFLAGS += -melf32lriscv > + KBUILD_LDFLAGS += -melf32lriscv > endif > > KBUILD_CFLAGS += -Wall Ah, thanks -- I'd noticed this when we were messing around in here recently and assumed there was some reason for the non-orthogonality. As far as the RISC-V stuff goes, feel free to add a Reviewed-by: Palmer Dabbelt I can deal with the inevitable merge conflicts on our end, as they'll be trivial :).