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

Re: [Minios-devel] [UNIKRAFT PATCHv4 06/43] build: Add a makefile function to warn user when GCC is too old



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

On 06.07.2018 11:03, Wei Chen wrote:
Some GCC flags, like processor flags have minimum GCC version
requirement. Add this makefile function to stop build and print
a error message to notify user that their GCC is too old.

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

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index d5372cd..f71fd6e 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -35,6 +35,13 @@ define test_gcc_version =
  $(shell echo 'if($(CC_VER_MAJOR).$(CC_VER_MINOR)>=$(1).$(2)) print "y"'| bc)
  endef
+# print error 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 test_gcc_version,$(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®.