Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit fe5775f

Browse files
committed
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 <[email protected]>
1 parent 752121c commit fe5775f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

arch/xtensa/boot/boot-redboot/Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,23 @@
66

77
OBJCOPY_ARGS := -O $(if $(CONFIG_CPU_BIG_ENDIAN),elf32-xtensa-be,elf32-xtensa-le)
88

9-
LD_ARGS = -T $(srctree)/$(obj)/boot.ld
10-
119
boot-y := bootstrap.o
1210
targets += $(boot-y)
1311

1412
OBJS := $(addprefix $(obj)/,$(boot-y))
1513
LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
1614

17-
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
18-
1915
$(obj)/zImage.o: $(obj)/../vmlinux.bin.gz $(OBJS)
2016
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
2117
--add-section image=$< \
2218
--set-section-flags image=contents,alloc,load,load,data \
2319
$(OBJS) $@
2420

2521
$(obj)/zImage.elf: $(obj)/zImage.o $(LIBS)
26-
$(Q)$(LD) $(LD_ARGS) -o $@ $^ -L/xtensa-elf/lib $(LIBGCC)
22+
$(Q)$(LD) $(KBUILD_LDFLAGS) \
23+
-T $(srctree)/$(obj)/boot.ld \
24+
--build-id=none \
25+
-o $@ $^
2726

2827
$(obj)/../zImage.redboot: $(obj)/zImage.elf
2928
$(Q)$(OBJCOPY) -S -O binary $< $@

0 commit comments

Comments
 (0)