blob: 77f70b969d1439a71c8b4f44c42083de46a40b0f [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Al Viro6582b7f2011-08-18 20:03:19 +01002#
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
Peter Zijlstra9a938482017-02-02 14:43:51 +010012obj-y = bugs_$(BITS).o delay.o fault.o ldt.o \
Al Virof67aa2f2011-08-18 20:10:39 +010013 ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \
Al Viro5b3eb3a2012-12-25 19:14:55 -050014 stub_$(BITS).o stub_segv.o \
Al Viro5c48b102011-08-18 20:06:39 +010015 sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \
16 mem_$(BITS).o subarch.o os-$(OS)/
Al Viro6582b7f2011-08-18 20:03:19 +010017
18ifeq ($(CONFIG_X86_32),y)
19
Kyle Huey79170fd2017-03-20 01:16:24 -070020obj-y += checksum_32.o syscalls_32.o
Mickaël Salaün42d91f62015-12-24 13:12:11 +010021obj-$(CONFIG_ELF_CORE) += elfcore.o
Al Viro6582b7f2011-08-18 20:03:19 +010022
Al Viro5c48b102011-08-18 20:06:39 +010023subarch-y = ../lib/string_32.o ../lib/atomic64_32.o ../lib/atomic64_cx8_32.o
Brian Gerst121b32a2020-03-13 15:51:41 -040024subarch-y += ../kernel/sys_ia32.o
Al Viro6582b7f2011-08-18 20:03:19 +010025
26else
27
Al Viro5b3eb3a2012-12-25 19:14:55 -050028obj-y += syscalls_64.o vdso/
Al Viro6582b7f2011-08-18 20:03:19 +010029
Waiman Long46ad0842019-03-22 10:30:06 -040030subarch-y = ../lib/csum-partial_64.o ../lib/memcpy_64.o ../entry/thunk_64.o
Al Viro6582b7f2011-08-18 20:03:19 +010031
32endif
33
Al Viro5c48b102011-08-18 20:06:39 +010034subarch-$(CONFIG_MODULES) += ../kernel/module.o
Al Viro6582b7f2011-08-18 20:03:19 +010035
36USER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o
37
H. Peter Anvin45db1c62011-12-05 16:08:49 -080038$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \
39 -Iarch/x86/include/generated
Masahiro Yamada2c667d72018-12-22 18:50:34 +090040targets += user-offsets.s
Al Viro6582b7f2011-08-18 20:03:19 +010041
Masahiro Yamada65bba042018-11-29 11:58:50 +090042include/generated/user_constants.h: $(obj)/user-offsets.s
43 $(call filechk,offsets,__USER_CONSTANT_H__)
44
Al Viro6582b7f2011-08-18 20:03:19 +010045UNPROFILE_OBJS := stub_segv.o
46CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING)
47
48include arch/um/scripts/Makefile.rules