blob: 1e52a5e9b0ae7b7a0ced065c933f4a2f95ec88c8 [file] [log] [blame]
wdenk591dda52002-11-18 00:14:45 +00001#
2# (C) Copyright 2000-2002
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
wdenk591dda52002-11-18 00:14:45 +00006#
7
Wolfgang Denk33a57342011-02-04 14:25:17 +01008CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000
Mike Frysinger5b660442009-09-03 23:12:47 -04009
Graeme Russbed10fa2010-10-07 20:03:23 +110010PLATFORM_CPPFLAGS += -fno-strict-aliasing
Graeme Russbed10fa2010-10-07 20:03:23 +110011PLATFORM_CPPFLAGS += -mregparm=3
12PLATFORM_CPPFLAGS += -fomit-frame-pointer
Masahiro Yamada4fad1492014-02-26 14:51:01 +090013PF_CPPFLAGS_X86 := $(call cc-option, -fno-toplevel-reorder, \
Wolfgang Denk9209ed52011-11-01 20:54:02 +000014 $(call cc-option, -fno-unit-at-a-time)) \
Wolfgang Denk9209ed52011-11-01 20:54:02 +000015 $(call cc-option, -mpreferred-stack-boundary=2)
16PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86)
Graeme Russ9381c8a2011-02-12 15:11:21 +110017PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm
Graeme Russ3fe48602011-02-12 15:11:24 +110018PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0
Graeme Russ9381c8a2011-02-12 15:11:21 +110019
Simon Glass2e4622d2013-03-11 07:40:13 +000020# Support generic board on x86
21__HAVE_ARCH_GENERIC_BOARD := y
22
Graeme Russ9381c8a2011-02-12 15:11:21 +110023PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
24
25PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions
26
Haiying Wang39358732011-02-22 16:38:05 -050027LDFLAGS_FINAL += --gc-sections -pie
Gabe Black1662cf12011-11-16 23:01:37 +000028LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3
29LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3
30
Masahiro Yamadaaa96dd12013-10-21 11:53:34 +090031export NORMAL_LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
Gabe Black1662cf12011-11-16 23:01:37 +000032PREFIXED_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/$(shell basename $(NORMAL_LIBGCC))
33
Masahiro Yamadae1a211d2014-03-05 16:59:38 +090034CONFIG_USE_PRIVATE_LIBGCC=$(shell dirname $(PREFIXED_LIBGCC))