Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Al Viro | 6582b7f | 2011-08-18 20:03:19 +0100 | [diff] [blame] | 2 | # |
| 3 | # Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
| 4 | # |
| 5 | |
| 6 | ifeq ($(CONFIG_X86_32),y) |
| 7 | BITS := 32 |
| 8 | else |
| 9 | BITS := 64 |
| 10 | endif |
| 11 | |
Peter Zijlstra | 9a93848 | 2017-02-02 14:43:51 +0100 | [diff] [blame] | 12 | obj-y = bugs_$(BITS).o delay.o fault.o ldt.o \ |
Al Viro | f67aa2f | 2011-08-18 20:10:39 +0100 | [diff] [blame] | 13 | ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \ |
Al Viro | 5b3eb3a | 2012-12-25 19:14:55 -0500 | [diff] [blame] | 14 | stub_$(BITS).o stub_segv.o \ |
Al Viro | 5c48b10 | 2011-08-18 20:06:39 +0100 | [diff] [blame] | 15 | sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \ |
| 16 | mem_$(BITS).o subarch.o os-$(OS)/ |
Al Viro | 6582b7f | 2011-08-18 20:03:19 +0100 | [diff] [blame] | 17 | |
| 18 | ifeq ($(CONFIG_X86_32),y) |
| 19 | |
Kyle Huey | 79170fd | 2017-03-20 01:16:24 -0700 | [diff] [blame] | 20 | obj-y += checksum_32.o syscalls_32.o |
Mickaël Salaün | 42d91f6 | 2015-12-24 13:12:11 +0100 | [diff] [blame] | 21 | obj-$(CONFIG_ELF_CORE) += elfcore.o |
Al Viro | 6582b7f | 2011-08-18 20:03:19 +0100 | [diff] [blame] | 22 | |
Al Viro | 5c48b10 | 2011-08-18 20:06:39 +0100 | [diff] [blame] | 23 | subarch-y = ../lib/string_32.o ../lib/atomic64_32.o ../lib/atomic64_cx8_32.o |
Brian Gerst | 121b32a | 2020-03-13 15:51:41 -0400 | [diff] [blame] | 24 | subarch-y += ../kernel/sys_ia32.o |
Al Viro | 6582b7f | 2011-08-18 20:03:19 +0100 | [diff] [blame] | 25 | |
| 26 | else |
| 27 | |
Al Viro | 5b3eb3a | 2012-12-25 19:14:55 -0500 | [diff] [blame] | 28 | obj-y += syscalls_64.o vdso/ |
Al Viro | 6582b7f | 2011-08-18 20:03:19 +0100 | [diff] [blame] | 29 | |
Waiman Long | 46ad084 | 2019-03-22 10:30:06 -0400 | [diff] [blame] | 30 | subarch-y = ../lib/csum-partial_64.o ../lib/memcpy_64.o ../entry/thunk_64.o |
Al Viro | 6582b7f | 2011-08-18 20:03:19 +0100 | [diff] [blame] | 31 | |
| 32 | endif |
| 33 | |
Al Viro | 5c48b10 | 2011-08-18 20:06:39 +0100 | [diff] [blame] | 34 | subarch-$(CONFIG_MODULES) += ../kernel/module.o |
Al Viro | 6582b7f | 2011-08-18 20:03:19 +0100 | [diff] [blame] | 35 | |
| 36 | USER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o |
| 37 | |
H. Peter Anvin | 45db1c6 | 2011-12-05 16:08:49 -0800 | [diff] [blame] | 38 | $(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \ |
| 39 | -Iarch/x86/include/generated |
Masahiro Yamada | 2c667d7 | 2018-12-22 18:50:34 +0900 | [diff] [blame] | 40 | targets += user-offsets.s |
Al Viro | 6582b7f | 2011-08-18 20:03:19 +0100 | [diff] [blame] | 41 | |
Masahiro Yamada | 65bba04 | 2018-11-29 11:58:50 +0900 | [diff] [blame] | 42 | include/generated/user_constants.h: $(obj)/user-offsets.s |
| 43 | $(call filechk,offsets,__USER_CONSTANT_H__) |
| 44 | |
Al Viro | 6582b7f | 2011-08-18 20:03:19 +0100 | [diff] [blame] | 45 | UNPROFILE_OBJS := stub_segv.o |
| 46 | CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING) |
| 47 | |
| 48 | include arch/um/scripts/Makefile.rules |