]> Git Repo - J-u-boot.git/blame - arch/x86/config.mk
ARM: dts: stm32: Move ethernet PHY into SoM DT
[J-u-boot.git] / arch / x86 / config.mk
CommitLineData
83d290c5 1# SPDX-License-Identifier: GPL-2.0+
2262cfee
WD
2#
3# (C) Copyright 2000-2002
4# Wolfgang Denk, DENX Software Engineering, [email protected].
2262cfee 5
8ae86b76 6CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
262ae0a6 7
5c161653 8PLATFORM_CPPFLAGS += -fomit-frame-pointer
f694183b 9PF_CPPFLAGS_X86 := $(call cc-option, -fno-toplevel-reorder, \
9a95f51f 10 $(call cc-option, -fno-unit-at-a-time))
3f1c046c 11
cca4e4ae 12PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86)
a85f53cd 13PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm
3a03703a
SG
14
15ifdef CONFIG_SPL_BUILD
16IS_32BIT := y
17else
18ifndef CONFIG_X86_64
19IS_32BIT := y
20endif
21endif
22
23ifeq ($(IS_32BIT),y)
dbb7234b 24PLATFORM_CPPFLAGS += -march=i386 -m32
3a03703a 25else
a139cc18 26PLATFORM_CPPFLAGS += $(if $(CONFIG_SPL_BUILD),,-fpic) -fno-common -march=core2 -m64
dd4611de 27PLATFORM_CPPFLAGS += -mno-mmx -mno-sse
3a03703a 28endif
a85f53cd 29
1acbd0ea 30PLATFORM_RELFLAGS += -fdata-sections -ffunction-sections -fvisibility=hidden
a85f53cd 31
587e4a42
TR
32KBUILD_LDFLAGS += -Bsymbolic -Bsymbolic-functions
33KBUILD_LDFLAGS += -m $(if $(IS_32BIT),elf_i386,elf_x86_64)
a85f53cd 34
476476e7 35# This is used in the top-level Makefile which does not include
587e4a42 36# KBUILD_LDFLAGS
972ffcd7 37LDFLAGS_EFI_PAYLOAD := -Bsymbolic -Bsymbolic-functions -shared --no-undefined -s
476476e7 38
3f1c046c
BS
39OBJCOPYFLAGS_EFI := -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
40 -j .rel -j .rela -j .reloc
41
3a03703a 42ifeq ($(IS_32BIT),y)
3f1c046c 43CFLAGS_NON_EFI := -mregparm=3
3a03703a 44endif
3f1c046c
BS
45CFLAGS_EFI := -fpic -fshort-wchar
46
96a8d409
SG
47ifeq ($(CONFIG_EFI_STUB_64BIT),)
48CFLAGS_EFI += $(call cc-option, -mno-red-zone)
3f1c046c 49EFIARCH = ia32
476476e7 50EFIPAYLOAD_BFDTARGET = elf32-i386
96a8d409
SG
51else
52EFIARCH = x86_64
53EFIPAYLOAD_BFDTARGET = elf64-x86-64
54endif
476476e7
SG
55
56EFIPAYLOAD_BFDARCH = i386
3f1c046c 57
d36badfd 58LDSCRIPT_EFI := $(srctree)/arch/x86/lib/elf_$(EFIARCH)_efi.lds
2dcd4e9e 59EFISTUB := crt0_$(EFIARCH)_efi.o reloc_$(EFIARCH)_efi.o
3f1c046c
BS
60OBJCOPYFLAGS_EFI += --target=efi-app-$(EFIARCH)
61
96a8d409
SG
62CPPFLAGS_REMOVE_crt0-efi-$(EFIARCH).o += $(CFLAGS_NON_EFI)
63CPPFLAGS_crt0-efi-$(EFIARCH).o += $(CFLAGS_EFI)
64
3f1c046c
BS
65ifeq ($(CONFIG_EFI_APP),y)
66
67PLATFORM_CPPFLAGS += $(CFLAGS_EFI)
c54ed3ef 68LDFLAGS_FINAL += -znocombreloc -shared -s
3f1c046c
BS
69LDSCRIPT := $(LDSCRIPT_EFI)
70
71else
72
73PLATFORM_CPPFLAGS += $(CFLAGS_NON_EFI)
587e4a42 74KBUILD_LDFLAGS += --emit-relocs
3a03703a
SG
75LDFLAGS_FINAL += --gc-sections $(if $(CONFIG_SPL_BUILD),,-pie)
76
77endif
3f1c046c 78
3a03703a
SG
79ifdef CONFIG_X86_64
80ifndef CONFIG_SPL_BUILD
81PLATFORM_CPPFLAGS += -D__x86_64__
82else
83PLATFORM_CPPFLAGS += -D__I386__
84endif
85else
86PLATFORM_CPPFLAGS += -D__I386__
3f1c046c 87endif
5bd828b5 88
508d8567 89ifdef CONFIG_EFI_STUB
5bd828b5 90
508d8567 91ifdef CONFIG_EFI_STUB_64BIT
5bd828b5
SG
92EFI_LDS := elf_x86_64_efi.lds
93EFI_CRT0 := crt0_x86_64_efi.o
94EFI_RELOC := reloc_x86_64_efi.o
5bd828b5
SG
95else
96EFI_LDS := elf_ia32_efi.lds
97EFI_CRT0 := crt0_ia32_efi.o
98EFI_RELOC := reloc_ia32_efi.o
f4cf153a
HS
99endif
100
508d8567
HS
101else
102
f4cf153a 103ifdef CONFIG_X86_64
508d8567
HS
104EFI_LDS := elf_x86_64_efi.lds
105EFI_CRT0 := crt0_x86_64_efi.o
106EFI_RELOC := reloc_x86_64_efi.o
f4cf153a 107else
508d8567
HS
108EFI_LDS := elf_ia32_efi.lds
109EFI_CRT0 := crt0_ia32_efi.o
110EFI_RELOC := reloc_ia32_efi.o
111endif
112
5bd828b5
SG
113endif
114
508d8567
HS
115ifdef CONFIG_X86_64
116EFI_TARGET := --target=efi-app-x86_64
117else
118EFI_TARGET := --target=efi-app-ia32
5bd828b5 119endif
This page took 0.503936 seconds and 4 git commands to generate.