arm: A couple small fixes for the arm64 bootloader makefile.
authorGabe Black <gabeblack@google.com>
Tue, 14 Jan 2020 01:18:24 +0000 (17:18 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 16 Jan 2020 00:08:14 +0000 (00:08 +0000)
commitaedaa1994e84cbb112280a5af5278235148789b0
tree7fdd01252d2b991706ced87dbf63f61d0983d200
parent703884c0fed98a2b27c74b32515e761b12c86742
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>
system/arm/bootloader/arm64/makefile