See https://github.com/llvm/llvm-project/pull/86320 for context > It seems FreeBSD's libc is not standard compliant. > /usr/include/fenv.h:266 > > __fenv_static inline int > feclearexcept(int __excepts) > > and __fenv_static is defined as static. This means feclearexcept has internal linkage. > This is not allowed by the C standard and C++ modules can't export named declarations > with internal linkage. So this is probably something to be fixed in FreeBSD.
Agreed, also see https://cigix.me/c23#7.1.2.p8 which clearly states: 8. Any declaration of a library function shall have external linkage. I just ran into this since it breaks building of latest libstdc++. The libstdc++ folks may work around this; still it looks like a bug in FreeBSD. Any chance to get this address on our end?
Perhaps we can add the symbol to libc (or libm?) and export it, keeping the static inline definition intact.
It looks like we have always had in fenv(3): LIBRARY Math Library (libm, -lm) so moving them to libm should be safe enough.
(In reply to Konstantin Belousov from comment #2) If the standard says "declaration ... shall have external linkage", you cannot get away with a static inline declaration. Maybe extern inline would work for this particular use case?
(In reply to Dimitry Andric from comment #4) Standard says that all functions must have external linkage, but it also allows to have them defined differently for the compilation unit AFAIR. This is where e.g. macros for memset() and friends come from. What I am saying that we must export the symbol from libm, as you noted, but keep the static inline definition as well.
I don't think you can keep the static inline definition. It means that &feclearexcept has a different address in every translation unit, which defeats the purpose of there being extern symbols in libm. What is allowed is to hide the declaration of the extern symbol with a macro that redirects to a *different* function name, which can be static inline: int feclearexcept(int __excepts); static inline int __inline_feclearexcept(int __excepts) { /* ... */ } #define feclearexcept __inline_feclearexcept This ensures that somebody can #undef feclearexcept to get at the real symbol, whether to take its address for use across TUs, or for the original context in comment 0 where C++ modules require a symbol with external linkage. Simply defining it in libm and continuing to define a static inline function in fenv.h would do absolutely nothing to solve that original reported issue (which is now affecting GCC as well as LLVM).
(In reply to Jonathan Wakely from comment #6) My understanding of what I read in the C11 standard was that: ) The header can just use inline (no static or extern). ) One .c file could include the header and declare each such routine via use of "extern inline" and that will provide the routine used when inlining is not done, including for handling use of & to get the unique pointer. The rest is having the compiled .c available for linking. This ties back to 6.7.4 Function Specifiers and its EXAMPLE 1 with the fhar function and the supporting text. (The text is not about header behavior, but using the properties described leads to my understanding of the behavior for my earlier above notes.)
(In reply to Mark Millard from comment #7) fahr, not fhar, sorry.
https://reviews.freebsd.org/D55975
(In reply to Mark Millard from comment #7) Another mistake: I referenced "extern inline" where the C11 standard's example just uses "extern" in the separate declaration after the inline declaration of fahr.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f39754d51b7dc65c4cf9f8b41b6fc1fc135554e7 commit f39754d51b7dc65c4cf9f8b41b6fc1fc135554e7 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-19 17:19:09 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-03-26 23:41:14 +0000 fenv.h: stop declaring feclearexcept() extern inline The function is already exported from libm. We only need to stop declare it extern inline, and instead provide a macro which uses the internal inline function __feclearexcept_int() instead. PR: 277958 Reviewed by: dim (x86) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55975 lib/msun/aarch64/fenv.c | 7 ++++++- lib/msun/aarch64/fenv.h | 7 +++++-- lib/msun/amd64/fenv.c | 7 ++++++- lib/msun/arm/fenv.c | 7 ++++++- lib/msun/arm/fenv.h | 5 ++++- lib/msun/i387/fenv.c | 7 ++++++- lib/msun/powerpc/fenv.c | 7 ++++++- lib/msun/powerpc/fenv.h | 5 ++++- lib/msun/riscv/fenv.c | 7 ++++++- lib/msun/riscv/fenv.h | 5 ++++- lib/msun/x86/fenv.h | 7 +++++-- 11 files changed, 58 insertions(+), 13 deletions(-)
(In reply to commit-hook from comment #11) Also wrong are: fegetexceptflag, fegetround, fesetenv, fesetround, and fetestexcept The below test case is from a system that is synchronized to somewhat before the commit. So it still lists feclearexcept as well. But it also lists the others: # clang++ -std=c++26 cpp_export_module_c_compat.cppm --precompile -o cpp_export_module_c_compat.pcm cpp_export_module_c_compat.cppm:112:19: error: using declaration referring to 'feclearexcept' with internal linkage cannot be exported 112 | export using std::feclearexcept; | ^ /usr/include/fenv.h:265:1: note: target of using declaration 265 | feclearexcept(int __excepts) | ^ cpp_export_module_c_compat.cppm:114:19: error: using declaration referring to 'fegetexceptflag' with internal linkage cannot be exported 114 | export using std::fegetexceptflag; | ^ /usr/include/fenv.h:283:1: note: target of using declaration 283 | fegetexceptflag(fexcept_t *__flagp, int __excepts) | ^ cpp_export_module_c_compat.cppm:115:19: error: using declaration referring to 'fegetround' with internal linkage cannot be exported 115 | export using std::fegetround; | ^ /usr/include/fenv.h:111:1: note: target of using declaration 111 | fegetround(void) | ^ cpp_export_module_c_compat.cppm:121:19: error: using declaration referring to 'fesetenv' with internal linkage cannot be exported 121 | export using std::fesetenv; | ^ /usr/include/fenv.h:328:1: note: target of using declaration 328 | fesetenv(const fenv_t *__envp) | ^ cpp_export_module_c_compat.cppm:123:19: error: using declaration referring to 'fesetround' with internal linkage cannot be exported 123 | export using std::fesetround; | ^ /usr/include/fenv.h:306:1: note: target of using declaration 306 | fesetround(int __round) | ^ cpp_export_module_c_compat.cppm:124:19: error: using declaration referring to 'fetestexcept' with internal linkage cannot be exported 124 | export using std::fetestexcept; | ^ /usr/include/fenv.h:295:1: note: target of using declaration 295 | fetestexcept(int __excepts) | ^ 6 errors generated. The source code is simple: # cat cpp_export_module_c_compat.cppm module; // clang++ -std=c++26 cpp_export_module_c_compat.cppm --precompile -o cpp_export_module_c_compat.pcm #include <cassert> #include <cctype> #include <cerrno> #include <cfenv> #include <cfloat> #include <cinttypes> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <cuchar> #include <cwchar> #include <cwctype> export module cpp_export_module_c_compat; export using std::FILE; export using std::_Exit; export using std::abort; export using std::abs; export using std::acos; export using std::acosf; export using std::acosh; export using std::acoshf; export using std::acoshl; export using std::acosl; export using std::aligned_alloc; export using std::asctime; export using std::asin; export using std::asinf; export using std::asinh; export using std::asinhf; export using std::asinhl; export using std::asinl; export using std::at_quick_exit; export using std::atan; export using std::atan2; export using std::atan2f; export using std::atan2l; export using std::atanf; export using std::atanh; export using std::atanhf; export using std::atanhl; export using std::atanl; export using std::atexit; export using std::atof; export using std::atoi; export using std::atol; export using std::atoll; export using std::bsearch; export using std::btowc; export using std::c16rtomb; export using std::c32rtomb; export using std::calloc; export using std::cbrt; export using std::cbrtf; export using std::cbrtl; export using std::ceil; export using std::ceilf; export using std::ceill; export using std::clearerr; export using std::clock; export using std::clock_t; export using std::copysign; export using std::copysignf; export using std::copysignl; export using std::cos; export using std::cosf; export using std::cosh; export using std::coshf; export using std::coshl; export using std::cosl; export using std::ctime; export using std::difftime; export using std::div; export using std::div_t; export using std::double_t; export using std::erf; export using std::erfc; export using std::erfcf; export using std::erfcl; export using std::erff; export using std::erfl; export using std::exit; export using std::exp; export using std::exp2; export using std::exp2f; export using std::exp2l; export using std::expf; export using std::expl; export using std::expm1; export using std::expm1f; export using std::expm1l; export using std::fabs; export using std::fabsf; export using std::fabsl; export using std::fclose; export using std::fdim; export using std::fdimf; export using std::fdiml; export using std::feclearexcept; export using std::fegetenv; export using std::fegetexceptflag; export using std::fegetround; export using std::feholdexcept; export using std::fenv_t; export using std::feof; export using std::feraiseexcept; export using std::ferror; export using std::fesetenv; export using std::fesetexceptflag; export using std::fesetround; export using std::fetestexcept; export using std::feupdateenv; export using std::fexcept_t; export using std::fflush; export using std::fgetc; export using std::fgetpos; export using std::fgets; export using std::fgetwc; export using std::fgetws; export using std::float_t; export using std::floor; export using std::floorf; export using std::floorl; export using std::fma; export using std::fmaf; export using std::fmal; export using std::fmax; export using std::fmaxf; export using std::fmaxl; export using std::fmin; export using std::fminf; export using std::fminl; export using std::fmod; export using std::fmodf; export using std::fmodl; export using std::fopen; export using std::fpclassify; export using std::fpos_t; export using std::fprintf; export using std::fputc; export using std::fputs; export using std::fputwc; export using std::fputws; export using std::fread; export using std::free; export using std::freopen; export using std::frexp; export using std::frexpf; export using std::frexpl; export using std::fscanf; export using std::fseek; export using std::fsetpos; export using std::ftell; export using std::fwide; export using std::fwprintf; export using std::fwrite; export using std::fwscanf; export using std::getc; export using std::getchar; export using std::getenv; export using std::getwc; export using std::getwchar; export using std::gmtime; export using std::hypot; export using std::hypotf; export using std::hypotl; export using std::ilogb; export using std::ilogbf; export using std::ilogbl; export using std::imaxabs; export using std::imaxdiv; export using std::imaxdiv_t; export using std::int16_t; export using std::int32_t; export using std::int64_t; export using std::int8_t; export using std::int_fast16_t; export using std::int_fast32_t; export using std::int_fast64_t; export using std::int_fast8_t; export using std::int_least16_t; export using std::int_least32_t; export using std::int_least64_t; export using std::int_least8_t; export using std::intmax_t; export using std::intptr_t; export using std::isalnum; export using std::isalpha; export using std::isblank; export using std::iscntrl; export using std::isdigit; export using std::isfinite; export using std::isgraph; export using std::isgreater; export using std::isgreaterequal; export using std::isinf; export using std::isless; export using std::islessequal; export using std::islessgreater; export using std::islower; export using std::isnan; export using std::isnormal; export using std::isprint; export using std::ispunct; export using std::isspace; export using std::isunordered; export using std::isupper; export using std::iswalnum; export using std::iswalpha; export using std::iswblank; export using std::iswcntrl; export using std::iswctype; export using std::iswdigit; export using std::iswgraph; export using std::iswlower; export using std::iswprint; export using std::iswpunct; export using std::iswspace; export using std::iswupper; export using std::iswxdigit; export using std::isxdigit; export using std::jmp_buf; export using std::labs; export using std::lconv; export using std::ldexp; export using std::ldexpf; export using std::ldexpl; export using std::ldiv; export using std::ldiv_t; export using std::lgamma; export using std::lgammaf; export using std::lgammal; export using std::llabs; export using std::lldiv; export using std::lldiv_t; export using std::llrint; export using std::llrintf; export using std::llrintl; export using std::llround; export using std::llroundf; export using std::llroundl; export using std::localeconv; export using std::localtime; export using std::log; export using std::log10; export using std::log10f; export using std::log10l; export using std::log1p; export using std::log1pf; export using std::log1pl; export using std::log2; export using std::log2f; export using std::log2l; export using std::logb; export using std::logbf; export using std::logbl; export using std::logf; export using std::logl; export using std::longjmp; export using std::lrint; export using std::lrintf; export using std::lrintl; export using std::lround; export using std::lroundf; export using std::lroundl; export using std::malloc; export using std::max_align_t; export using std::mblen; export using std::mbrlen; export using std::mbrtoc16; export using std::mbrtoc32; export using std::mbrtowc; export using std::mbsinit; export using std::mbsrtowcs; export using std::mbstate_t; export using std::mbstowcs; export using std::mbtowc; export using std::memchr; export using std::memcmp; export using std::memcpy; export using std::memmove; export using std::memset; export using std::mktime; export using std::modf; export using std::modff; export using std::modfl; export using std::nan; export using std::nanf; export using std::nanl; export using std::nearbyint; export using std::nearbyintf; export using std::nearbyintl; export using std::nextafter; export using std::nextafterf; export using std::nextafterl; export using std::nexttoward; export using std::nexttowardf; export using std::nexttowardl; export using std::nullptr_t; export using std::perror; export using std::pow; export using std::powf; export using std::powl; export using std::printf; export using std::ptrdiff_t; export using std::putc; export using std::putchar; export using std::puts; export using std::putwc; export using std::putwchar; export using std::qsort; export using std::quick_exit; export using std::raise; export using std::rand; export using std::realloc; export using std::remainder; export using std::remainderf; export using std::remainderl; export using std::remove; export using std::remquo; export using std::remquof; export using std::remquol; export using std::rename; export using std::rewind; export using std::rint; export using std::rintf; export using std::rintl; export using std::round; export using std::roundf; export using std::roundl; export using std::scalbln; export using std::scalblnf; export using std::scalblnl; export using std::scalbn; export using std::scalbnf; export using std::scalbnl; export using std::scanf; export using std::setbuf; export using std::setlocale; export using std::setvbuf; export using std::sig_atomic_t; export using std::signal; export using std::signbit; export using std::sin; export using std::sinf; export using std::sinh; export using std::sinhf; export using std::sinhl; export using std::sinl; export using std::size_t; export using std::snprintf; export using std::sprintf; export using std::sqrt; export using std::sqrtf; export using std::sqrtl; export using std::srand; export using std::sscanf; export using std::strcat; export using std::strchr; export using std::strcmp; export using std::strcoll; export using std::strcpy; export using std::strcspn; export using std::strerror; export using std::strftime; export using std::strlen; export using std::strncat; export using std::strncmp; export using std::strncpy; export using std::strpbrk; export using std::strrchr; export using std::strspn; export using std::strstr; export using std::strtod; export using std::strtof; export using std::strtoimax; export using std::strtok; export using std::strtol; export using std::strtold; export using std::strtoll; export using std::strtoul; export using std::strtoull; export using std::strtoumax; export using std::strxfrm; export using std::swprintf; export using std::swscanf; export using std::system; export using std::tan; export using std::tanf; export using std::tanh; export using std::tanhf; export using std::tanhl; export using std::tanl; export using std::tgamma; export using std::tgammaf; export using std::tgammal; export using std::time; export using std::time_t; export using std::timespec; export using std::timespec_get; export using std::tm; export using std::tmpfile; export using std::tmpnam; export using std::tolower; export using std::toupper; export using std::towctrans; export using std::towlower; export using std::towupper; export using std::trunc; export using std::truncf; export using std::truncl; export using std::uint16_t; export using std::uint32_t; export using std::uint64_t; export using std::uint8_t; export using std::uint_fast16_t; export using std::uint_fast32_t; export using std::uint_fast64_t; export using std::uint_fast8_t; export using std::uint_least16_t; export using std::uint_least32_t; export using std::uint_least64_t; export using std::uint_least8_t; export using std::uintmax_t; export using std::uintptr_t; export using std::ungetc; export using std::ungetwc; export using std::va_list; export using std::vfprintf; export using std::vfscanf; export using std::vfwprintf; export using std::vfwscanf; export using std::vprintf; export using std::vscanf; export using std::vsnprintf; export using std::vsprintf; export using std::vsscanf; export using std::vswprintf; export using std::vswscanf; export using std::vwprintf; export using std::vwscanf; export using std::wcrtomb; export using std::wcscat; export using std::wcschr; export using std::wcscmp; export using std::wcscoll; export using std::wcscpy; export using std::wcscspn; export using std::wcsftime; export using std::wcslen; export using std::wcsncat; export using std::wcsncmp; export using std::wcsncpy; export using std::wcspbrk; export using std::wcsrchr; export using std::wcsrtombs; export using std::wcsspn; export using std::wcsstr; export using std::wcstod; export using std::wcstof; export using std::wcstoimax; export using std::wcstok; export using std::wcstol; export using std::wcstold; export using std::wcstoll; export using std::wcstombs; export using std::wcstoul; export using std::wcstoull; export using std::wcstoumax; export using std::wcsxfrm; export using std::wctob; export using std::wctomb; export using std::wctrans; export using std::wctrans_t; export using std::wctype; export using std::wctype_t; export using std::wint_t; export using std::wmemchr; export using std::wmemcmp; export using std::wmemcpy; export using std::wmemmove; export using std::wmemset; export using std::wprintf; export using std::wscanf;
(In reply to Mark Millard from comment #12) That was amd64. Looks like aarch64 gets a bigger list of what is not correct there: Beyond what amd64 reported . . . fegetenv, feholdexcept, feraiseexcept, fesetexceptflag, feupdateenv # clang++ -std=c++26 cpp_export_module_c_compat.cppm --precompile -o cpp_export_module_c_compat.pcm cpp_export_module_c_compat.cppm:112:19: error: using declaration referring to 'feclearexcept' with internal linkage cannot be exported 112 | export using std::feclearexcept; | ^ /usr/include/fenv.h:85:1: note: target of using declaration | ^ /usr/include/fenv.h:161:1: note: target of using declaration 161 | fegetenv(fenv_t *__envp) | ^ cpp_export_module_c_compat.cppm:114:19: error: using declaration referring to 'fegetexceptflag' with internal linkage cannot be exported 114 | export using std::fegetexceptflag; | ^ /usr/include/fenv.h:96:1: note: target of using declaration 96 | fegetexceptflag(fexcept_t *__flagp, int __excepts) | ^ cpp_export_module_c_compat.cppm:115:19: error: using declaration referring to 'fegetround' with internal linkage cannot be exported 115 | export using std::fegetround; | ^ /usr/include/fenv.h:138:1: note: target of using declaration 138 | fegetround(void) | ^ cpp_export_module_c_compat.cppm:116:19: error: using declaration referring to 'feholdexcept' with internal linkage cannot be exported 116 | export using std::feholdexcept; | ^ /usr/include/fenv.h:174:1: note: target of using declaration 174 | feholdexcept(fenv_t *__envp) | ^ cpp_export_module_c_compat.cppm:119:19: error: using declaration referring to 'feraiseexcept' with internal linkage cannot be exported 119 | export using std::feraiseexcept; | ^ /usr/include/fenv.h:118:1: note: target of using declaration 118 | feraiseexcept(int __excepts) | ^ cpp_export_module_c_compat.cppm:121:19: error: using declaration referring to 'fesetenv' with internal linkage cannot be exported 121 | export using std::fesetenv; | ^ /usr/include/fenv.h:191:1: note: target of using declaration 191 | fesetenv(const fenv_t *__envp) | ^ cpp_export_module_c_compat.cppm:122:19: error: using declaration referring to 'fesetexceptflag' with internal linkage cannot be exported 122 | export using std::fesetexceptflag; | ^ /usr/include/fenv.h:106:1: note: target of using declaration 106 | fesetexceptflag(const fexcept_t *__flagp, int __excepts) | ^ cpp_export_module_c_compat.cppm:123:19: error: using declaration referring to 'fesetround' with internal linkage cannot be exported 123 | export using std::fesetround; | ^ /usr/include/fenv.h:147:1: note: target of using declaration 147 | fesetround(int __round) | ^ cpp_export_module_c_compat.cppm:124:19: error: using declaration referring to 'fetestexcept' with internal linkage cannot be exported 124 | export using std::fetestexcept; | ^ /usr/include/fenv.h:129:1: note: target of using declaration 129 | fetestexcept(int __excepts) | ^ cpp_export_module_c_compat.cppm:125:19: error: using declaration referring to 'feupdateenv' with internal linkage cannot be exported 125 | export using std::feupdateenv; | ^ /usr/include/fenv.h:200:1: note: target of using declaration 200 | feupdateenv(const fenv_t *__envp) | ^ 11 errors generated.
(In reply to Mark Millard from comment #13) FYI: an example g++15 command for seeing its messages about such: # g++15 -std=c++26 -c cpp_export_module_c_compat.cppm --modules
https://reviews.freebsd.org/D56139
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=70674434e2424d61262322702d0415e54d8cc1a2 commit 70674434e2424d61262322702d0415e54d8cc1a2 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-29 03:10:18 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-03-30 16:57:01 +0000 msun/arm: convert fenv functions to proper linkage namely fegetexceptflag(3) fesetexceptflag(3) feraiseexcept(3) fetestexcept(3) fegetround(3) fesetround(3) fegetenv(3) feholdexcept(3) fesetenv(3) feupdateenv(3) feenableexcept(3) fedisableexcept(3) fegetexcept(3) PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 lib/msun/arm/fenv.c | 133 +++++++++++++++++++++++++++++++++++++++++----------- lib/msun/arm/fenv.h | 58 ++++++++++++++++++----- 2 files changed, 150 insertions(+), 41 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3a01e1e1a50cb9a9594aac2148dc920a6b295428 commit 3a01e1e1a50cb9a9594aac2148dc920a6b295428 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-28 23:13:44 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-03-30 16:57:00 +0000 msun/aarch64: convert fenv functions to proper linkage namely fegetexceptflag(3) fesetexceptflag(3) feraiseexcept(3) fetestexcept(3) fegetround(3) fesetround(3) fegetenv(3) feholdexcept(3) fesetenv(3) feupdateenv(3) feenableexcept(3) fedisableexcept(3) fegetexcept(3) PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 lib/msun/aarch64/fenv.c | 72 ++++++++++++++++++++++++++++++++++++++++--------- lib/msun/aarch64/fenv.h | 41 +++++++++++++++++++++------- 2 files changed, 90 insertions(+), 23 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d15733065c4221dcd5bb3622d225760f271f6fc9 commit d15733065c4221dcd5bb3622d225760f271f6fc9 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-29 01:30:03 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-03-30 16:57:01 +0000 msun: remove requirement to have C99 inline semantic The 'extern inline' usage is removed. PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 lib/msun/aarch64/fenv.c | 5 ----- lib/msun/amd64/fenv.c | 5 ----- lib/msun/arm/fenv.c | 5 ----- lib/msun/i387/fenv.c | 5 ----- lib/msun/powerpc/fenv.c | 5 ----- lib/msun/riscv/fenv.c | 5 ----- 6 files changed, 30 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e4505a58a77f6f4f2df60d26ea99710af6c6b3cf commit e4505a58a77f6f4f2df60d26ea99710af6c6b3cf Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-29 02:06:02 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-03-30 16:57:01 +0000 msun/powerpc: convert fenv functions to proper linkage namely fegetexceptflag(3) fesetexceptflag(3) feraiseexcept(3) fetestexcept(3) fegetround(3) fesetround(3) fegetenv(3) feholdexcept(3) fesetenv(3) feupdateenv(3) feenableexcept(3) fedisableexcept(3) fegetexcept(3) PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 lib/msun/powerpc/fenv.c | 83 ++++++++++++++++++++++++++++++++++++++++++------- lib/msun/powerpc/fenv.h | 51 +++++++++++++++++++++++------- 2 files changed, 110 insertions(+), 24 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5bc64b7d417dd1f105755e093f8e807bcdc2a666 commit 5bc64b7d417dd1f105755e093f8e807bcdc2a666 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-28 22:36:55 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-03-30 16:57:00 +0000 msun/x86: convert rest of the extern inline fenv functions to proper linkage namely fegetexceptflag(3) fetestexcept(3) fesetround(3) fegetround(3) fesetenv(3) Same as it was done in f39754d51b7dc65c4cf9f for feclearexcept(3). PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 lib/msun/amd64/fenv.c | 32 +++++++++++++++++++++++++++----- lib/msun/i387/fenv.c | 32 +++++++++++++++++++++++++++----- lib/msun/x86/fenv.h | 29 ++++++++++++++++++++--------- 3 files changed, 74 insertions(+), 19 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6b89f5360f8441ffd1a3e8db7375ed3ccdba7d2a commit 6b89f5360f8441ffd1a3e8db7375ed3ccdba7d2a Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-29 01:27:30 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-03-30 16:57:01 +0000 msun/riscv: convert fenv functions to proper linkage namely fegetexceptflag(3) fesetexceptflag(3) feraiseexcept(3) fetestexcept(3) fegetround(3) fesetround(3) fegetenv(3) feholdexcept(3) fesetenv(3) feupdateenv(3) feenableexcept(3) fedisableexcept(3) fegetexcept(3) PR: 277958 Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56139 lib/msun/riscv/fenv.c | 84 +++++++++++++++++++++++++++++++++++++++++++-------- lib/msun/riscv/fenv.h | 51 +++++++++++++++++++++++-------- 2 files changed, 110 insertions(+), 25 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=081f52a441918da51c4f5891dcb125bf8293ff2e commit 081f52a441918da51c4f5891dcb125bf8293ff2e Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-29 01:30:03 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-04-05 07:47:10 +0000 msun: remove requirement to have C99 inline semantic PR: 277958 (cherry picked from commit d15733065c4221dcd5bb3622d225760f271f6fc9) lib/msun/aarch64/fenv.c | 5 ----- lib/msun/amd64/fenv.c | 5 ----- lib/msun/arm/fenv.c | 5 ----- lib/msun/i387/fenv.c | 5 ----- lib/msun/powerpc/fenv.c | 5 ----- lib/msun/riscv/fenv.c | 5 ----- 6 files changed, 30 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=492843d5269f22592d7694111e92200bf577633c commit 492843d5269f22592d7694111e92200bf577633c Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-28 23:13:44 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-04-05 07:47:10 +0000 msun/aarch64: convert fenv functions to proper linkage PR: 277958 (cherry picked from commit 3a01e1e1a50cb9a9594aac2148dc920a6b295428) lib/msun/aarch64/fenv.c | 72 ++++++++++++++++++++++++++++++++++++++++--------- lib/msun/aarch64/fenv.h | 41 +++++++++++++++++++++------- 2 files changed, 90 insertions(+), 23 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=9687de5aac951f3f89cca349346fbbe372c7af1b commit 9687de5aac951f3f89cca349346fbbe372c7af1b Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-19 17:19:09 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-04-05 07:47:10 +0000 fenv.h: stop declaring feclearexcept() extern inline PR: 277958 (cherry picked from commit f39754d51b7dc65c4cf9f8b41b6fc1fc135554e7) lib/msun/aarch64/fenv.c | 7 ++++++- lib/msun/aarch64/fenv.h | 7 +++++-- lib/msun/amd64/fenv.c | 7 ++++++- lib/msun/arm/fenv.c | 7 ++++++- lib/msun/arm/fenv.h | 5 ++++- lib/msun/i387/fenv.c | 7 ++++++- lib/msun/powerpc/fenv.c | 7 ++++++- lib/msun/powerpc/fenv.h | 5 ++++- lib/msun/riscv/fenv.c | 7 ++++++- lib/msun/riscv/fenv.h | 5 ++++- lib/msun/x86/fenv.h | 7 +++++-- 11 files changed, 58 insertions(+), 13 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f13155c57c1f2e6ad7b3a84f630daf1c31a4ae7f commit f13155c57c1f2e6ad7b3a84f630daf1c31a4ae7f Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-29 01:27:30 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-04-05 07:47:10 +0000 msun/riscv: convert fenv functions to proper linkage PR: 277958 (cherry picked from commit 6b89f5360f8441ffd1a3e8db7375ed3ccdba7d2a) lib/msun/riscv/fenv.c | 84 +++++++++++++++++++++++++++++++++++++++++++-------- lib/msun/riscv/fenv.h | 51 +++++++++++++++++++++++-------- 2 files changed, 110 insertions(+), 25 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=faca80fb6688f0203544f6bf854092f0383cf436 commit faca80fb6688f0203544f6bf854092f0383cf436 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-29 03:10:18 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-04-05 07:47:10 +0000 msun/arm: convert fenv functions to proper linkage PR: 277958 (cherry picked from commit 70674434e2424d61262322702d0415e54d8cc1a2) lib/msun/arm/fenv.c | 133 +++++++++++++++++++++++++++++++++++++++++----------- lib/msun/arm/fenv.h | 58 ++++++++++++++++++----- 2 files changed, 150 insertions(+), 41 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2d81a953ca54309235e136f5ea6766f08e48a6ca commit 2d81a953ca54309235e136f5ea6766f08e48a6ca Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-29 02:06:02 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-04-05 07:47:10 +0000 msun/powerpc: convert fenv functions to proper linkage PR: 277958 (cherry picked from commit e4505a58a77f6f4f2df60d26ea99710af6c6b3cf) lib/msun/powerpc/fenv.c | 89 ++++++++++++++++++++++++++++++++++++++++--------- lib/msun/powerpc/fenv.h | 51 +++++++++++++++++++++------- 2 files changed, 112 insertions(+), 28 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=60b5183a76a16fcfa5004228ca1c860e237476c1 commit 60b5183a76a16fcfa5004228ca1c860e237476c1 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-03-28 22:36:55 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-04-05 07:47:10 +0000 msun/x86: convert rest of the extern inline fenv functions to proper linkage PR: 277958 (cherry picked from commit 5bc64b7d417dd1f105755e093f8e807bcdc2a666) lib/msun/amd64/fenv.c | 32 +++++++++++++++++++++++++++----- lib/msun/i387/fenv.c | 32 +++++++++++++++++++++++++++----- lib/msun/x86/fenv.h | 29 ++++++++++++++++++++--------- 3 files changed, 74 insertions(+), 19 deletions(-)
^Triage: set mfc-stable14? flag. Please just close if no MFC desired.