From 1c23321d03a48558b02c2faf818b82811b8ab11d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 10 Feb 2022 21:47:18 -0700 Subject: [PATCH] stage1: fix softfloat not getting correct endianness needed to include platform.h in more places so that LITTLEENDIAN will be defined appropriately. closes #10860 --- CMakeLists.txt | 3 +++ deps/SoftFloat-3e/source/include/primitiveTypes.h | 1 + deps/SoftFloat-3e/source/include/softfloat_types.h | 1 + 3 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fd1960518..a6edfa04ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -791,6 +791,9 @@ add_library(opt_c_util STATIC ${OPTIMIZED_C_SOURCES}) set_target_properties(opt_c_util PROPERTIES COMPILE_FLAGS "${OPTIMIZED_C_FLAGS}" ) +target_include_directories(opt_c_util PRIVATE + "${CMAKE_SOURCE_DIR}/deps/SoftFloat-3e-prebuilt" +) add_library(zigstage1 STATIC ${STAGE1_SOURCES}) set_target_properties(zigstage1 PROPERTIES diff --git a/deps/SoftFloat-3e/source/include/primitiveTypes.h b/deps/SoftFloat-3e/source/include/primitiveTypes.h index a4a6dd11c6..4407f5e7cb 100644 --- a/deps/SoftFloat-3e/source/include/primitiveTypes.h +++ b/deps/SoftFloat-3e/source/include/primitiveTypes.h @@ -37,6 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef primitiveTypes_h #define primitiveTypes_h 1 +#include "platform.h" #include #ifdef SOFTFLOAT_FAST_INT64 diff --git a/deps/SoftFloat-3e/source/include/softfloat_types.h b/deps/SoftFloat-3e/source/include/softfloat_types.h index bc30e31440..27507741af 100644 --- a/deps/SoftFloat-3e/source/include/softfloat_types.h +++ b/deps/SoftFloat-3e/source/include/softfloat_types.h @@ -37,6 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef softfloat_types_h #define softfloat_types_h 1 +#include "platform.h" #include /*----------------------------------------------------------------------------