From 1c7a27ce42afd973ef9e772dec5c50a56b706221 Mon Sep 17 00:00:00 2001 From: Sergey Bogolepov Date: Thu, 22 Jul 2021 20:33:15 +0700 Subject: [PATCH] [K/N] Fix mxgot flag for MIPS It was dropped from cc1 interface, so use -target-feature +xgot instead. --- kotlin-native/konan/konan.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kotlin-native/konan/konan.properties b/kotlin-native/konan/konan.properties index 9a395021071..7213bc8e5fb 100644 --- a/kotlin-native/konan/konan.properties +++ b/kotlin-native/konan/konan.properties @@ -682,8 +682,8 @@ linkerKonanFlags.linux_mips32 = -Bstatic -lstdc++ -Bdynamic -ldl -lm -lpthread \ libGcc.linux_mips32 = ../../lib/gcc/mips-unknown-linux-gnu/8.3.0 targetCpu.linux_mips32 = mips32r2 # 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 +# See https://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html about mxgot (aka -target-feature +xgot). +clangFlags.linux_mips32 = -cc1 -emit-obj -disable-llvm-optzns -x ir -target-cpu $targetCpu.linux_mips32 -target-feature +xgot clangNooptFlags.linux_mips32 = -O1 clangOptFlags.linux_mips32 = -O3 -ffunction-sections clangDebugFlags.linux_mips32 = -O0 @@ -722,7 +722,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 -mllvm -mxgot +clangFlags.linux_mipsel32 = -cc1 -emit-obj -disable-llvm-optzns -x ir -target-cpu $targetCpu.linux_mipsel32 -target-feature +xgot clangNooptFlags.linux_mipsel32 = -O1 clangOptFlags.linux_mipsel32 = -O3 -ffunction-sections clangDebugFlags.linux_mipsel32 = -O0