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

Re: [Minios-devel] [UNIKRAFT PATCHv5 03/46] build: Add a makefile function to print error when GCC is too old



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 10.08.2018 09:07, Wei Chen wrote:
From: Wei Chen <Wei.Chen@xxxxxxx>

Some GCC flags, like processor flags have minimum GCC version
requirement. Add this makefile function to stop build and print
an error message to notify user that their GCC is too old.

Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
  support/build/Makefile.rules | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 6e71c5e..84c33ec 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -35,6 +35,13 @@ define gcc_version_ge =
  $(shell if [ $(CC_VER_MAJOR) -gt $(1) ] || ([ $(CC_VER_MAJOR) -eq $(1) ] && [ 
$(CC_VER_MINOR) -ge $(2) ]) ; then echo y ; fi)
  endef
+# print error and stop build when GCC version doesn't meet the minimum requirement
+# error_if_gcc_version_lt $gcc_major,$gcc_minor.
+define error_if_gcc_version_lt =
+$(if $(call gcc_version_ge,$(1),$(2)),,\
+     $(error Require GCC version >= $(1).$(2) found 
$(CC_VER_MAJOR).$(CC_VER_MINOR)))
+endef
+
  
################################################################################
  #
  # Paths and Filenames


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