summaryrefslogtreecommitdiffstats
path: root/util/crossgcc/edk2tools.txt
blob: 0344bf2d25b252f8ef18321257046683be4e33bd (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
####################################################################################
#
# COREBOOT is spun off from the GCC5 template
#
####################################################################################

DEFINE COREBOOT_IA32_PREFIX              = @@PREFIX@@/bin/i386-elf-
DEFINE COREBOOT_X64_PREFIX               = @@PREFIX@@/bin/x86_64-elf-
DEFINE COREBOOT_ARM_PREFIX               = @@PREFIX@@/bin/arm-eabi-
DEFINE COREBOOT_AARCH64_PREFIX           = @@PREFIX@@/bin/arch64-elf-

DEFINE COREBOOT_IA32_CC_FLAGS            = DEF(GCC5_IA32_CC_FLAGS)
DEFINE COREBOOT_X64_CC_FLAGS             = DEF(GCC5_X64_CC_FLAGS)
DEFINE COREBOOT_IA32_X64_DLINK_COMMON    = DEF(GCC5_IA32_X64_DLINK_COMMON)
DEFINE COREBOOT_IA32_X64_ASLDLINK_FLAGS  = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS)
DEFINE COREBOOT_IA32_X64_DLINK_FLAGS     = DEF(GCC5_IA32_X64_DLINK_FLAGS)
DEFINE COREBOOT_IA32_DLINK2_FLAGS        = DEF(GCC5_IA32_DLINK2_FLAGS)
DEFINE COREBOOT_X64_DLINK_FLAGS          = DEF(GCC5_X64_DLINK_FLAGS)
DEFINE COREBOOT_X64_DLINK2_FLAGS         = DEF(GCC5_X64_DLINK2_FLAGS)
DEFINE COREBOOT_ASM_FLAGS                = DEF(GCC5_ASM_FLAGS)
DEFINE COREBOOT_ARM_ASM_FLAGS            = DEF(GCC5_ARM_ASM_FLAGS)
DEFINE COREBOOT_AARCH64_ASM_FLAGS        = DEF(GCC5_AARCH64_ASM_FLAGS)
DEFINE COREBOOT_ARM_CC_FLAGS             = DEF(GCC5_ARM_CC_FLAGS)
DEFINE COREBOOT_ARM_CC_XIPFLAGS          = DEF(GCC5_ARM_CC_XIPFLAGS)
DEFINE COREBOOT_AARCH64_CC_FLAGS         = DEF(GCC5_AARCH64_CC_FLAGS)
DEFINE COREBOOT_AARCH64_CC_XIPFLAGS      = DEF(GCC5_AARCH64_CC_XIPFLAGS)
DEFINE COREBOOT_ARM_DLINK_FLAGS          = DEF(GCC5_ARM_DLINK_FLAGS)
DEFINE COREBOOT_ARM_DLINK2_FLAGS         = DEF(GCC5_ARM_DLINK2_FLAGS)
DEFINE COREBOOT_AARCH64_DLINK_FLAGS      = DEF(GCC5_AARCH64_DLINK_FLAGS)
DEFINE COREBOOT_AARCH64_DLINK2_FLAGS     = DEF(GCC5_AARCH64_DLINK2_FLAGS)
DEFINE COREBOOT_ARM_ASLDLINK_FLAGS       = DEF(GCC5_ARM_ASLDLINK_FLAGS)
DEFINE COREBOOT_AARCH64_ASLDLINK_FLAGS   = DEF(GCC5_AARCH64_ASLDLINK_FLAGS)

####################################################################################
#
# GCC 5 - This configuration is used to compile under Linux to produce
#         PE/COFF binaries using GCC 5
#
####################################################################################
*_COREBOOT_*_*_FAMILY                = GCC

*_COREBOOT_*_MAKE_PATH               = make
*_COREBOOT_*_*_DLL                   = ENV(COREBOOT_DLL)
*_COREBOOT_*_ASL_PATH                = DEF(UNIX_IASL_BIN)

