diff -ur openmp-5.0.1.src.orig/runtime/src/kmp_affinity.h openmp-5.0.1.src/runtime/src/kmp_affinity.h --- openmp-5.0.1.src.orig/runtime/src/kmp_affinity.h 2017-07-18 08:30:03.000000000 -0000 +++ openmp-5.0.1.src/runtime/src/kmp_affinity.h 2018-01-31 10:06:34.391880020 -0000 @@ -195,6 +195,19 @@ #error Wrong code for getaffinity system call. #endif /* __NR_sched_getaffinity */ #elif KMP_ARCH_X86_64 +#if __ILP32__ +#define __X32_SYSCALL_BIT 0x40000000 +#ifndef __NR_sched_setaffinity +#define __NR_sched_setaffinity (__X32_SYSCALL_BIT + 203) +#elif __NR_sched_setaffinity != (__X32_SYSCALL_BIT + 203) +#error Wrong code for setaffinity system call. +#endif /* __NR_sched_setaffinity */ +#ifndef __NR_sched_getaffinity +#define __NR_sched_getaffinity (__X32_SYSCALL_BIT + 204) +#elif __NR_sched_getaffinity != (__X32_SYSCALL_BIT + 204) +#error Wrong code for getaffinity system call. +#endif /* __NR_sched_getaffinity */ +#else #ifndef __NR_sched_setaffinity #define __NR_sched_setaffinity 203 #elif __NR_sched_setaffinity != 203 @@ -205,6 +218,7 @@ #elif __NR_sched_getaffinity != 204 #error Wrong code for getaffinity system call. #endif /* __NR_sched_getaffinity */ +#endif #elif KMP_ARCH_PPC64 #ifndef __NR_sched_setaffinity #define __NR_sched_setaffinity 222 diff -ur v2/openmp-5.0.1.src/runtime/cmake/LibompMicroTests.cmake v3/openmp-5.0.1.src/runtime/cmake/LibompMicroTests.cmake --- v2/openmp-5.0.1.src/runtime/cmake/LibompMicroTests.cmake 2016-12-08 10:22:24.000000000 +0100 +++ v3/openmp-5.0.1.src/runtime/cmake/LibompMicroTests.cmake 2018-02-01 12:31:04.197012825 +0100 @@ -198,6 +198,7 @@ elseif(${INTEL64}) libomp_append(libomp_expected_library_deps libc.so.6) libomp_append(libomp_expected_library_deps ld-linux-x86-64.so.2) + libomp_append(libomp_expected_library_deps ld-linux-x32.so.2) elseif(${ARM}) libomp_append(libomp_expected_library_deps libc.so.6) libomp_append(libomp_expected_library_deps libffi.so.6) diff -ur v2/openmp-5.0.1.src/runtime/src/kmp_os.h v3/openmp-5.0.1.src/runtime/src/kmp_os.h --- v2/openmp-5.0.1.src/runtime/src/kmp_os.h 2017-07-18 22:31:19.000000000 +0200 +++ v3/openmp-5.0.1.src/runtime/src/kmp_os.h 2018-02-01 13:09:17.486431486 +0100 @@ -155,7 +155,7 @@ #error "Can't determine size_t printf format specifier." #endif -#if KMP_ARCH_X86 +#if KMP_ARCH_X86 || ( KMP_ARCH_X86_64 && __ILP32__ ) #define KMP_SIZE_T_MAX (0xFFFFFFFF) #else #define KMP_SIZE_T_MAX (0xFFFFFFFFFFFFFFFF)