I believe my other patch (that outputs COMPILER to config.ini) has
hidden this issue. I was getting it when I specify
--rtems-compiler=clang as in

> ./waf bsp_defaults --rtems-bsps=rv64imafdc_medany --rtems-compiler=clang > 
> config.ini

That didn't output COMPILER in config.ini. So during ./waf configure
the following line:
> value = cp.get(conf.variant, "COMPILER")

triggered an exception, and silently fall back to "gcc", and I didn't
know what went wrong. I don't think it might happen again now with my
other patch, but if any of those lines triggered another exception for
whatever reason, it will fall back to GCC.

> def get_compiler(conf, cp, variant):
 >   try:
 >       value = cp.get(conf.variant, "COMPILER")
 >       cp.remove_option(conf.variant, "COMPILER")
 >       value = no_unicode(value)
 >       check_compiler(conf, value)
 >   except configparser.NoOptionError:
 >       value="gcc"

I hope that clarifies things a little bit. I am OK with this patch not
being pushed.

On Fri, 10 Apr 2020 at 21:38, Sebastian Huber

<sebastian.hu...@embedded-brains.de> wrote:
>
> On 10/04/2020 22:38, Hesham Almatary wrote:
>
> Hello Sebastian,
>
> On Fri, 10 Apr 2020 at 20:23, Sebastian Huber
> <sebastian.hu...@embedded-brains.de> wrote:
>
> On 10/04/2020 12:39, Hesham Almatary wrote:
>
> Don't default to gcc if the compiler can't be found
>
> All options should have a default. I should be possible to build a BSP
> just with:
>
> [arch/bsp]
>
> This patch doesn't change that behaviour. You can still build a BSP
> without providing --rtems-compiler at all and it will default to GCC.
> However, this patch addresses the case when you provide an
> "--rtems-compiler=blah", where "blah" can't be found nor supported.
> For example, without this patch, if I pass "--rtems-compiler=clang"
> and it's not supported/found, it will fallback default to GCC silently
> without giving any errors. I don't think that's a desirable behaviour.
>
> Could you give me an example command line which shows the undesired behaviour?
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to