Mercurial > mxe-octave
diff src/native-gcc-1-canadian-cross.patch @ 5849:bf01dad4e460
GCC: Update to version 11.2.
* src/build-gcc.mk, src/native-gcc.mk: Update version and checksum.
* src/native-gcc-1-canadian-cross.patch: Add patch to fix Canadian cross
compilation.
* dist-files.mk: Add new file to list.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 14 Aug 2021 11:30:24 +0200 |
parents | |
children | ba8999e1f3b5 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/native-gcc-1-canadian-cross.patch Sat Aug 14 11:30:24 2021 +0200 @@ -0,0 +1,42 @@ +See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017#c12 + +diff --git a/libstdc++-v3/include/c_compatibility/fenv.h b/libstdc++-v3/include/c_compatibility/fenv.h +index 0413e3b7c25..56cabaa3635 100644 +--- a/libstdc++-v3/include/c_compatibility/fenv.h ++++ b/libstdc++-v3/include/c_compatibility/fenv.h +@@ -26,6 +26,10 @@ + * This is a Standard C++ Library header. + */ + ++#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS ++# include_next <fenv.h> ++#else ++ + #ifndef _GLIBCXX_FENV_H + #define _GLIBCXX_FENV_H 1 + +@@ -83,3 +83,5 @@ namespace std + #endif // C++11 + + #endif // _GLIBCXX_FENV_H ++ ++#endif // include_next + +diff --git a/libstdc++-v3/include/c_global/cfenv b/libstdc++-v3/include/c_global/cfenv +index 0b0ec35a837..d24cb1a3c81 100644 +--- a/libstdc++-v3/include/c_global/cfenv ++++ b/libstdc++-v3/include/c_global/cfenv +@@ -37,9 +37,11 @@ + + #include <bits/c++config.h> + +-#if _GLIBCXX_HAVE_FENV_H +-# include <fenv.h> +-#endif ++// Need to ensure this finds the C library's <fenv.h> not a libstdc++ ++// wrapper that might already be installed later in the include search path. ++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS ++#include_next <fenv.h> ++#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + + #ifdef _GLIBCXX_USE_C99_FENV_TR1