*_COREBOOT_*_PP_FLAGS                = DEF(GCC_PP_FLAGS)
*_COREBOOT_*_ASLPP_FLAGS             = DEF(GCC_ASLPP_FLAGS)
*_COREBOOT_*_ASLCC_FLAGS             = DEF(GCC_ASLCC_FLAGS)
*_COREBOOT_*_VFRPP_FLAGS             = DEF(GCC_VFRPP_FLAGS)
*_COREBOOT_*_APP_FLAGS               =
*_COREBOOT_*_ASL_FLAGS               = DEF(IASL_FLAGS)
*_COREBOOT_*_ASL_OUTFLAGS            = DEF(IASL_OUTFLAGS)

##################
# COREBOOT IA32 definitions
##################
*_COREBOOT_IA32_OBJCOPY_PATH         = DEF(COREBOOT_IA32_PREFIX)objcopy
*_COREBOOT_IA32_CC_PATH              = DEF(COREBOOT_IA32_PREFIX)gcc
*_COREBOOT_IA32_SLINK_PATH           = DEF(COREBOOT_IA32_PREFIX)gcc-ar
*_COREBOOT_IA32_DLINK_PATH           = DEF(COREBOOT_IA32_PREFIX)gcc
*_COREBOOT_IA32_ASLDLINK_PATH        = DEF(COREBOOT_IA32_PREFIX)gcc
*_COREBOOT_IA32_ASM_PATH             = DEF(COREBOOT_IA32_PREFIX)gcc
*_COREBOOT_IA32_PP_PATH              = DEF(COREBOOT_IA32_PREFIX)gcc
*_COREBOOT_IA32_VFRPP_PATH           = DEF(COREBOOT_IA32_PREFIX)gcc
*_COREBOOT_IA32_ASLCC_PATH           = DEF(COREBOOT_IA32_PREFIX)gcc
*_COREBOOT_IA32_ASLPP_PATH           = DEF(COREBOOT_IA32_PREFIX)gcc
*_COREBOOT_IA32_RC_PATH              = DEF(COREBOOT_IA32_PREFIX)objcopy

