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

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


  • To: <minios-devel@xxxxxxxxxxxxxxxxxxxx>, <simon.kuenzer@xxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Fri, 6 Jul 2018 09:03:19 +0000
  • Authentication-results: spf=fail (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Cc: Kaly.Xin@xxxxxxx, nd@xxxxxxx, wei.chen@xxxxxxx
  • Delivery-date: Fri, 06 Jul 2018 09:04:58 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Nodisclaimer: True
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

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