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'?

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.
2. ESP32 CoreMark builds fine.
3. ESP32 NSH fails to build (xtensa-esp32-elf-g++: error: unrecognized
command line option '-std=gnu++20'; did you mean '-std=gnu++2a'?).

TARGETS:
1. ESP32.

1. ESP32

1.1. COMPILER.

% xtensa-esp32-elf-gcc --version
xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2-patch5) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

1.2. COREMARK.

% /usr/bin/time -h ./tools/configure.sh -B -a ../nuttx-apps.git
esp32-devkitc:coremark
1,45s real 0,65s user 1,02s sys

% /usr/bin/time -h gmake -j8 V=1
17,23s real 54,60s user 32,36s sys

% /usr/bin/time -h gmake flash
2,47s real 1,54s user 1,06s sys

% cu -l /dev/cuaU0 -s 115200
can't open log file /var/log/aculog.
Connected
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4540
ho 0 tail 12 room 4
load:0x40078000,len:12344
ho 0 tail 12 room 4
load:0x40080400,len:4124
entry 0x40080680
Running CoreMark...
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 12180
Total time (secs): 12.180000
Iterations/Sec   : 985.221675
Iterations       : 12000
Compiler version : GCC8.4.0
Compiler flags   : -O3 -fno-strict-aliasing -fomit-frame-pointer
-ffunction-sections -fdata-sections
Parallel PThreads : 2
Memory location  : Stack
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[1]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[1]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[1]crcstate      : 0x8e3a
[0]crcfinal      : 0xa14c
[1]crcfinal      : 0xa14c
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 985.221675 / GCC8.4.0 -O3 -fno-strict-aliasing
-fomit-frame-pointer -ffunction-sections -fdata-sections / Stack /
2:PThreads

1.3. NSH

% /usr/bin/time -h ./tools/configure.sh -B -a ../nuttx-apps.git
esp32-devkitc:nsh
        3,17s real              1,48s user              1,93s sys

% /usr/bin/time -h gmake -j8 V=1
(..)
/XXX/nuttx.git/tools/mkdeps --obj-path . --obj-suffix .o --dep-path
libcxxmini "xtensa-esp32-elf-g++" -- -fno-common -nostdinc++ -Wall
-Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas -Wno-psabi
-std="gnu++20" -fno-exceptions -fcheck-new -fno-rtti -Os
-fno-strict-aliasing -fomit-frame-pointer -ffunction-sections
-fdata-sections -mlongcalls -isystem /XXX/nuttx.git/include/cxx
-isystem /XXX/nuttx.git/include -D__NuttX__ -DNDEBUG -D__KERNEL__
-pipe -- libcxxmini/libxx_newa.cxx > libxx_newa.ddx
xtensa-esp32-elf-g++: error: unrecognized command line option
'-std=gnu++20'; did you mean '-std=gnu++2a'?
xtensa-esp32-elf-g++: error: unrecognized command line option
'-std=gnu++20'; did you mean '-std=gnu++2a'?
xtensa-esp32-elf-g++: error: unrecognized command line option
'-std=gnu++20'; did you mean '-std=gnu++2a'?
xtensa-esp32-elf-g++: error: unrecognized command line option
'-std=gnu++20'; did you mean '-std=gnu++2a'?
xtensa-esp32-elf-g++: error: unrecognized command line option
'-std=gnu++20'; did you mean '-std=gnu++2a'?
xtensa-esp32-elf-g++: error: unrecognized command line option
'-std=gnu++20'; did you mean '-std=gnu++2a'?
xtensa-esp32-elf-g++: error: unrecognized command line option
'-std=gnu++20'; did you mean '-std=gnu++2a'?
xtensa-esp32-elf-g++: error: unrecognized command line option
'-std=gnu++20'; did you mean '-std=gnu++2a'?
if [ -z "libxx_cxa_guard.ddx libxx_cxapurevirtual.ddx libxx_delete.ddx
libxx_delete_sized.ddx libxx_deletea.ddx libxx_deletea_sized.ddx
libxx_new.ddx libxx_newa.ddx" ]; then echo '' >  Make.dep; else cat
libxx_cxa_guard.ddx libxx_cxapurevirtual.ddx libxx_delete.ddx
libxx_delete_sized.ddx libxx_deletea.ddx libxx_deletea_sized.ddx
libxx_new.ddx libxx_newa.ddx >  Make.dep; fi
rm -f  libxx_cxa_guard.ddx libxx_cxapurevirtual.ddx libxx_delete.ddx
libxx_delete_sized.ddx libxx_deletea.ddx libxx_deletea_sized.ddx
libxx_new.ddx libxx_newa.ddx
gmake[2]: Leaving directory '/XXX/nuttx.git/libs/libxx'
touch .depend
gmake[1]: Leaving directory '/XXX/nuttx.git/libs/libxx'
        7,41s real              15,67s user             15,37s sys

Any hints welcome!

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Reply via email to