summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2020-01-13 17:18:24 -0800
committerGabe Black <gabeblack@google.com>2020-01-16 00:08:14 +0000
commitaedaa1994e84cbb112280a5af5278235148789b0 (patch)
tree7fdd01252d2b991706ced87dbf63f61d0983d200 /system
parent703884c0fed98a2b27c74b32515e761b12c86742 (diff)
downloadgem5-aedaa1994e84cbb112280a5af5278235148789b0.tar.xz
arm: A couple small fixes for the arm64 bootloader makefile.
First, remove a deprecated flag that gcc no longer recognizes. Second, disable suffix based implicit makefile rules. These, in combination with the %.o: boot.S rule, were tricking make into deleting it's own makefile. How, you might ask? make wants to update its makefile, since that's a thing it does automatically. This is useful if you, for instance, have computed header dependencies. make decides it can make a file called "makefile" from a file called "makefile.o" by doing a linking step. make decides it can make makefile.o from boot.S from the %.o: boot.S rule, which it does. It then attempts to link makefile.o into makefile, but that fails because it lacks a "main" function since it's using a built in rule which doesn't know not to expect main. The makefile is clobbered in the process. make then deletes makefile.o because it was an implicit target, eliminating all the evidence. Change-Id: Ib0dfc333dc554caf5772dd8468dba6ba821f98ac Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24329 Reviewed-by: Chun-Chen TK Hsu <chunchenhsu@google.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'system')
-rw-r--r--system/arm/bootloader/arm64/makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/arm/bootloader/arm64/makefile b/system/arm/bootloader/arm64/makefile
index 4834cf535..fd5f69f5b 100644
--- a/system/arm/bootloader/arm64/makefile
+++ b/system/arm/bootloader/arm64/makefile
@@ -28,6 +28,8 @@ CROSS_COMPILE = aarch64-linux-gnu-
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
+.SUFFIXES:
+
BUILDDIR = .
DESTDIR = $(error Please set DESTDIR to wanted installation directory)
@@ -37,7 +39,7 @@ CPPFLAGS = -DPHYS_OFFSET=0x80000000 -DCNTFRQ=0x01800000 \
-Dkernel=0x80080000 \
-Dmbox=0x8000fff8 -Ddtb=0x80000100
-LDFLAGS = -N -Ttext 0x00000010 -non_shared -static
+LDFLAGS = -N -Ttext 0x00000010 -static
.PHONY: all clean install mkdir