diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-02-20 14:16:48 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-02-22 11:28:41 +0530 |
commit | 889e746fd7be97ca0dbaaf7a6a734429b7ca607f (patch) | |
tree | 43472de8184cc9bced7d5b36697f14f3d84799e1 /Makefile | |
parent | fde1c42db35a991f62a1a8a6b26508dab486e61a (diff) |
Makefile: Rename compile_ld() to compile_elf()
The compile_ld() is actually used to create ELF files so
the name is misleading hence this patch renames it to
compile_elf(). We also rename LDFLAGS to ELFFLAGS because
these will be used for ELF creation only.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -166,9 +166,9 @@ ASFLAGS += $(firmware-asflags-y) ARFLAGS = rcs -LDFLAGS += -g -Wall -nostdlib -Wl,--build-id=none -N -static-libgcc -lgcc -LDFLAGS += $(platform-ldflags-y) -LDFLAGS += $(firmware-ldflags-y) +ELFFLAGS += -Wl,--build-id=none -N -static-libgcc -lgcc +ELFFLAGS += $(platform-ldflags-y) +ELFFLAGS += $(firmware-ldflags-y) MERGEFLAGS += -r MERGEFLAGS += -b elf$(PLATFORM_RISCV_XLEN)-littleriscv @@ -225,9 +225,9 @@ compile_as_dep = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ compile_as = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ echo " AS $(subst $(build_dir)/,,$(1))"; \ $(AS) $(ASFLAGS) $(call dynamic_flags,$(1),$(2)) -c $(2) -o $(1) -compile_ld = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ - echo " LD $(subst $(build_dir)/,,$(1))"; \ - $(CC) $(CFLAGS) $(3) $(LDFLAGS) -Wl,-T$(2) -o $(1) +compile_elf = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ + echo " ELF $(subst $(build_dir)/,,$(1))"; \ + $(CC) $(CFLAGS) $(3) $(ELFFLAGS) -Wl,-T$(2) -o $(1) compile_ar = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \ echo " AR $(subst $(build_dir)/,,$(1))"; \ $(AR) $(ARFLAGS) $(1) $(2) @@ -256,7 +256,7 @@ $(build_dir)/%.bin: $(build_dir)/%.elf $(call compile_objcopy,$@,$<) $(build_dir)/%.elf: $(build_dir)/%.o $(build_dir)/%.elf.ld $(build_dir)/$(platform_subdir)/lib/libplatsbi.a - $(call compile_ld,$@,$@.ld,$< $(build_dir)/$(platform_subdir)/lib/libplatsbi.a) + $(call compile_elf,$@,$@.ld,$< $(build_dir)/$(platform_subdir)/lib/libplatsbi.a) $(build_dir)/$(platform_subdir)/%.ld: $(src_dir)/%.ldS $(call compile_cpp,$@,$<) |