summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/nolibc/Makefile
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-11-08 21:14:43 +0300
committerThomas Weißschuh <linux@weissschuh.net>2023-12-12 00:38:30 +0300
commit544102458a8d1c33f9f5f99f9bda8e2b858bcb10 (patch)
tree5e821833ba97448624f312e81592249cbd29b060 /tools/testing/selftests/nolibc/Makefile
parent8bcf9a485541fe0079483162496db1add932689b (diff)
downloadlinux-544102458a8d1c33f9f5f99f9bda8e2b858bcb10.tar.xz
tools/nolibc: mips: add support for PIC
MIPS requires some extra instructions to set up the $gp register for the with a pointer to the global data area. This isn't needed for non-PIC builds, but this patch enables the code unconditionally to prevent bitrot. Also enable PIC in one of the test configurations for ongoing validation. Link: https://lore.kernel.org/r/20231108-nolibc-pic-v2-1-4fb0d6284757@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/testing/selftests/nolibc/Makefile')
-rw-r--r--tools/testing/selftests/nolibc/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 47f0fb52fe55..40dd95228051 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -147,7 +147,7 @@ CFLAGS_ppc = -m32 -mbig-endian -mno-vsx $(call cc-option,-mmultiple)
CFLAGS_ppc64 = -m64 -mbig-endian -mno-vsx $(call cc-option,-mmultiple)
CFLAGS_ppc64le = -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=elfv2)
CFLAGS_s390 = -m64
-CFLAGS_mips32le = -EL -mabi=32
+CFLAGS_mips32le = -EL -mabi=32 -fPIC
CFLAGS_mips32be = -EB -mabi=32
CFLAGS_STACKPROTECTOR ?= $(call cc-option,-mstack-protector-guard=global $(call cc-option,-fstack-protector-all))
CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -W -Wall -Wextra \