summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2019-02-20 11:46:48 +0300
committerAnup Patel <anup@brainfault.org>2019-02-22 08:58:41 +0300
commit889e746fd7be97ca0dbaaf7a6a734429b7ca607f (patch)
tree43472de8184cc9bced7d5b36697f14f3d84799e1 /Makefile
parentfde1c42db35a991f62a1a8a6b26508dab486e61a (diff)
downloadopensbi-889e746fd7be97ca0dbaaf7a6a734429b7ca607f.tar.xz
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--Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 3b17d5f..ae68f55 100644
--- a/Makefile
+++ b/Makefile
@@ -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,$@,$<)