diff options
Diffstat (limited to 'config.mk')
-rw-r--r-- | config.mk | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -166,11 +166,21 @@ endif AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS) -LDFLAGS += -Bstatic -T $(LDSCRIPT) $(PLATFORM_LDFLAGS) +LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS) ifneq ($(TEXT_BASE),) LDFLAGS += -Ttext $(TEXT_BASE) endif +# Special flags for CPP when processing the linker script +# Linker versions prior to 2.16 don't understand the builting +# functions SORT_BY_ALIGNMENT() and SORT_BY_NAME(), so disable these +ifeq ($(shell $(LD) -v | \ + sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\) .*/[ \1 -lt 2 ] || [ \2 -lt 16 ] \&\& echo old_ld/p' | \ + sh),old_ld) +LDPPFLAGS += -D'SORT_BY_ALIGNMENT(x)=x' -D'SORT_BY_NAME(x)=x' +endif + + # Location of a usable BFD library, where we define "usable" as # "built for ${HOST}, supports ${TARGET}". Sensible values are # - When cross-compiling: the root of the cross-environment |