xref: /openbmc/linux/arch/x86/um/Makefile (revision d32df108)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4#
5
6ifeq ($(CONFIG_X86_32),y)
7	BITS := 32
8else
9	BITS := 64
10endif
11
12obj-y = bugs_$(BITS).o delay.o fault.o ldt.o \
13	ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \
14	stub_$(BITS).o stub_segv.o \
15	sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \
16	mem_$(BITS).o subarch.o os-Linux/
17
18ifeq ($(CONFIG_X86_32),y)
19
20obj-y += syscalls_32.o
21obj-$(CONFIG_ELF_CORE) += elfcore.o
22
23subarch-y = ../lib/string_32.o ../lib/atomic64_32.o ../lib/atomic64_cx8_32.o
24subarch-y += ../lib/cmpxchg8b_emu.o ../lib/atomic64_386_32.o
25subarch-y += ../lib/checksum_32.o
26subarch-y += ../kernel/sys_ia32.o
27
28else
29
30obj-y += syscalls_64.o vdso/
31
32subarch-y = ../lib/csum-partial_64.o ../lib/memcpy_64.o \
33	../lib/memmove_64.o ../lib/memset_64.o
34subarch-$(CONFIG_PREEMPTION) += ../entry/thunk_64.o
35
36endif
37
38subarch-$(CONFIG_MODULES) += ../kernel/module.o
39
40USER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o
41
42$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \
43	-Iarch/x86/include/generated
44targets += user-offsets.s
45
46include/generated/user_constants.h: $(obj)/user-offsets.s FORCE
47	$(call filechk,offsets,__USER_CONSTANT_H__)
48
49UNPROFILE_OBJS := stub_segv.o
50CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING)
51
52include $(srctree)/arch/um/scripts/Makefile.rules
53