Hi Tomek,

On Wed, Oct 11, 2023 at 3:21 PM Tomek CEDRO <to...@cedro.info> wrote:
>
> Hello world,
>
> I have encountered a basic esp32:nsh build error in nuttx-12.3.0-RC0
> related to xtensa g++ 8.4.0 compiler:
>
> xtensa-esp32-elf-g++: error: unrecognized command line option
> '-std=gnu++20'; did you mean '-std=gnu++2a'?

This was changed in d6453cfc3cd4771a5221528cab3056660be4b1e3 (PR # 8244).

See mail thread:
https://lists.apache.org/thread/rkq99os8ql28bv1w8fy5mdqwl3h2vp6m

The workaround is to set Kconfig CXX_STANDARD to gnu++2a instead of gnu++20.

It would be nice if the build system could automatically detect the
compiler version and set this value accordingly and automatically,
without a Kconfig. IIRC there are programs in tools that determine
compiler options based on the compiler and version. (Can't remember
details off the top of my head at the moment.)

More below:

> Therefore -1 from me at this point. This does not happen in 12.2.1. If
> a minimum required version of a compiler is required then this must be
> somehow clearly stated. This would break older setups. Looks like a
> breaking change. I do not even use C++. Can we please make this
> optional? Details below.
>
> BUILD HOST:
> FreeBSD octagon 13.2-RELEASE-p4 FreeBSD 13.2-RELEASE-p4 GENERIC amd64
>
> REMARKS:
> 1. flock is a new system build dependency.

I think documentation needs to be updated? I think not all systems
have flock. Is it a Linux-only thing? (Non-BSD?)

Cheers,
Nathan

Reply via email to