[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v2 5/9] plat: Add -DxxxPLAT define for each platform



Hi Yuri,


On 12/17/18 5:16 PM, Yuri Volchkov wrote:
Looks good to me,
Reviewed-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>

But, why you did not add the definition to CXXFLAGS for linuxu and
KVM? Only to XEN.

Good question. I should add it, I think, even though no C++ code currently uses this, just so it's consistent.


Florian Schmidt <florian.schmidt@xxxxxxxxx> writes:

This allows common code to distinguish for which platform it is
currently being built.

Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
---
  plat/kvm/Makefile.uk    | 3 +++
  plat/linuxu/Makefile.uk | 3 +++
  plat/xen/Makefile.uk    | 6 +++---
  3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/plat/kvm/Makefile.uk b/plat/kvm/Makefile.uk
index b04a9868..b4e03223 100644
--- a/plat/kvm/Makefile.uk
+++ b/plat/kvm/Makefile.uk
@@ -18,6 +18,9 @@ LIBKVMPLAT_ASINCLUDES-y        += 
-I$(UK_PLAT_COMMON_BASE)/include
  LIBKVMPLAT_CINCLUDES-y         += -I$(LIBKVMPLAT_BASE)/include
  LIBKVMPLAT_CINCLUDES-y         += -I$(UK_PLAT_COMMON_BASE)/include
+LIBKVMPLAT_ASFLAGS += -DKVMPLAT
+LIBKVMPLAT_CFLAGS              += -DKVMPLAT
+
  ##
  ## Architecture library definitions for x86_64
  ##
diff --git a/plat/linuxu/Makefile.uk b/plat/linuxu/Makefile.uk
index f466d8a3..3c59de44 100644
--- a/plat/linuxu/Makefile.uk
+++ b/plat/linuxu/Makefile.uk
@@ -16,6 +16,9 @@ LIBLINUXUPLAT_ASINCLUDES-y        += 
-I$(UK_PLAT_COMMON_BASE)/include
  LIBLINUXUPLAT_CINCLUDES-y         += -I$(LIBLINUXUPLAT_BASE)/include
  LIBLINUXUPLAT_CINCLUDES-y         += -I$(UK_PLAT_COMMON_BASE)/include
+LIBLINUXUPLAT_ASFLAGS += -DLINUXUPLAT
+LIBLINUXUPLAT_CFLAGS              += -DLINUXUPLAT
+
  LIBLINUXUPLAT_SRCS-$(CONFIG_ARCH_X86_32) += 
$(LIBLINUXUPLAT_BASE)/x86/entry32.S
  LIBLINUXUPLAT_SRCS-$(CONFIG_ARCH_X86_64) += 
$(LIBLINUXUPLAT_BASE)/x86/entry64.S
  LIBLINUXUPLAT_SRCS-$(CONFIG_ARCH_ARM_32) += 
$(LIBLINUXUPLAT_BASE)/arm/entry32.S
diff --git a/plat/xen/Makefile.uk b/plat/xen/Makefile.uk
index 7e8f114c..43866e4b 100644
--- a/plat/xen/Makefile.uk
+++ b/plat/xen/Makefile.uk
@@ -14,9 +14,9 @@ $(eval $(call 
addplatlib_s,xen,libxenbus,$(CONFIG_XEN_XENBUS)))
  ##
  ## Xen platform compilation settings
  ##
-LIBXENPLAT_ASFLAGS-y     += 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
-LIBXENPLAT_CFLAGS-y      += 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
-LIBXENPLAT_CXXFLAGS-y    += 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
+LIBXENPLAT_ASFLAGS-y     += -DXENPLAT 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
+LIBXENPLAT_CFLAGS-y      += -DXENPLAT 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
+LIBXENPLAT_CXXFLAGS-y    += -DXENPLAT 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
##
  ## Platform library definitions
--
2.19.2



--
Dr. Florian Schmidt
フローリアン・シュミット
Research Scientist,
Systems and Machine Learning Group
NEC Laboratories Europe
Kurfürsten-Anlage 36, D-69115 Heidelberg
Tel.     +49 (0)6221 4342-265
Fax:     +49 (0)6221 4342-155
e-mail:  florian.schmidt@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.