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 += -Wstrict-prototypes 12PLATFORM_CPPFLAGS += -mregparm=3 13PLATFORM_CPPFLAGS += -fomit-frame-pointer 14PF_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) 20PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm 21PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0 22 23# Support generic board on x86 24__HAVE_ARCH_GENERIC_BOARD := y 25 26PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden 27 28PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions 29 30LDFLAGS_FINAL += --gc-sections -pie 31LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3 32LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3 33 34export NORMAL_LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 35PREFIXED_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/$(shell basename $(NORMAL_LIBGCC)) 36 37export USE_PRIVATE_LIBGCC=$(shell dirname $(PREFIXED_LIBGCC)) 38