1# 2# (C) Copyright 2000-2002 3# Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4# 5# SPDX-License-Identifier: GPL-2.0+ 6# 7 8CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 9 10PLATFORM_CPPFLAGS += -fno-strict-aliasing 11PLATFORM_CPPFLAGS += -mregparm=3 12PLATFORM_CPPFLAGS += -fomit-frame-pointer 13PF_CPPFLAGS_X86 := $(call cc-option, -fno-toplevel-reorder, \ 14 $(call cc-option, -fno-unit-at-a-time)) \ 15 $(call cc-option, -mpreferred-stack-boundary=2) 16PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86) 17PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm 18PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0 19 20# Support generic board on x86 21__HAVE_ARCH_GENERIC_BOARD := y 22 23PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden 24 25PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions 26 27LDFLAGS_FINAL += --gc-sections -pie 28LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3 29LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3 30 31export NORMAL_LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 32PREFIXED_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/$(shell basename $(NORMAL_LIBGCC)) 33 34CONFIG_USE_PRIVATE_LIBGCC=$(shell dirname $(PREFIXED_LIBGCC)) 35