From: Gabe Black Date: Tue, 14 Jan 2020 01:18:24 +0000 (-0800) Subject: arm: A couple small fixes for the arm64 bootloader makefile. X-Git-Tag: v19.0.0.0~105 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aedaa1994e84cbb112280a5af5278235148789b0;p=gem5.git 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 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini Tested-by: kokoro --- 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