Skip to content

Commit a03cd76

Browse files
committed
xtensa: don't produce FDPIC output with fdpic toolchain
The kernel doesn't use features of the FDPIC toolchain, disable FDPIC code generation when using such toolchain and select ordinary ELF linker emulation. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
1 parent 791beae commit a03cd76

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/xtensa/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,19 @@ KBUILD_CFLAGS += -ffreestanding -D__linux__
3535
KBUILD_CFLAGS += -pipe -mlongcalls -mtext-section-literals
3636
KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,)
3737
KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,)
38+
KBUILD_CFLAGS += $(call cc-option,-mno-fdpic,)
3839
ifneq ($(CONFIG_KERNEL_ABI_CALL0),)
3940
KBUILD_CFLAGS += -mabi=call0
4041
KBUILD_AFLAGS += -mabi=call0
4142
endif
4243

4344
KBUILD_AFLAGS += -mlongcalls -mtext-section-literals
45+
KBUILD_AFLAGS += $(call cc-option,-mno-fdpic,)
46+
47+
KBUILD_LDFLAGS += -m elf32xtensa
4448

4549
ifneq ($(CONFIG_LD_NO_RELAX),)
46-
KBUILD_LDFLAGS := --no-relax
50+
KBUILD_LDFLAGS += --no-relax
4751
endif
4852

4953
CHECKFLAGS += -D$(if $(CONFIG_CPU_BIG_ENDIAN),__XTENSA_EB__,__XTENSA_EL__)

0 commit comments

Comments
 (0)