41fceafb09
seabios integration interprets the CC variable with a special case when ccache is prepended to the compiler. Since the integration also tries to extract compiler flags (which I'm not sure we still add to CC _ever_), that also needs to look at only the part of the string that contains compiler and (maybe) flags, so skip the first word if it was determined to be the path to the ccache binary. Change-Id: I717863f456bf4fd6f08427d86633079ecda039df Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/11227 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
66 lines
2.6 KiB
Makefile
66 lines
2.6 KiB
Makefile
################################################################################
|
|
##
|
|
## This file is part of the coreboot project.
|
|
##
|
|
## Copyright (C) 2009-2010 coresystems GmbH
|
|
## Copyright (C) 2015 Google Inc.
|
|
##
|
|
## This program is free software; you can redistribute it and/or modify
|
|
## it under the terms of the GNU General Public License as published by
|
|
## the Free Software Foundation; version 2 of the License.
|
|
##
|
|
## This program is distributed in the hope that it will be useful,
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
## GNU General Public License for more details.
|
|
##
|
|
## You should have received a copy of the GNU General Public License
|
|
## along with this program; if not, write to the Free Software
|
|
## Foundation, Inc.
|
|
##
|
|
|
|
ifeq ($(CONFIG_PAYLOAD_ELF),y)
|
|
COREBOOT_ROM_DEPENDENCIES+=$(CONFIG_PAYLOAD_FILE)
|
|
endif
|
|
ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
|
|
COREBOOT_ROM_DEPENDENCIES+=seabios
|
|
endif
|
|
ifeq ($(CONFIG_PAYLOAD_FILO),y)
|
|
COREBOOT_ROM_DEPENDENCIES+=filo
|
|
endif
|
|
ifeq ($(CONFIG_PAYLOAD_GRUB2),y)
|
|
COREBOOT_ROM_DEPENDENCIES+=grub2
|
|
endif
|
|
|
|
SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1)
|
|
seabios:
|
|
$(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc \
|
|
HOSTCC="$(HOSTCC)" \
|
|
CC=$(word $(SEABIOS_CC_OFFSET),$(CC_x86_32)) CFLAGS="$(patsubst $(word $(SEABIOS_CC_OFFSET),$(CC_x86_32))%,,$(wordlist $(SEABIOS_CC_OFFSET),9999,$(CC_x86_32)))" \
|
|
LD=$(word 1,$(LD_x86_32)) LDFLAGS="$(patsubst $(word 1,$(LD_x86_32))%,,$(LD_x86_32))" \
|
|
OBJDUMP="$(OBJDUMP_x86_32)" \
|
|
OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
|
|
AS="$(AS_x86_32)" IASL="$(IASL)" \
|
|
CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \
|
|
CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \
|
|
CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \
|
|
CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \
|
|
CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \
|
|
CONFIG_TTYS0_BASE=$(CONFIG_TTYS0_BASE) \
|
|
CONFIG_SEABIOS_MALLOC_UPPERMEMORY=$(CONFIG_SEABIOS_MALLOC_UPPERMEMORY)
|
|
|
|
filo:
|
|
$(MAKE) -C payloads/external/FILO -f Makefile.inc \
|
|
HOSTCC="$(HOSTCC)" \
|
|
CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \
|
|
OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
|
|
CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \
|
|
CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE)
|
|
|
|
|
|
grub2:
|
|
$(MAKE) -C payloads/external/GRUB2 -f Makefile.inc \
|
|
HOSTCC="$(HOSTCC)" \
|
|
CC="$(CC_x86_32)" LD="$(LD_x86_32)" OBJDUMP="$(OBJDUMP_x86_32)" \
|
|
OBJCOPY="$(OBJCOPY_x86_32)" STRIP="$(STRIP_x86_32)" \
|
|
CONFIG_GRUB2_MASTER=$(CONFIG_GRUB2_MASTER)
|