Commit 1c23321d03

Andrew Kelley <andrew@ziglang.org>
2022-02-11 05:47:18
stage1: fix softfloat not getting correct endianness
needed to include platform.h in more places so that LITTLEENDIAN will be defined appropriately. closes #10860
1 parent 166db1a
Changed files (3)
deps
SoftFloat-3e
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 <stdint.h>
 
 #ifdef SOFTFLOAT_FAST_INT64
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 <stdint.h>
 
 /*----------------------------------------------------------------------------
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