Re: [PATCH 1/1] Fixed fast_float build error in NEWLIB

2022-01-18 Thread Jonathan Wakely via Gcc-patches
On Tue, 18 Jan 2022 at 09:05, LiaoShihua wrote:

>
> When I built riscv-gcc with newlib, it will be terminated with message
> "fatal error: endian.h: No such file or directory".
> So, fixed it in fast_float.h.
>

> libstdc++-v3\ChangeLog:
>

N.B. you need to use a forward slash here, not backslash.

>
> * src/c++17/fast_float/fast_float.h (defined):fast_float.h will
> include  with using newlib
>

(defined) is not the right component name here.

But I fixed it differently anyway, see PR 104080.


[PATCH 1/1] Fixed fast_float build error in NEWLIB

2022-01-18 Thread shihua
From: LiaoShihua 

When I built riscv-gcc with newlib, it will be terminated with message "fatal 
error: endian.h: No such file or directory".
So, fixed it in fast_float.h.

libstdc++-v3\ChangeLog:

* src/c++17/fast_float/fast_float.h (defined):fast_float.h will include 
 with using newlib

---
 libstdc++-v3/src/c++17/fast_float/fast_float.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/src/c++17/fast_float/fast_float.h 
b/libstdc++-v3/src/c++17/fast_float/fast_float.h
index 97d28940944..0308f7b35af 100644
--- a/libstdc++-v3/src/c++17/fast_float/fast_float.h
+++ b/libstdc++-v3/src/c++17/fast_float/fast_float.h
@@ -131,7 +131,7 @@ from_chars_result from_chars_advanced(const char *first, 
const char *last,
 #ifdef _WIN32
 #define FASTFLOAT_IS_BIG_ENDIAN 0
 #else
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NEWLIB__)
 #include 
 #elif defined(sun) || defined(__sun)
 #include 
-- 
2.31.1.windows.1