xtensa: boot-redboot: clean up Makefile
Drop references to external library search directory and compiler libgcc from the link command. Use KBUILD_LDFLAGS in the link command. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
parent
752121c7eb
commit
fe5775f238
|
@ -6,16 +6,12 @@
|
||||||
|
|
||||||
OBJCOPY_ARGS := -O $(if $(CONFIG_CPU_BIG_ENDIAN),elf32-xtensa-be,elf32-xtensa-le)
|
OBJCOPY_ARGS := -O $(if $(CONFIG_CPU_BIG_ENDIAN),elf32-xtensa-be,elf32-xtensa-le)
|
||||||
|
|
||||||
LD_ARGS = -T $(srctree)/$(obj)/boot.ld
|
|
||||||
|
|
||||||
boot-y := bootstrap.o
|
boot-y := bootstrap.o
|
||||||
targets += $(boot-y)
|
targets += $(boot-y)
|
||||||
|
|
||||||
OBJS := $(addprefix $(obj)/,$(boot-y))
|
OBJS := $(addprefix $(obj)/,$(boot-y))
|
||||||
LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
|
LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
|
||||||
|
|
||||||
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
|
|
||||||
|
|
||||||
$(obj)/zImage.o: $(obj)/../vmlinux.bin.gz $(OBJS)
|
$(obj)/zImage.o: $(obj)/../vmlinux.bin.gz $(OBJS)
|
||||||
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
|
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
|
||||||
--add-section image=$< \
|
--add-section image=$< \
|
||||||
|
@ -23,7 +19,10 @@ $(obj)/zImage.o: $(obj)/../vmlinux.bin.gz $(OBJS)
|
||||||
$(OBJS) $@
|
$(OBJS) $@
|
||||||
|
|
||||||
$(obj)/zImage.elf: $(obj)/zImage.o $(LIBS)
|
$(obj)/zImage.elf: $(obj)/zImage.o $(LIBS)
|
||||||
$(Q)$(LD) $(LD_ARGS) -o $@ $^ -L/xtensa-elf/lib $(LIBGCC)
|
$(Q)$(LD) $(KBUILD_LDFLAGS) \
|
||||||
|
-T $(srctree)/$(obj)/boot.ld \
|
||||||
|
--build-id=none \
|
||||||
|
-o $@ $^
|
||||||
|
|
||||||
$(obj)/../zImage.redboot: $(obj)/zImage.elf
|
$(obj)/../zImage.redboot: $(obj)/zImage.elf
|
||||||
$(Q)$(OBJCOPY) -S -O binary $< $@
|
$(Q)$(OBJCOPY) -S -O binary $< $@
|
||||||
|
|
Loading…
Reference in New Issue