changeset 9641:09f5dc197df8

8141416: "expr: syntax error" due to gcc -dumpversion excluding micro Reviewed-by: erikj, stuefe
author simonis
date Thu, 05 Nov 2015 10:55:58 +0100
parents 40bd4478a362
children f6fe5d638924
files make/linux/makefiles/gcc.make
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/make/linux/makefiles/gcc.make	Wed Nov 04 07:23:23 2015 -1000
+++ b/make/linux/makefiles/gcc.make	Thu Nov 05 10:55:58 2015 +0100
@@ -61,6 +61,11 @@
   CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
   CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
   CC_VER_MICRO := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f3)
+  # Workaround Ubuntu bug where -dumpversion doesn't print a micro version
+  # https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1360404
+  ifeq ($(CC_VER_MICRO),)
+    CC_VER_MICRO := "0"
+  endif
 endif
 
 ifeq ($(USE_CLANG), true)