diff -urNp -x '*.orig' qtwebengine.org/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.cc qtwebengine/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.cc --- qtwebengine.org/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.cc 2021-08-13 12:36:55.000000000 +0200 +++ qtwebengine/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.cc 2021-08-14 11:13:23.606971650 +0200 @@ -21,7 +21,7 @@ namespace base { void* GetRandomPageBase() { uintptr_t random = static_cast(RandomValue()); -#if defined(ARCH_CPU_64_BITS) +#if defined(ARCH_CPU_64_BITS) && !defined(__ILP32__) random <<= 32ULL; random |= static_cast(RandomValue()); diff -urNp -x '*.orig' qtwebengine.org/src/3rdparty/chromium/base/debug/stack_trace_posix.cc qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc --- qtwebengine.org/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2021-08-13 12:36:55.000000000 +0200 +++ qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2021-08-14 11:13:23.606971650 +0200 @@ -351,7 +351,7 @@ void StackDumpSignalHandler(int signal, const char* label; greg_t value; } registers[] = { -#if ARCH_CPU_32_BITS +#if ARCH_CPU_32_BITS && !defined(__ILP32__) { " gs: ", context->uc_mcontext.gregs[REG_GS] }, { " fs: ", context->uc_mcontext.gregs[REG_FS] }, { " es: ", context->uc_mcontext.gregs[REG_ES] }, @@ -371,7 +371,7 @@ void StackDumpSignalHandler(int signal, { " efl: ", context->uc_mcontext.gregs[REG_EFL] }, { " usp: ", context->uc_mcontext.gregs[REG_UESP] }, { " ss: ", context->uc_mcontext.gregs[REG_SS] }, -#elif ARCH_CPU_64_BITS +#elif ARCH_CPU_64_BITS || defined(__ILP32__) { " r8: ", context->uc_mcontext.gregs[REG_R8] }, { " r9: ", context->uc_mcontext.gregs[REG_R9] }, { " r10: ", context->uc_mcontext.gregs[REG_R10] }, @@ -398,9 +398,9 @@ void StackDumpSignalHandler(int signal, #endif // ARCH_CPU_32_BITS }; -#if ARCH_CPU_32_BITS +#if ARCH_CPU_32_BITS && !defined(__ILP32__) const int kRegisterPadding = 8; -#elif ARCH_CPU_64_BITS +#elif ARCH_CPU_64_BITS || defined(__ILP32__) const int kRegisterPadding = 16; #endif diff -urNp -x '*.orig' qtwebengine.org/src/3rdparty/chromium/build/build_config.h qtwebengine/src/3rdparty/chromium/build/build_config.h --- qtwebengine.org/src/3rdparty/chromium/build/build_config.h 2021-08-13 12:36:55.000000000 +0200 +++ qtwebengine/src/3rdparty/chromium/build/build_config.h 2021-08-14 11:13:23.606971650 +0200 @@ -129,7 +129,11 @@ #if defined(_M_X64) || defined(__x86_64__) #define ARCH_CPU_X86_FAMILY 1 #define ARCH_CPU_X86_64 1 +#ifdef __ILP32__ +#define ARCH_CPU_32_BITS 1 +#else #define ARCH_CPU_64_BITS 1 +#endif #define ARCH_CPU_LITTLE_ENDIAN 1 #elif defined(_M_IX86) || defined(__i386__) #define ARCH_CPU_X86_FAMILY 1 diff -urNp -x '*.orig' qtwebengine.org/src/3rdparty/chromium/build/config/compiler/BUILD.gn qtwebengine/src/3rdparty/chromium/build/config/compiler/BUILD.gn --- qtwebengine.org/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2021-08-13 12:36:55.000000000 +0200 +++ qtwebengine/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2021-08-14 11:13:23.606971650 +0200 @@ -765,14 +765,7 @@ config("compiler_cpu_abi") { if ((is_posix && !is_apple) || is_fuchsia) { # CPU architecture. We may or may not be doing a cross compile now, so for # simplicity we always explicitly set the architecture. - if (current_cpu == "x64") { - cflags += [ - "-m64", - ] - ldflags += [ "-m64" ] - } else if (current_cpu == "x86") { - cflags += [ "-m32" ] - ldflags += [ "-m32" ] + if (current_cpu == "x86") { if (!is_nacl) { cflags += [ "-msse2", diff -urNp -x '*.orig' qtwebengine.org/src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h --- qtwebengine.org/src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h 2021-08-13 12:36:59.000000000 +0200 +++ qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h 2021-08-14 11:13:23.606971650 +0200 @@ -23,7 +23,11 @@ #include #if defined(OPENSSL_X86_64) +#if defined(__ILP32__) +#define EXPECTED_NR_getrandom (__X32_SYSCALL_BIT + 318) +#else #define EXPECTED_NR_getrandom 318 +#endif #elif defined(OPENSSL_X86) #define EXPECTED_NR_getrandom 355 #elif defined(OPENSSL_AARCH64) diff -urNp -x '*.orig' qtwebengine.org/src/3rdparty/chromium/v8/src/objects/bigint.cc qtwebengine/src/3rdparty/chromium/v8/src/objects/bigint.cc --- qtwebengine.org/src/3rdparty/chromium/v8/src/objects/bigint.cc 2021-08-13 12:37:04.000000000 +0200 +++ qtwebengine/src/3rdparty/chromium/v8/src/objects/bigint.cc 2021-08-14 11:13:23.606971650 +0200 @@ -2641,7 +2641,7 @@ inline BigInt::digit_t MutableBigInt::di BigInt::digit_t MutableBigInt::digit_div(digit_t high, digit_t low, digit_t divisor, digit_t* remainder) { DCHECK(high < divisor); -#if V8_TARGET_ARCH_X64 && (__GNUC__ || __clang__) +#if V8_TARGET_ARCH_X64 && (__GNUC__ || __clang__) && !defined(__ILP32__) digit_t quotient; digit_t rem; __asm__("divq %[divisor]"