From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Goldschmidt Date: Wed, 15 Apr 2020 06:48:27 +0200 Subject: [PATCH v2 21/22] Use __ASSEMBLY__ as the assembly macros In-Reply-To: <20200414210446.GI27851@bill-the-cat> References: <20200409201506.133129-1-sjg@chromium.org> <20200409201506.133129-6-sjg@chromium.org> <20200414210446.GI27851@bill-the-cat> Message-ID: <1a84206c-ee30-e540-8636-9b8d239a406c@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 14.04.2020 um 23:04 schrieb Tom Rini: > On Tue, Apr 14, 2020 at 10:38:47PM +0200, Simon Goldschmidt wrote: >> Masahiro Yamada schrieb am Di., 14. Apr. 2020, 17:34: >> >>> Hi Simon, >>> >>> On Tue, Apr 14, 2020 at 11:41 PM Simon Glass wrote: >>>> >>>> Hi Masahiro, >>>> >>>> On Mon, 13 Apr 2020 at 11:10, Masahiro Yamada >>> wrote: >>>>> >>>>> On Fri, Apr 10, 2020 at 5:18 AM Simon Glass wrote: >>>>>> >>>>>> Some places use __ASSEMBLER__ instead which does not work since the >>>>>> Makefile does not define it. Fix them. >>>>> >>>>> >>>>> In my understanding, >>>>> __ASSEMBLER__ is passed by the compiler >>>>> while building *.S files. >>>>> >>>>> On which compiler didn't this work for you? >>>>> >>>>> >>>>> >>>>> >>>>>> >>>>>> Signed-off-by: Simon Glass >>>>>> --- >>>>>> >>>>>> Changes in v2: >>>>>> - Add new patch to fix occurances of __ASSEMBLER__ >>>>>> >>>> >>>> I think I hit this with device tree, but I would need to go back and >>>> check. Anyway I think we should be consistent. >>> >>> >>> DT files are pre-processed with '-x assembler-with-cpp'. >>> >>> So, __ASSEMBLER__ is pre-defined by the compiler. >>> >> >> I have just seen this thread now. It touches socfpga headers but we're not >> in CC (possibly the maintainers file needs updating). >> >> Anyway, why do we have 2 defines for assembler? If one is predefined by the >> compiler, why don't we use that? Can you explain that for someone not too >> deeply involved? > > Generally and broadly speaking, the assembler will set __ASSEMBLER__. > That said, the Linux kernel has been setting __ASSEMBLY__ for > practically forever and we've copied that behavior also practically for > forever. In both trees there are a handful of __ASSEMBLER__ tests and a > vast majority of __ASSEMBLY__ tests. It doesn't normally matter which > is used as the only non-compiler in the Linux kernel that might care is > handled as shown above. Under the assumption that the feature > Yamada-san pointed out in binman is used, it should also define > __ASSEMBLER__ I believe, to match other tooling. Thanks! Ok, thanks for the explanation. Regards, Simon