aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-01-31 22:16:31 +0000
committerJonathan Wakely <jwakely@redhat.com>2023-02-01 21:00:20 +0000
commit2d2e163d12f64a5e68f9e0381751ed9d5d6d3617 (patch)
tree81576f901f6df2b481c66b5cae1531c381cf7e68 /gcc/tree-vectorizer.h
parent7314558c938245e5963494629e6436e0dccf1c8b (diff)
downloadgcc-2d2e163d12f64a5e68f9e0381751ed9d5d6d3617.zip
gcc-2d2e163d12f64a5e68f9e0381751ed9d5d6d3617.tar.gz
gcc-2d2e163d12f64a5e68f9e0381751ed9d5d6d3617.tar.bz2
libstdc++: Fix build failures for avr
The abr-libc <errno.h> does not define EOVERFLOW, which means that std::errc::value_too_large is not defined, and so <charconv> cannot be compiled. Define value_too_large for avr with a value that does not clash with any that is defined in <errno.h>. This is a kluge to fix bootstrap for avr; it can be removed after PR libstdc++/104883 is resolved. The avr-libc <errno.h> fails to meet the C and POSIX requirements that each error macro has a distinct integral value, and is usable in #if directives. Add a special case for avr to system_error.cc so that only the valid errors are recognized. Also disable the errno checks in std::filesystem::remove_all that assume a meaningful value for errno. On avr-libc <unistd.h> exists but does not define the POSIX functions needed by std::filesystem, so _GLIBCXX_HAVE_UNISTD_H is not sufficient to check for basic POSIX APIs. Check !defined __AVR__ as well as _GLIBCXX_HAVE_UNISTD_H before using those functions. This is a kluge and we should really have a specific macro that says the required functions are available. libstdc++-v3/ChangeLog: * config/os/generic/error_constants.h (errc::value_too_large) [__AVR__]: Define. * src/c++11/system_error.cc (system_category::default_error_condition) [__AVR__]: Only match recognize values equal to EDOM, ERANGE, ENOSYS and EINTR. * src/c++17/fs_ops.cc (fs::current_path) [__AVR__]: Do not check for ENOENT etc. in switch. (fs::remove_all) [__AVR__]: Likewise. * src/filesystem/ops-common.h [__AVR__]: Do not use POSIX open, close etc.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions