[PATCH v2 21/22] Use __ASSEMBLY__ as the assembly macros
Simon Goldschmidt
simon.k.r.goldschmidt at gmail.com
Tue Apr 14 22:38:47 CEST 2020
Masahiro Yamada <masahiroy at kernel.org> schrieb am Di., 14. Apr. 2020, 17:34:
> Hi Simon,
>
> On Tue, Apr 14, 2020 at 11:41 PM Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi Masahiro,
> >
> > On Mon, 13 Apr 2020 at 11:10, Masahiro Yamada <masahiroy at kernel.org>
> wrote:
> > >
> > > On Fri, Apr 10, 2020 at 5:18 AM Simon Glass <sjg at chromium.org> 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 <sjg at chromium.org>
> > > > ---
> > > >
> > > > 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?
Regards,
Simon
> You can easily confirm it by dumping the
> compiler's pre-defined macros.
>
>
>
> $ gcc -dM -E - < /dev/null | grep __ASSEMBLER__
> $ gcc -dM -E -x assembler-with-cpp - < /dev/null | grep __ASSEMBLER__
> #define __ASSEMBLER__ 1
>
>
>
>
> Since the following commit, DT started including U-Boot headers.
> This project is progressively going strange. :-/
>
>
> commit b116aff27c56dbc9132d847f7134eb7e4cc26aa3
> Author: Simon Glass <sjg at chromium.org>
> Date: Fri Nov 25 20:15:58 2016 -0700
>
> binman: Allow configuration options to be used in .dts files
>
>
>
>
>
> --
> Best Regards
> Masahiro Yamada
>
More information about the U-Boot
mailing list