*_COREBOOT_IA32_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto
*_COREBOOT_IA32_ASLDLINK_FLAGS       = DEF(COREBOOT_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386
*_COREBOOT_IA32_ASM_FLAGS            = DEF(COREBOOT_ASM_FLAGS) -m32 -march=i386
*_COREBOOT_IA32_DLINK2_FLAGS         = DEF(COREBOOT_IA32_DLINK2_FLAGS)
*_COREBOOT_IA32_RC_FLAGS             = DEF(GCC_IA32_RC_FLAGS)
*_COREBOOT_IA32_OBJCOPY_FLAGS        =
*_COREBOOT_IA32_NASM_FLAGS           = -f elf32

  DEBUG_COREBOOT_IA32_CC_FLAGS       = DEF(COREBOOT_IA32_CC_FLAGS) -flto -Os
  DEBUG_COREBOOT_IA32_DLINK_FLAGS    = DEF(COREBOOT_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386

RELEASE_COREBOOT_IA32_CC_FLAGS       = DEF(COREBOOT_IA32_CC_FLAGS) -flto -Os -Wno-unused-but-set-variable
RELEASE_COREBOOT_IA32_DLINK_FLAGS    = DEF(COREBOOT_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386

  NOOPT_COREBOOT_IA32_CC_FLAGS       = DEF(COREBOOT_IA32_CC_FLAGS) -O0
  NOOPT_COREBOOT_IA32_DLINK_FLAGS    = DEF(COREBOOT_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386 -O0

##################
# COREBOOT X64 definitions
##################
*_COREBOOT_X64_OBJCOPY_PATH          = DEF(COREBOOT_X64_PREFIX)objcopy
*_COREBOOT_X64_CC_PATH               = DEF(COREBOOT_X64_PREFIX)gcc
*_COREBOOT_X64_SLINK_PATH            = DEF(COREBOOT_X64_PREFIX)gcc-ar
*_COREBOOT_X64_DLINK_PATH            = DEF(COREBOOT_X64_PREFIX)gcc
*_COREBOOT_X64_ASLDLINK_PATH         = DEF(COREBOOT_X64_PREFIX)gcc
*_COREBOOT_X64_ASM_PATH              = DEF(COREBOOT_X64_PREFIX)gcc
*_COREBOOT_X64_PP_PATH               = DEF(COREBOOT_X64_PREFIX)gcc
*_COREBOOT_X64_VFRPP_PATH            = DEF(COREBOOT_X64_PREFIX)gcc
*_COREBOOT_X64_ASLCC_PATH            = DEF(COREBOOT_X64_PREFIX)gcc
*_COREBOOT_X64_ASLPP_PATH            = DEF(COREBOOT_X64_PREFIX)gcc
*_COREBOOT_X64_RC_PATH               = DEF(COREBOOT_X64_PREFIX)objcopy

*_COREBOOT_X64_ASLCC_FLAGS           = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto
*_COREBOOT_X64_ASLDLINK_FLAGS        = DEF(COREBOOT_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
*_COREBOOT_X64_ASM_FLAGS             = DEF(COREBOOT_ASM_FLAGS) -m64
*_COREBOOT_X64_DLINK2_FLAGS          = DEF(COREBOOT_X64_DLINK2_FLAGS)
*_COREBOOT_X64_RC_FLAGS              = DEF(GCC_X64_RC_FLAGS)
*_COREBOOT_X64_OBJCOPY_FLAGS         =
*_COREBOOT_X64_NASM_FLAGS            = -f elf64

  DEBUG_COREBOOT_X64_CC_FLAGS        = DEF(COREBOOT_X64_CC_FLAGS) -flto -DUSING_LTO -Os
  DEBUG_COREBOOT_X64_DLINK_FLAGS     = DEF(COREBOOT_X64_DLINK_FLAGS) -flto -Os

RELEASE_COREBOOT_X64_CC_FLAGS        = DEF(COREBOOT_X64_CC_FLAGS) -flto -DUSING_LTO -Os -Wno-unused-but-set-variable
RELEASE_COREBOOT_X64_DLINK_FLAGS     = DEF(COREBOOT_X64_DLINK_FLAGS) -flto -Os

  NOOPT_COREBOOT_X64_CC_FLAGS        = DEF(COREBOOT_X64_CC_FLAGS) -O0
  NOOPT_COREBOOT_X64_DLINK_FLAGS     = DEF(COREBOOT_X64_DLINK_FLAGS) -O0

##################
# COREBOOT ARM definitions
##################
*_COREBOOT_ARM_CC_PATH               = ENV(COREBOOT_ARM_PREFIX)gcc
*_COREBOOT_ARM_SLINK_PATH            = ENV(COREBOOT_ARM_PREFIX)gcc-ar
*_COREBOOT_ARM_DLINK_PATH            = ENV(COREBOOT_ARM_PREFIX)gcc
*_COREBOOT_ARM_ASLDLINK_PATH         = ENV(COREBOOT_ARM_PREFIX)gcc
*_COREBOOT_ARM_ASM_PATH              = ENV(COREBOOT_ARM_PREFIX)gcc
*_COREBOOT_ARM_PP_PATH               = ENV(COREBOOT_ARM_PREFIX)gcc
*_COREBOOT_ARM_VFRPP_PATH            = ENV(COREBOOT_ARM_PREFIX)gcc
*_COREBOOT_ARM_ASLCC_PATH            = ENV(COREBOOT_ARM_PREFIX)gcc
*_COREBOOT_ARM_ASLPP_PATH            = ENV(COREBOOT_ARM_PREFIX)gcc
*_COREBOOT_ARM_RC_PATH               = ENV(COREBOOT_ARM_PREFIX)objcopy

*_COREBOOT_ARM_ARCHCC_FLAGS          = -mthumb
*_COREBOOT_ARM_ASLCC_FLAGS           = DEF(GCC_ASLCC_FLAGS)
*_COREBOOT_ARM_ASLDLINK_FLAGS        = DEF(COREBOOT_ARM_ASLDLINK_FLAGS)
*_COREBOOT_ARM_ASM_FLAGS             = DEF(COREBOOT_ARM_ASM_FLAGS)
*_COREBOOT_ARM_DLINK2_FLAGS          = DEF(COREBOOT_ARM_DLINK2_FLAGS)
*_COREBOOT_ARM_PLATFORM_FLAGS        = -march=armv7-a
*_COREBOOT_ARM_PP_FLAGS              = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_COREBOOT_ARM_RC_FLAGS              = DEF(GCC_ARM_RC_FLAGS)
*_COREBOOT_ARM_VFRPP_FLAGS           = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
*_COREBOOT_ARM_CC_XIPFLAGS           = DEF(COREBOOT_ARM_CC_XIPFLAGS)

  DEBUG_COREBOOT_ARM_CC_FLAGS        = DEF(COREBOOT_ARM_CC_FLAGS) -O0
  DEBUG_COREBOOT_ARM_DLINK_FLAGS     = DEF(COREBOOT_ARM_DLINK_FLAGS)

RELEASE_COREBOOT_ARM_CC_FLAGS        = DEF(COREBOOT_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable
RELEASE_COREBOOT_ARM_DLINK_FLAGS     = DEF(COREBOOT_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm

  NOOPT_COREBOOT_ARM_CC_FLAGS        = DEF(COREBOOT_ARM_CC_FLAGS) -O0
  NOOPT_COREBOOT_ARM_DLINK_FLAGS     = DEF(COREBOOT_ARM_DLINK_FLAGS) -O0

##################
# COREBOOT AARCH64 definitions
##################
*_COREBOOT_AARCH64_CC_PATH           = ENV(COREBOOT_AARCH64_PREFIX)gcc
*_COREBOOT_AARCH64_SLINK_PATH        = ENV(COREBOOT_AARCH64_PREFIX)gcc-ar
*_COREBOOT_AARCH64_DLINK_PATH        = ENV(COREBOOT_AARCH64_PREFIX)gcc
*_COREBOOT_AARCH64_ASLDLINK_PATH     = ENV(COREBOOT_AARCH64_PREFIX)gcc
*_COREBOOT_AARCH64_ASM_PATH          = ENV(COREBOOT_AARCH64_PREFIX)gcc
*_COREBOOT_AARCH64_PP_PATH           = ENV(COREBOOT_AARCH64_PREFIX)gcc
*_COREBOOT_AARCH64_VFRPP_PATH        = ENV(COREBOOT_AARCH64_PREFIX)gcc
*_COREBOOT_AARCH64_ASLCC_PATH        = ENV(COREBOOT_AARCH64_PREFIX)gcc
*_COREBOOT_AARCH64_ASLPP_PATH        = ENV(COREBOOT_AARCH64_PREFIX)gcc
*_COREBOOT_AARCH64_RC_PATH           = ENV(COREBOOT_AARCH64_PREFIX)objcopy

*_COREBOOT_AARCH64_ASLCC_FLAGS       = DEF(GCC_ASLCC_FLAGS)
*_COREBOOT_AARCH64_ASLDLINK_FLAGS    = DEF(COREBOOT_AARCH64_ASLDLINK_FLAGS)
*_COREBOOT_AARCH64_ASM_FLAGS         = DEF(COREBOOT_AARCH64_ASM_FLAGS)
*_COREBOOT_AARCH64_DLINK2_FLAGS      = DEF(COREBOOT_AARCH64_DLINK2_FLAGS)
*_COREBOOT_AARCH64_PLATFORM_FLAGS    =
*_COREBOOT_AARCH64_PP_FLAGS          = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_COREBOOT_AARCH64_RC_FLAGS          = DEF(GCC_AARCH64_RC_FLAGS)
*_COREBOOT_AARCH64_VFRPP_FLAGS       = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
*_COREBOOT_AARCH64_CC_XIPFLAGS       = DEF(COREBOOT_AARCH64_CC_XIPFLAGS)

  DEBUG_COREBOOT_AARCH64_CC_FLAGS    = DEF(COREBOOT_AARCH64_CC_FLAGS) -O0 -mcmodel=small
  DEBUG_COREBOOT_AARCH64_DLINK_FLAGS = DEF(COREBOOT_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000
  DEBUG_COREBOOT_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20

RELEASE_COREBOOT_AARCH64_CC_FLAGS    = DEF(COREBOOT_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -mcmodel=tiny -fomit-frame-pointer
RELEASE_COREBOOT_AARCH64_DLINK_FLAGS = DEF(COREBOOT_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch

  NOOPT_COREBOOT_AARCH64_CC_FLAGS    = DEF(COREBOOT_AARCH64_CC_FLAGS) -O0 -mcmodel=small
  NOOPT_COREBOOT_AARCH64_DLINK_FLAGS = DEF(COREBOOT_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 -O0
  NOOPT_COREBOOT_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0