Imported Upstream version 1.72.0
[platform/upstream/boost.git] / tools / build / src / tools / common.jam
index 535ef4d..26a8270 100644 (file)
@@ -974,13 +974,13 @@ local rule toolset-tag ( name : type ? : property-set )
     }
 
     # From GCC 5, versioning changes and minor becomes patch
-    if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
+    if $(tag) = gcc && $(version[1]) && [ numbers.less 4 $(version[1]) ]
     {
         version = $(version[1]) ;
     }
 
     # Ditto, from Clang 4
-    if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
+    if ( $(tag) = clang || $(tag) = clangw ) && $(version[1]) && [ numbers.less 3 $(version[1]) ]
     {
         version = $(version[1]) ;
     }