Allow setting the path to as, ld, objcopy, objdump, strip and python from the environment.
This is required for building SeaBIOS on FreeBSD, which will switch the default ld to lld very soon, and lld is not capable of building SeaBIOS at the moment.
Building SeaBIOS on FreeBSD after the switch to lld will require setting LD=/path/to/gnu/ld at build time.
Signed-off-by: Roger Pau Monné roger.pau@citrix.com --- Cc: Kevin O'Connor kevin@koconnor.net Cc: Ed Maste emaste@freebsd.org --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile index eb8ad58..0fcb1bf 100644 --- a/Makefile +++ b/Makefile @@ -17,12 +17,12 @@ CROSS_PREFIX= ifneq ($(CROSS_PREFIX),) CC=$(CROSS_PREFIX)gcc endif -AS=$(CROSS_PREFIX)as -LD=$(CROSS_PREFIX)ld -OBJCOPY=$(CROSS_PREFIX)objcopy -OBJDUMP=$(CROSS_PREFIX)objdump -STRIP=$(CROSS_PREFIX)strip -PYTHON=python +AS?=$(CROSS_PREFIX)as +LD?=$(CROSS_PREFIX)ld +OBJCOPY?=$(CROSS_PREFIX)objcopy +OBJDUMP?=$(CROSS_PREFIX)objdump +STRIP?=$(CROSS_PREFIX)strip +PYTHON?=python CPP=cpp IASL:=iasl LD32BIT_FLAG:=-melf_i386
On Tue, Jan 23, 2018 at 03:34:16PM +0000, Roger Pau Monne wrote:
Allow setting the path to as, ld, objcopy, objdump, strip and python from the environment.
This is required for building SeaBIOS on FreeBSD, which will switch the default ld to lld very soon, and lld is not capable of building SeaBIOS at the moment.
Building SeaBIOS on FreeBSD after the switch to lld will require setting LD=/path/to/gnu/ld at build time.
Thanks Roger, however, I find it a bit confusing for the makefile rules to implicitly pull in variables from the environment. (It makes it hard to track down build failures as the dependency on the environment can be complex.) So, I think if a make variable is to be overridden it should be done on the command line (eg, make LD=xyz).
-Kevin