diff --git a/kotlin-native/konan/konan.properties b/kotlin-native/konan/konan.properties index 152be800d67..2404950378e 100644 --- a/kotlin-native/konan/konan.properties +++ b/kotlin-native/konan/konan.properties @@ -574,7 +574,9 @@ linkerKonanFlags.linux_mips32 = -Bstatic -lstdc++ -Bdynamic -ldl -lm -lpthread \ # targetSysroot-relative. libGcc.linux_mips32 = ../../lib/gcc/mips-unknown-linux-gnu/8.3.0 targetCpu.linux_mips32 = mips32r2 -clangFlags.linux_mips32 = -cc1 -emit-obj -disable-llvm-optzns -x ir -target-cpu $targetCpu.linux_mips32 +# We generate a single binary with a big GOT. It causes problems for MIPS. +# See https://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html about mxgot. +clangFlags.linux_mips32 = -cc1 -emit-obj -disable-llvm-optzns -x ir -target-cpu $targetCpu.linux_mips32 -mllvm -mxgot clangNooptFlags.linux_mips32 = -O1 clangOptFlags.linux_mips32 = -O3 -ffunction-sections clangDebugFlags.linux_mips32 = -O0 @@ -614,7 +616,7 @@ linkerKonanFlags.linux_mipsel32 = -Bstatic -lstdc++ -Bdynamic -ldl -lm -lpthread # targetSysroot-relative. libGcc.linux_mipsel32 = ../../lib/gcc/mipsel-unknown-linux-gnu/8.3.0 targetCpu.linux_mipsel32 = mips32r2 -clangFlags.linux_mipsel32 = -cc1 -emit-obj -disable-llvm-optzns -x ir -target-cpu $targetCpu.linux_mipsel32 +clangFlags.linux_mipsel32 = -cc1 -emit-obj -disable-llvm-optzns -x ir -target-cpu $targetCpu.linux_mipsel32 -mllvm -mxgot clangNooptFlags.linux_mipsel32 = -O1 clangOptFlags.linux_mipsel32 = -O3 -ffunction-sections clangDebugFlags.linux_mipsel32 = -O0