summaryrefslogtreecommitdiff
path: root/games-engines/scummvm-tools/files/scummvm-tools-2.7.0-endianess.patch
diff options
context:
space:
mode:
Diffstat (limited to 'games-engines/scummvm-tools/files/scummvm-tools-2.7.0-endianess.patch')
-rw-r--r--games-engines/scummvm-tools/files/scummvm-tools-2.7.0-endianess.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/games-engines/scummvm-tools/files/scummvm-tools-2.7.0-endianess.patch b/games-engines/scummvm-tools/files/scummvm-tools-2.7.0-endianess.patch
new file mode 100644
index 000000000000..6752914d2c2b
--- /dev/null
+++ b/games-engines/scummvm-tools/files/scummvm-tools-2.7.0-endianess.patch
@@ -0,0 +1,27 @@
+# https://src.fedoraproject.org/rpms/scummvm-tools/raw/rawhide/f/configure.patch
+diff -uNr scummvm-tools-2.5.0.old/configure scummvm-tools-2.5.0/configure
+--- scummvm-tools-2.5.0.old/configure 2021-10-01 13:59:48.000000000 +0200
++++ scummvm-tools-2.5.0/configure 2021-12-14 23:01:39.604582839 +0100
+@@ -1047,15 +1047,15 @@
+ #
+ echo_n "Checking endianness... "
+ cat > tmp_endianness_check.cpp << EOF
+-unsigned short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+-unsigned short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+-void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
+-unsigned short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+-unsigned short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+-void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
++__attribute__ ((used)) unsigned short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
++__attribute__ ((used)) unsigned short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
++__attribute__ ((used)) void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
++__attribute__ ((used)) unsigned short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
++__attribute__ ((used)) unsigned short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
++__attribute__ ((used)) void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
+ int main() { _ascii (); _ebcdic (); return 0; }
+ EOF
+-$CXX $CXXFLAGS -c -o $TMPO.o tmp_endianness_check.cpp
++$CXX $CXXFLAGS -ffat-lto-objects -c -o $TMPO.o tmp_endianness_check.cpp
+ if $_strings $TMPO.o | grep BIGenDianSyS >/dev/null; then
+ _endian=big
+ elif $_strings $TMPO.o | grep LiTTleEnDian >/dev/null; then