blob: 4a4ad8024a324ce38cd2a77a082234cbe741d99f [file] [log] [blame]
wdenk2262cfe2002-11-18 00:14:45 +00001#
2# (C) Copyright 2000-2002
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denk1a459662013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenk2262cfe2002-11-18 00:14:45 +00006#
7
Wolfgang Denk8ae86b72011-02-04 14:25:17 +01008CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
Mike Frysinger262ae0a2009-09-03 23:12:47 -04009
Graeme Russ5c161652010-10-07 20:03:23 +110010PLATFORM_CPPFLAGS += -fno-strict-aliasing
11PLATFORM_CPPFLAGS += -Wstrict-prototypes
12PLATFORM_CPPFLAGS += -mregparm=3
13PLATFORM_CPPFLAGS += -fomit-frame-pointer
Wolfgang Denkcca4e4a2011-11-01 20:54:02 +000014PF_CPPFLAGS_X86 := $(call cc-option, -ffreestanding) \
15 $(call cc-option, -fno-toplevel-reorder, \
16 $(call cc-option, -fno-unit-at-a-time)) \
17 $(call cc-option, -fno-stack-protector) \
18 $(call cc-option, -mpreferred-stack-boundary=2)
19PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86)
Graeme Russa85f53c2011-02-12 15:11:21 +110020PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm
Graeme Russ3a25e942011-02-12 15:11:24 +110021PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0
Graeme Russd664adb2010-10-07 20:03:20 +110022
Simon Glasse424c152013-03-11 07:40:13 +000023# Support generic board on x86
24__HAVE_ARCH_GENERIC_BOARD := y
25
Graeme Russa85f53c2011-02-12 15:11:21 +110026PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
27
28PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions
29
Haiying Wang6dc1eceb2011-02-22 16:38:05 -050030LDFLAGS_FINAL += --gc-sections -pie
Gabe Black36b24092011-11-16 23:01:37 +000031LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3
32LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3
33
Masahiro Yamada3954b732013-10-21 11:53:34 +090034export NORMAL_LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
Gabe Black36b24092011-11-16 23:01:37 +000035PREFIXED_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/$(shell basename $(NORMAL_LIBGCC))
36
37export USE_PRIVATE_LIBGCC=$(shell dirname $(PREFIXED_LIBGCC))