generated from deepin-community/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathKbuild
26 lines (23 loc) · 826 Bytes
/
Kbuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for LoongArch old-world syscall compatible layer.
#
ifdef KBUILD_EXTMOD
CONFIG_LOONGARCH_OW_SYSCALL := m
endif
obj-$(CONFIG_LOONGARCH_OW_SYSCALL) += la_ow_syscall.o
la_ow_syscall-y += fsstat.o la_ow_syscall_main.o signal.o
ifndef KBUILD_EXTMOD
ifdef CONFIG_KALLSYMS
ifndef CONFIG_RANDOMIZE_BASE
$(obj)/ksym_addr.h: System.map
@$(kecho) ' GEN $@'
$(Q)grep ' sys_call_table$$' $< >/dev/null
$(Q)grep ' kallsyms_lookup_name$$' $< >/dev/null
$(Q)echo "#define LAOWSYS_SYS_CALL_TABLE_ADDR 0x$$(grep ' sys_call_table$$' $< | cut -d ' ' -f 1)" > $@
$(Q)echo "#define LAOWSYS_KALLSYMS_LOOKUP_NAME_ADDR 0x$$(grep ' kallsyms_lookup_name$$' $< | cut -d ' ' -f 1)" >> $@
ccflags-y += -DHAVE_KSYM_ADDR
$(obj)/$(la_ow_syscall-y): $(obj)/ksym_addr.h
endif
endif
endif