File: 0002-Add-missing-WORDS_BIGENDIAN-definition.patch

package info (click to toggle)
grcompiler 5.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,076 kB
  • sloc: cpp: 48,200; ansic: 7,669; sh: 4,427; makefile: 198; xml: 190; perl: 127; sed: 21
file content (22 lines) | stat: -rw-r--r-- 763 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Bastian Germann <bastiangermann@fishpost.de>
Date: Mon, 24 Oct 2022 00:23:33 +0200
Forwarded: https://github.com/silnrsi/grcompiler/pull/46
Subject: Add missing WORDS_BIGENDIAN definition

Fixes #45 Test failures on big endian architectures
---
 compiler/Generic/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler/Generic/CMakeLists.txt b/compiler/Generic/CMakeLists.txt
index 7aaca54..f73816d 100644
--- a/compiler/Generic/CMakeLists.txt
+++ b/compiler/Generic/CMakeLists.txt
@@ -4,6 +4,7 @@ if  (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
 endif()
 
 add_library(generic STATIC Platform.cpp)
+target_compile_definitions(generic PUBLIC $<${BIGENDIAN_SYSTEM}:WORDS_BIGENDIAN>)
 add_definitions(-DGR_NAMESPACE)
 
 if (Iconv_FOUND)