[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCHv4 07/43] build: Add a makefile function to check and set flags for valid gcc
Some times, we will add special flags to GCC to do optimization. For instance, we can use this function to check valid GCC and set flags to do processors optimization. In order to avoid any definition clashes, we define this function in support/build/Makefile.rules. Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx> --- support/build/Makefile.rules | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules index f71fd6e..261b8f5 100644 --- a/support/build/Makefile.rules +++ b/support/build/Makefile.rules @@ -42,6 +42,14 @@ $(if $(call test_gcc_version,$(1),$(2)),,\ $(error Require GCC version >= $(1).$(2) found $(CC_VER_MAJOR).$(CC_VER_MINOR))) endef +# set_flags_if_gcc_version_ge $gcc_major,$gcc_minor,$flags +define set_flags_if_gcc_version_ge = +$(call error_if_gcc_version_lt,$(1),$(2)) +ASFLAGS-$(1) += $(3) +CFLAGS-$(1) += $(3) +CXXFLAGS-$(1) += $(3) +endef + ################################################################################ # # Paths and Filenames -- 2.17.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |