Debian Codegraph @

src/arch/ppc64/Makefile.mk

raw symbols SCIP
1 ## SPDX-License-Identifier: GPL-2.0-only
2
3 ppc64_flags = -I$(src)/arch/ppc64/ -mbig-endian -mcpu=power8 -mtune=power8
4 ifeq ($(CONFIG_COMPILER_GCC),y)
5 # disable use of %r11 for static chains on invoking nested functions through
6 # pointers
7 ppc64_flags += -mno-pointers-to-nested-functions
8 else ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
9 # use GNU assember at least until LLVM's integrated PPC64 assember will be able
10 # to handle "slbia" instruction with an argument
11 ppc64_flags += -fno-integrated-as
12 endif
13
14 ppc64_asm_flags =
15
16 ################################################################################
17 ## bootblock
18 ################################################################################
19 ifeq ($(CONFIG_ARCH_BOOTBLOCK_PPC64),y)
20
21 bootblock-y = bootblock_crt0.S
22 bootblock-y += arch_timer.c
23 bootblock-y += boot.c
24 bootblock-y += \
25 $(top)/src/lib/memchr.c \
26 $(top)/src/lib/memcmp.c \
27 $(top)/src/lib/memcpy.c \
28 $(top)/src/lib/memmove.c \
29 $(top)/src/lib/memset.c
30
31 bootblock-generic-ccopts += $(ppc64_flags)
32
33 $(eval $(call link_stage,bootblock))
34
35 endif
36
37 ################################################################################
38 ## romstage
39 ################################################################################
40 ifeq ($(CONFIG_ARCH_ROMSTAGE_PPC64),y)
41
42 romstage-y += arch_timer.c
43 romstage-y += boot.c
44 romstage-y += stages.c
45 romstage-y += \
46 $(top)/src/lib/memchr.c \
47 $(top)/src/lib/memcmp.c \
48 $(top)/src/lib/memcpy.c \
49 $(top)/src/lib/memmove.c \
50 $(top)/src/lib/memset.c
51
52 romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
53
54 # Build the romstage
55
56 $(eval $(call link_stage,romstage))
57
58 romstage-c-ccopts += $(ppc64_flags)
59 romstage-S-ccopts += $(ppc64_asm_flags)
60
61 endif
62
63 ################################################################################
64 ## ramstage
65 ################################################################################
66 ifeq ($(CONFIG_ARCH_RAMSTAGE_PPC64),y)
67
68 ramstage-y += stages.c
69 ramstage-y += arch_timer.c
70 ramstage-y += boot.c
71 ramstage-y += tables.c
72 ramstage-y += \
73 $(top)/src/lib/memchr.c \
74 $(top)/src/lib/memcmp.c \
75 $(top)/src/lib/memcpy.c \
76 $(top)/src/lib/memmove.c \
77 $(top)/src/lib/memset.c
78
79 $(eval $(call create_class_compiler,rmodules,power8))
80
81 ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
82
83 ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/mainboard.c
84
85 # Build the ramstage
86
87 $(eval $(call link_stage,ramstage))
88
89 ramstage-c-ccopts += $(ppc64_flags)
90 ramstage-S-ccopts += $(ppc64_asm_flags)
91
92 endif