KBUILD_CFLAGS := -Wall -Werror=strict-prototypes -Wno-trigraphs \
-Wno-format-security \
- -fno-builtin -ffreestanding $(CSTD_FLAG)
+ -fno-builtin -ffreestanding $(CSTD_FLAG) \
+ -fno-PIE
KBUILD_CFLAGS += -fshort-wchar -fno-strict-aliasing
-KBUILD_AFLAGS := -D__ASSEMBLY__
+KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
KBUILD_LDFLAGS :=
ifeq ($(cc-name),clang)
KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
endif
-# Don't generate position independent code
-KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
-KBUILD_AFLAGS += $(call cc-option,-fno-PIE)
-
# Read UBOOTRELEASE from include/config/uboot.release (if it exists)
UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null)
UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)