changeset 6671:57b41a96abbc

8048298: Clang needs to lower optimization level for some files Summary: Optimization options need to be lowered for some files when using clang 5.0 and 5.1 Reviewed-by: twisti
author iveresov
date Thu, 26 Jun 2014 12:01:44 -0700
parents 3a2e97446c5f
children 0de050947628
files make/bsd/makefiles/gcc.make
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/gcc.make	Mon Jun 23 04:44:02 2014 +0000
+++ b/make/bsd/makefiles/gcc.make	Thu Jun 26 12:01:44 2014 -0700
@@ -322,9 +322,20 @@
 
 # Work around some compiler bugs.
 ifeq ($(USE_CLANG), true)
+  # Clang 4.2
   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
     OPT_CFLAGS/unsafe.o += -O1
+  # Clang 5.0
+  else ifeq ($(shell expr $(CC_VER_MAJOR) = 5 \& $(CC_VER_MINOR) = 0), 1)
+    OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
+    OPT_CFLAGS/unsafe.o += -O1
+  # Clang 5.1
+  else ifeq ($(shell expr $(CC_VER_MAJOR) = 5 \& $(CC_VER_MINOR) = 1), 1)
+    OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
+    OPT_CFLAGS/unsafe.o += -O1
+  else
+    $(error "Update compiler workarounds for Clang $(CC_VER_MAJOR).$(CC_VER_MINOR)")
   endif
 else
   # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.