GNOME Bugzilla – Bug 787248
Fix preprocessor syntax for BE builds
Last modified: 2017-09-04 14:23:53 UTC
MY_CPU_BE expands to an empty token sequence, so defined (MY_CPU_BE) has to be used in this context. This code is only reachable for s390x, ppc64 sets MY_CPU_NAME earlier. This fixes a build failure on some arches (s390x). Original patch by Florian Weimer in Fedora, forwarded upstream at https://sourceforge.net/p/sevenzip/patches/317/
Created attachment 359071 [details] [review] Fix preprocessor syntax for BE builds
*** Bug 787086 has been marked as a duplicate of this bug. ***
Created attachment 359082 [details] [review] unarr: Fix build on s390x On some big-endian arches (where MY_CPU_NAME doesn't get set), there is a preprocessor syntax error. It results in build failures like this: In file included from rar/../lzmasdk/Ppmd.h:8:0, from rar/../lzmasdk/Ppmd7.h:12, from rar/rar.h:10, from rar/rar.c:4: rar/../lzmasdk/CpuArch.h:177:18: error: #elif with no expression #elif MY_CPU_BE ^ In file included from rar/../lzmasdk/Ppmd.h:8:0, from rar/../lzmasdk/Ppmd7.h:12, from rar/rar.h:10, from rar/uncompress-rar.c:7: rar/../lzmasdk/CpuArch.h:177:18: error: #elif with no expression #elif MY_CPU_BE ^ With help from Iain Lane <iain@orangesquash.org.uk> See https://sourceforge.net/p/sevenzip/patches/317/
Attachment 359082 [details] pushed as 0e70019 - unarr: Fix build on s390x