Makefile (98817a84ff1c755c347ac633ff017a623a631fad) Makefile (893ab00439a45513cae55781fc8e3b7108ee1cda)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Building vDSO images for x86.
4#
5
6# Absolute relocation type $(ARCH_REL_TYPE_ABS) needs to be defined before
7# the inclusion of generic Makefile.
8ARCH_REL_TYPE_ABS := R_X86_64_JUMP_SLOT|R_X86_64_GLOB_DAT|R_X86_64_RELATIVE|

--- 68 unchanged lines hidden (view full) ---

77$(obj)/vdso-image-%.c: $(obj)/vdso%.so.dbg $(obj)/vdso%.so $(obj)/vdso2c FORCE
78 $(call if_changed,vdso2c)
79
80#
81# Don't omit frame pointers for ease of userspace debugging, but do
82# optimize sibling calls.
83#
84CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \
1# SPDX-License-Identifier: GPL-2.0
2#
3# Building vDSO images for x86.
4#
5
6# Absolute relocation type $(ARCH_REL_TYPE_ABS) needs to be defined before
7# the inclusion of generic Makefile.
8ARCH_REL_TYPE_ABS := R_X86_64_JUMP_SLOT|R_X86_64_GLOB_DAT|R_X86_64_RELATIVE|

--- 68 unchanged lines hidden (view full) ---

77$(obj)/vdso-image-%.c: $(obj)/vdso%.so.dbg $(obj)/vdso%.so $(obj)/vdso2c FORCE
78 $(call if_changed,vdso2c)
79
80#
81# Don't omit frame pointers for ease of userspace debugging, but do
82# optimize sibling calls.
83#
84CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \
85 $(filter -g%,$(KBUILD_CFLAGS)) $(call cc-option, -fno-stack-protector) \
85 $(filter -g%,$(KBUILD_CFLAGS)) -fno-stack-protector \
86 -fno-omit-frame-pointer -foptimize-sibling-calls \
87 -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
88
89ifdef CONFIG_RETPOLINE
90ifneq ($(RETPOLINE_VDSO_CFLAGS),)
91 CFL += $(RETPOLINE_VDSO_CFLAGS)
92endif
93endif

--- 52 unchanged lines hidden (view full) ---

146
147KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
148KBUILD_CFLAGS_32 := $(filter-out -mcmodel=kernel,$(KBUILD_CFLAGS_32))
149KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32))
150KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32))
151KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32))
152KBUILD_CFLAGS_32 := $(filter-out $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS_32))
153KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic
86 -fno-omit-frame-pointer -foptimize-sibling-calls \
87 -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
88
89ifdef CONFIG_RETPOLINE
90ifneq ($(RETPOLINE_VDSO_CFLAGS),)
91 CFL += $(RETPOLINE_VDSO_CFLAGS)
92endif
93endif

--- 52 unchanged lines hidden (view full) ---

146
147KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
148KBUILD_CFLAGS_32 := $(filter-out -mcmodel=kernel,$(KBUILD_CFLAGS_32))
149KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32))
150KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32))
151KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32))
152KBUILD_CFLAGS_32 := $(filter-out $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS_32))
153KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic
154KBUILD_CFLAGS_32 += $(call cc-option, -fno-stack-protector)
154KBUILD_CFLAGS_32 += -fno-stack-protector
155KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)
156KBUILD_CFLAGS_32 += -fno-omit-frame-pointer
157KBUILD_CFLAGS_32 += -DDISABLE_BRANCH_PROFILING
158
159ifdef CONFIG_RETPOLINE
160ifneq ($(RETPOLINE_VDSO_CFLAGS),)
161 KBUILD_CFLAGS_32 += $(RETPOLINE_VDSO_CFLAGS)
162endif

--- 51 unchanged lines hidden ---
155KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)
156KBUILD_CFLAGS_32 += -fno-omit-frame-pointer
157KBUILD_CFLAGS_32 += -DDISABLE_BRANCH_PROFILING
158
159ifdef CONFIG_RETPOLINE
160ifneq ($(RETPOLINE_VDSO_CFLAGS),)
161 KBUILD_CFLAGS_32 += $(RETPOLINE_VDSO_CFLAGS)
162endif

--- 51 unchanged lines hidden ---