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

Re: [Minios-devel] [UNIKRAFT PATCH] build: Introduce OS macro `__Unikraft__`



Hi Simon,

Looks good, thanks.

-- Felipe

Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>

On 18.04.19, 11:26, "Simon Kuenzer" <simon.kuenzer@xxxxxxxxx> wrote:

    Similar to other Unix-like OSes (e.g., Linux using `__linux__`,
    FreeBSD using `__FreeBSD__`, Minix using `__minix`) we are defining
    our own OS macro called `__Unikraft__`. It is handed over to every
    build unit. This is done to make porting of libraries easier. This
    macro can then be used in configuration sections where one need to
    distinguish depending on the target OS.
    
    Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
    ---
     Makefile.uk | 12 +++++++++---
     1 file changed, 9 insertions(+), 3 deletions(-)
    
    diff --git a/Makefile.uk b/Makefile.uk
    index 58b0f1ff..c7a08fb0 100644
    --- a/Makefile.uk
    +++ b/Makefile.uk
    @@ -53,9 +53,15 @@ CFLAGS-$(CONFIG_DEBUG_SYMBOLS_LVL3)       += -g3
     CXXFLAGS-$(CONFIG_DEBUG_SYMBOLS_LVL3)     += -g3
     endif
     
    -ASFLAGS  += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION) 
-DUK_FULLVERSION=$(UK_FULLVERSION) -DUK_CODENAME="$(UK_CODENAME)"
    -CFLAGS   += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION) 
-DUK_FULLVERSION=$(UK_FULLVERSION) -DUK_CODENAME="$(UK_CODENAME)"
    -CXXFLAGS += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION) 
-DUK_FULLVERSION=$(UK_FULLVERSION) -DUK_CODENAME="$(UK_CODENAME)"
    +ASFLAGS  += -D __Unikraft__ -DUK_CODENAME="$(UK_CODENAME)"
    +ASFLAGS  += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION)
    +ASFLAGS  += -DUK_FULLVERSION=$(UK_FULLVERSION)
    +CFLAGS   += -D __Unikraft__ -DUK_CODENAME="$(UK_CODENAME)"
    +CFLAGS   += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION)
    +CFLAGS   += -DUK_FULLVERSION=$(UK_FULLVERSION)
    +CXXFLAGS += -D __Unikraft__ -DUK_CODENAME="$(UK_CODENAME)"
    +CXXFLAGS += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION)
    +CXXFLAGS += -DUK_FULLVERSION=$(UK_FULLVERSION)
     
     # If GCC supports "-no-pie" flag, we will add this flag to link flags to
     # override "pie" option, because some distributions will set
    -- 
    2.20.1
    
    

_______________________________________________
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®.