From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 61B23384802B; Wed, 11 Aug 2021 22:11:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61B23384802B From: "unlvsur at live dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/101867] avr libc build error for libstdc++ Date: Wed, 11 Aug 2021 22:11:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: unlvsur at live dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2021 22:11:47 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101867 --- Comment #8 from cqwrteur --- (In reply to Jonathan Wakely from comment #7) > Right, you need to use --with-avr --with-avrlibc Yeah. But it is not documented. in the /src/c++11/system_error.cc #ifdef __AVR__ return std::error_condition(ev, std::system_category()); #else switch (ev) { #endif i feel this switch is pointless. https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/include= /errno.h If you look at the errno.h here, it is pretty bad. I think this switch should just be removed. ../../../../../../../gcc/libstdc++-v3/src/c++11/random.cc:399:7: error: '::close' has not been declared; did you mean 'fclose'? 399 | ::close(_M_fd); | ^~~~~ | fclose Also this close stuff.=