From patchwork Sat Jul 13 02:45:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 168955 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1639616ilk; Fri, 12 Jul 2019 19:46:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOvCClXv/g5TFfe77JpQDpl/EB1uV4Auw7nM7anDsK5O1VbeaSXWp8z73kdabQSEuR5w4P X-Received: by 2002:a17:902:82c4:: with SMTP id u4mr15497155plz.196.1562985985180; Fri, 12 Jul 2019 19:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562985985; cv=none; d=google.com; s=arc-20160816; b=E3SxDBGjxZI9vnZEbXwucXTM2zVg9hqj+nVLrYe8CGWAPy0GtXt404P0Ai2Isz6I9g l/MlnF7N6ZXfC6UAjsK+7uXSqdL3mM3foif3kMaf9269y4s/1RZzhE0ar5mX2Cbn4eoe ygoz6ze8Iq7xuXJCdKueZIWqXJJKmOTkr+DpK8tLf84u9MTLtkbpqp6lX/PyiOlRu7kw M8BIpUM9AW+UZSesxMO3wxpf+sfRVfoSgnIn610XiBfyKF5bpxixIdaq10JkQssidDUm 9AnI0sfG+rL8/7tanvq7MtepgKmDWC1DdJsa+ma9Pf4IF8O9OTUEUkVmrx7AzikFWWs0 UETw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=1ltkFVFaR9C7ymTKN/tBQ9NH1ZD80tQaVTmMpR2IObA=; b=Fty8n/OJ8IbXB8ffI2NYxNGDKB56lRHg6KPD40QeiCFUlhgPQgVifrymUAAR8EKgtv MU5v6WatqSNA4Q6IDtxhin8skPxAZjtu+EJ5vSq3AQhnaXiUYp+0hsQqBJfLwSJPs1pl Jb0yvpWswdOIfBxs1RtmJNQB2tRkH50QJGdG21P05f6o2UlteKRW5irimklCdb9q34/5 yalpCoHKttysbW1BUfONKdbP9Rr+lTzOn2xkHOOVIO1a5QoU/yvuRONXdAbZEAe2ekht 698wN5mLqB9Je10VnuHRZFwyCxumcBKg0wScPecYJBkZHu0ExczTEGuiBLeRPeriZRfK a5gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Uoy5OCgu; 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 w14si9570969pjn.15.2019.07.12.19.46.24; Fri, 12 Jul 2019 19:46:25 -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=@nifty.com header.s=dec2015msa header.b=Uoy5OCgu; 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 S1727601AbfGMCqX (ORCPT + 29 others); Fri, 12 Jul 2019 22:46:23 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:42311 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727393AbfGMCqX (ORCPT ); Fri, 12 Jul 2019 22:46:23 -0400 Received: from grover.flets-west.jp (softbank126026094249.bbtec.net [126.26.94.249]) (authenticated) by conuserg-09.nifty.com with ESMTP id x6D2k2fQ024877; Sat, 13 Jul 2019 11:46:02 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x6D2k2fQ024877 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1562985962; bh=1ltkFVFaR9C7ymTKN/tBQ9NH1ZD80tQaVTmMpR2IObA=; h=From:To:Cc:Subject:Date:From; b=Uoy5OCgubLkhqdKWlvjeTwR59Z+FgqEYQvR9vYET4KOh1yySyLdVHhDdNUSbfGwL8 G0xHndeCYpJC4ji0VgGBp768I8UjLny+69uccT2VQC+cjFfi1OdcXLvzLGVy4nb3uc fBpJSiRQjZOo71NUXfFwywEFV6zto0GYP2799iIngCPw/qFiuB3hWpe5vhM+s3hqQ/ LQeb+6jX8sjxZMlLDvfALGu4XehBWToyUm8INKbK9qpM0/MAuLHaMtJLHqe9LnkV2d PQLfShBqJ+aAA/wD5sx7XnL5SISsB5Gb5GQKXrfAdW14RHEgZyZOSix6xEew1VSVUQ EwIrEibWdmXrg== X-Nifty-SrcIP: [126.26.94.249] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Jonathan Corbet , Michal Marek , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] kbuild: get rid of misleading $(AS) from documents Date: Sat, 13 Jul 2019 11:45:58 +0900 Message-Id: <20190713024558.27214-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The assembler files in the kernel are *.S instead of *.s, so they must be preprocessed. Since 'as' of GNU binutils is not able to preprocess, we always use $(CC) as an assembler driver. $(AS) is almost unused in Kbuild. As of v5.2, there is just one place that directly invokes $(AS). $ git grep -e '$(AS)' -e '${AS}' -e '$AS' -e '$(AS:' -e '${AS:' -- :^Documentation drivers/net/wan/Makefile: AS68K = $(AS) The documentation about *_AFLAGS* sounds like the flags were passed to $(AS). This is somewhat misleading. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor --- Changes in v3: - Rebase Changes in v2: - Rephrase without using "assembling" Documentation/kbuild/kbuild.rst | 5 ++--- Documentation/kbuild/makefiles.rst | 12 ++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) -- 2.17.1 diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst index b25548963d70..727520b3d7b1 100644 --- a/Documentation/kbuild/kbuild.rst +++ b/Documentation/kbuild/kbuild.rst @@ -38,12 +38,11 @@ Additional options to the assembler (for built-in and modules). AFLAGS_MODULE ------------- -Additional module specific options to use for $(AS). +Additional assembler options for modules. AFLAGS_KERNEL ------------- -Additional options for $(AS) when used for assembler -code for code that is compiled as built-in. +Additional assembler options for built-in. KCFLAGS ------- diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst index 093f2d79ab95..67e47589d9d2 100644 --- a/Documentation/kbuild/makefiles.rst +++ b/Documentation/kbuild/makefiles.rst @@ -328,7 +328,7 @@ more details, with real examples. variable $(KBUILD_CFLAGS) and uses it for compilation flags for the entire tree. - asflags-y specifies options for assembling with $(AS). + asflags-y specifies assembler options. Example:: @@ -489,7 +489,7 @@ more details, with real examples. as-instr checks if the assembler reports a specific instruction and then outputs either option1 or option2 C escapes are supported in the test instruction - Note: as-instr-option uses KBUILD_AFLAGS for $(AS) options + Note: as-instr-option uses KBUILD_AFLAGS for assembler options cc-option cc-option is used to check if $(CC) supports a given option, and if @@ -905,7 +905,7 @@ When kbuild executes, the following steps are followed (roughly): vmlinux. The usage of $(call if_changed,xxx) will be described later. KBUILD_AFLAGS - $(AS) assembler flags + Assembler flags Default value - see top level Makefile Append or modify as required per architecture. @@ -948,16 +948,16 @@ When kbuild executes, the following steps are followed (roughly): to 'y' when selected. KBUILD_AFLAGS_KERNEL - $(AS) options specific for built-in + Assembler options specific for built-in $(KBUILD_AFLAGS_KERNEL) contains extra C compiler flags used to compile resident kernel code. KBUILD_AFLAGS_MODULE - Options for $(AS) when building modules + Assembler options specific for modules $(KBUILD_AFLAGS_MODULE) is used to add arch-specific options that - are used for $(AS). + are used for assembler. From commandline AFLAGS_MODULE shall be used (see kbuild.txt).