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 8fd19605187cd4217b445eb13c98219d35d4278c..a6edfa04ac930b99c370b8493f3b48235aa86724 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 a4a6dd11c65c4d5940f2684713154a7f9b29f2ea..4407f5e7cb0614434b74ce187c948dffc7223d4e 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 bc30e31440667fce3019797398efef9de1a65b5b..27507741af4790ecc48f1b2f10b55b201fd4a8bc 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 /*---------------------------------------------------------------------------- -- 2.54.0