[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 2/4] build: make all linker scripts preprocessable
This will allow to apply some code de-duplication, and makes build system a little bit homogeneous against linker scripts Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx> --- plat/kvm/Linker.uk | 4 ++-- plat/kvm/Makefile.uk | 5 +++-- plat/kvm/x86/{link64.lds => link64.lds.S} | 0 plat/xen/arm/{link32.lds => link32.lds.S} | 0 plat/xen/x86/{link64.lds => link64.lds.S} | 0 5 files changed, 5 insertions(+), 4 deletions(-) rename plat/kvm/x86/{link64.lds => link64.lds.S} (100%) rename plat/xen/arm/{link32.lds => link32.lds.S} (100%) rename plat/xen/x86/{link64.lds => link64.lds.S} (100%) diff --git a/plat/kvm/Linker.uk b/plat/kvm/Linker.uk index ba08bc5c..02bd382d 100644 --- a/plat/kvm/Linker.uk +++ b/plat/kvm/Linker.uk @@ -1,11 +1,11 @@ ifeq (x86_64,$(CONFIG_UK_ARCH)) -KVM_LDSCRIPT := $(CONFIG_UK_BASE)/plat/kvm/x86/link64.lds KVM_LDFLAGS-y += -Wl,-m,elf_x86_64 else ifeq (arm64,$(CONFIG_UK_ARCH)) KVM_LDFLAGS-y += -Wl,-m,aarch64elf -KVM_LDSCRIPT := $(call src2lds,libkvmplat,$(KVM_LDSCRIPT_SRC)) endif +KVM_LDSCRIPT := $(call src2lds,libkvmplat,$(KVM_LDSCRIPT_SRC-y)) + ## ## Link image ## diff --git a/plat/kvm/Makefile.uk b/plat/kvm/Makefile.uk index b9a93a11..46c5800d 100644 --- a/plat/kvm/Makefile.uk +++ b/plat/kvm/Makefile.uk @@ -26,6 +26,7 @@ LIBKVMPLAT_CXXFLAGS += -DKVMPLAT ## ## Architecture library definitions for x86_64 ## +KVM_LDSCRIPT_SRC-$(CONFIG_ARCH_X86_64) := $(CONFIG_UK_BASE)/plat/kvm/x86/link64.lds.S LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/x86/trace.c|common LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/x86/traps.c|common LIBKVMPLAT_TRAPS_COMMON_FLAGS += $(NO_X86_EXTREGS_FLAGS) @@ -55,11 +56,10 @@ endif ## ## Architecture library definitions for arm64 ## -KVM_LDSCRIPT_SRC := $(CONFIG_UK_BASE)/plat/kvm/arm/link64.lds.S ifeq ($(findstring y,$(CONFIG_KVM_KERNEL_SERIAL_CONSOLE) $(CONFIG_KVM_DEBUG_SERIAL_CONSOLE)),y) LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(UK_PLAT_COMMON_BASE)/arm/pl011.c|common endif -LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(KVM_LDSCRIPT_SRC) +KVM_LDSCRIPT_SRC-$(CONFIG_ARCH_ARM_64) := $(CONFIG_UK_BASE)/plat/kvm/arm/link64.lds.S LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(UK_PLAT_COMMON_BASE)/arm/cpu_native.c|common LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(UK_PLAT_COMMON_BASE)/arm/cache64.S|common LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(UK_PLAT_COMMON_BASE)/arm/psci_arm64.S|common @@ -78,6 +78,7 @@ LIBKVMPLAT_SRCS-y += $(LIBKVMPLAT_BASE)/irq.c LIBKVMPLAT_SRCS-y += $(LIBKVMPLAT_BASE)/io.c LIBKVMPLAT_SRCS-y += $(UK_PLAT_COMMON_BASE)/lcpu.c|common LIBKVMPLAT_SRCS-y += $(UK_PLAT_COMMON_BASE)/memory.c|common +LIBKVMPLAT_SRCS-y += $(KVM_LDSCRIPT_SRC-y) ## ## PCI library definitions diff --git a/plat/kvm/x86/link64.lds b/plat/kvm/x86/link64.lds.S similarity index 100% rename from plat/kvm/x86/link64.lds rename to plat/kvm/x86/link64.lds.S diff --git a/plat/xen/arm/link32.lds b/plat/xen/arm/link32.lds.S similarity index 100% rename from plat/xen/arm/link32.lds rename to plat/xen/arm/link32.lds.S diff --git a/plat/xen/x86/link64.lds b/plat/xen/x86/link64.lds.S similarity index 100% rename from plat/xen/x86/link64.lds rename to plat/xen/x86/link64.lds.S -- 2.19.2 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |