mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
Makefile: fix cross-compiling issues
Replace all the host paths with a prefix sysroot directory, it defaults to be empty, but can be overridden by the variable set in environment(make -e) or being passed to make command. Tracked-On: #1307 Signed-off-by: Ming Liu <liu.ming50@gmail.com>
This commit is contained in:
@@ -53,12 +53,12 @@ endif
|
||||
# its tools and libraries in different folders. The next couple of
|
||||
# variables will determine and set the right path for both the
|
||||
# tools $(GNUEFI_DIR) and libraries $(LIBDIR)
|
||||
GNUEFI_DIR := $(shell find /usr/lib* -name elf_$(ARCH)_efi.lds -type f | xargs dirname)
|
||||
GNUEFI_DIR := $(shell find $(SYSROOT)/usr/lib* -name elf_$(ARCH)_efi.lds -type f | xargs dirname)
|
||||
LIBDIR := $(subst gnuefi,,$(GNUEFI_DIR))
|
||||
CRT0 := $(GNUEFI_DIR)/crt0-efi-$(ARCH).o
|
||||
LDSCRIPT := $(GNUEFI_DIR)/elf_$(ARCH)_efi.lds
|
||||
|
||||
INCDIR := /usr/include
|
||||
INCDIR := $(SYSROOT)/usr/include
|
||||
|
||||
CFLAGS=-I. -I.. -I../../../include/arch/x86/guest -I$(INCDIR)/efi -I$(INCDIR)/efi/$(ARCH) \
|
||||
-DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding \
|
||||
|
Reference in New Issue
Block a user