Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0
upx
upx-endiantests.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File upx-endiantests.patch of Package upx
--- src/miniacc.h | 53 ++++------------------------------------- src/stub/tools/sstrip/sstrip.c | 4 +-- 2 files changed, 8 insertions(+), 49 deletions(-) Index: upx-3.94-src/src/miniacc.h =================================================================== --- upx-3.94-src.orig/src/miniacc.h +++ upx-3.94-src/src/miniacc.h @@ -2503,53 +2503,12 @@ ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEO # undef ACC_ABI_BIG_ENDIAN # undef ACC_ABI_LITTLE_ENDIAN #elif !(ACC_ABI_BIG_ENDIAN) && !(ACC_ABI_LITTLE_ENDIAN) -#if (ACC_ARCH_ALPHA) && (ACC_ARCH_CRAY_MPP) -# define ACC_ABI_BIG_ENDIAN 1 -#elif (ACC_ARCH_IA64) && (ACC_OS_POSIX_LINUX || ACC_OS_WIN64) -# define ACC_ABI_LITTLE_ENDIAN 1 -#elif (ACC_ARCH_ALPHA || ACC_ARCH_AMD64 || ACC_ARCH_BLACKFIN || ACC_ARCH_CRIS || ACC_ARCH_I086 || ACC_ARCH_I386 || ACC_ARCH_MSP430 || ACC_ARCH_RISCV) -# define ACC_ABI_LITTLE_ENDIAN 1 -#elif (ACC_ARCH_AVR32 || ACC_ARCH_M68K || ACC_ARCH_S390 || ACC_ARCH_SPU) -# define ACC_ABI_BIG_ENDIAN 1 -#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) -# if (__LITTLE_ENDIAN__ == 1) -# define ACC_ABI_LITTLE_ENDIAN 1 -# else -# define ACC_ABI_BIG_ENDIAN 1 -# endif -#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) -# define ACC_ABI_BIG_ENDIAN 1 -#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) -# define ACC_ABI_LITTLE_ENDIAN 1 -#elif 1 && (ACC_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) -# define ACC_ABI_BIG_ENDIAN 1 -#elif 1 && (ACC_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) -# define ACC_ABI_BIG_ENDIAN 1 -#elif 1 && (ACC_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) -# define ACC_ABI_LITTLE_ENDIAN 1 -#elif 1 && (ACC_ARCH_ARM) && defined(_MSC_VER) && defined(_WIN32) -# define ACC_ABI_LITTLE_ENDIAN 1 -#elif 1 && (ACC_ARCH_ARM && ACC_CC_ARMCC_ARMCC) -# if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) -# error "unexpected configuration - check your compiler defines" -# elif defined(__BIG_ENDIAN) -# define ACC_ABI_BIG_ENDIAN 1 -# else -# define ACC_ABI_LITTLE_ENDIAN 1 -# endif -# define ACC_ABI_LITTLE_ENDIAN 1 -#elif 1 && (ACC_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) -# define ACC_ABI_BIG_ENDIAN 1 -#elif 1 && (ACC_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__) -# define ACC_ABI_BIG_ENDIAN 1 -#elif 1 && (ACC_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__) -# define ACC_ABI_LITTLE_ENDIAN 1 -#elif 1 && (ACC_ARCH_ARM64) && defined(_MSC_VER) && defined(_WIN32) -# define ACC_ABI_LITTLE_ENDIAN 1 -#elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) -# define ACC_ABI_BIG_ENDIAN 1 -#elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) -# define ACC_ABI_LITTLE_ENDIAN 1 +# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define ACC_ABI_LITTLE_ENDIAN 1 +# elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define ACC_ABI_BIG_ENDIAN 1 +#else +# error unknown endianess WTF! #endif #endif #if (ACC_ABI_BIG_ENDIAN) && (ACC_ABI_LITTLE_ENDIAN) Index: upx-3.94-src/src/stub/tools/sstrip/sstrip.c =================================================================== --- upx-3.94-src.orig/src/stub/tools/sstrip/sstrip.c +++ upx-3.94-src/src/stub/tools/sstrip/sstrip.c @@ -331,14 +331,14 @@ static int readelfheaderident(int fd, El /* Compare the file's class and endianness with the program's. */ -#if __BYTE_ORDER == __LITTLE_ENDIAN +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) { do_reverse_endian = 0; } else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) { /* fprintf(stderr, "ELF file has different endianness.\n"); */ do_reverse_endian = 1; } -#elif __BYTE_ORDER == __BIG_ENDIAN +#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) { /* fprintf(stderr, "ELF file has different endianness.\n"); */ do_reverse_endian = 1;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor