diff --git a/spl/Makefile b/spl/Makefile index bf980249eb..9d3d1822f1 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -133,7 +133,8 @@ libs-y := $(patsubst %/, %/built-in.o, $(libs-y)) # Add GCC lib ifeq ("$(USE_PRIVATE_LIBGCC)", "yes") -PLATFORM_LIBS := $(SPLTREE)/arch/$(ARCH)/lib/lib.a +PLATFORM_LIBGCC = $(SPLTREE)/arch/$(ARCH)/lib/lib.a +PLATFORM_LIBS := $(filter-out %/lib.a, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC) endif u-boot-spl-init := $(head-y)