9os

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 164e74ae810ffa1a0a5dc23e1fb1d5ed7f32afe6
parent 56df9aed3e88ded5cdf667e7060fb13c65053834
Author: Roberto Vargas <roberto.vargas@arm.com>
Date:   Fri,  2 Nov 2018 07:30:27 +0000

[arch/arm64] Move .tst rules to arm64 Makefile

These rules are going to be used only in arm64 rmode
target, so it doesn't make sense to have them in a
global rules.mk file. In case of being needed to use
them in a different file these sules can be stored in
a rules.mk specific to arch/.

Diffstat:
March/arm64/Makefile | 24++++++++++++++++++++----
Mscripts/rules.mk | 14+-------------
2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile @@ -23,9 +23,6 @@ LIBDEP = $(LIBDIR)/libhdl.a $(LIBDIR)/librmu.a $(LIBDIR)/libc.a all: $(TARGET) -$(BINDIR)/ramfw.bin: $(BINDIR)/ramfw.tst -$(BINDIR)/romfw.bin: $(BINDIR)/romfw.tst - ram-crt-none.o rom-crt-none.o: crt-none.s ram-crt-linux.o rom-crt-linux.o: crt-linux.s @@ -36,6 +33,25 @@ $(BINDIR)/ramfw.elf: $(RAMOBJS) $(LIBDEP) $(LD) $(RCODE_LDFLAGS) $(RAMOBJS) $(LIBS) -o $@ clean: - rm -f cdeps rm -f $(TARGET:.bin=.elf) rm -f $(TARGET:.bin=.tst) + +# +# Rules to verify that the binary images doesn't have data or bss +# +.SUFFIXES: .tst + +$(BINDIR)/ramfw.bin: $(BINDIR)/ramfw.tst +$(BINDIR)/romfw.bin: $(BINDIR)/romfw.tst + +.elf.tst: + @test $(SYS) != "rmode" && exit; \ + size $< | \ + awk 'NR == 2 {\ + if ($$2 != 0 || $$3 != 0) {\ + printf("image %s with data section!\n",\ + "$<") > "/dev/stderr";\ + exit 1;\ + }\ + }' + touch $@ diff --git a/scripts/rules.mk b/scripts/rules.mk @@ -36,7 +36,7 @@ LD = $(CROSS_COMPILE)$(LINKER) OC = $(CROSS_COMPILE)$(OBJCOPY) HOSTCC=$(COMP) -.SUFFIXES: .elf .bin .tst +.SUFFIXES: .elf .bin .c.o: $(CC) $(RCODE_CFLAGS) -o $@ -c $< @@ -66,18 +66,6 @@ FORCE: .elf.bin: $(OC) -O binary $< $@ -.elf.tst: - @test $(SYS) != "none" && exit; \ - size $< | \ - awk 'NR == 2 {\ - if ($$2 != 0 || $$3 != 0) {\ - printf("image %s with data section!\n",\ - "$<") > "/dev/stderr";\ - exit 1;\ - }\ - }' - touch $@ - cbmc: all FORCE cbmc $(INCLUDES) $(CBMC_FLAGS) $(CBMC_PATHS)