>From 609cef6c863633711418c6b23401069062ac5df8 Mon Sep 17 00:00:00 2001 From: expnkx <unlv...@live.com> Date: Wed, 14 Apr 2021 01:48:38 -0400 Subject: [PATCH] Fix freestanding cstdint which fails to detect stdint.h [PR100057]
Configure script cannot find cstdint when we build in freestanding environment since there are no stdint.h header file. However when we try to #include<stdint.h> directly, it works by indirectly #include<stdint-wrap.h> which has been fixed by me if the _GLIBCXX_HOSTED_ is defined as 0 The last patch is still required, this is to fix another issue. libstdc++-v3/ChangeLog; PR libstdc++/100057 * libstdc++/include/c_global/cstdint: Always #include<stdint.h> if _GLIBCXX_HOSTED_ == 0. --- libstdc++-v3/include/c_global/cstdint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/c_global/cstdint b/libstdc++-v3/include/c_global/cstdint index fa4d0fb900c..cb88e21db17 100644 --- a/libstdc++-v3/include/c_global/cstdint +++ b/libstdc++-v3/include/c_global/cstdint @@ -37,7 +37,7 @@ #include <bits/c++config.h> -#if _GLIBCXX_HAVE_STDINT_H +#if !_GLIBCXX_HOSTED || _GLIBCXX_HAVE_STDINT_H # include <stdint.h> #endif -- 2.25.1