diff make/common/shared/Defs-versions.gmk @ 3966:aa13e7702cd9

Merge
author ohair
date Tue, 29 Mar 2011 20:19:55 -0700
parents 0858c48466f0 54d8193f177b
children 241d5769859e 8e9e28663c5d
line wrap: on
line diff
--- a/make/common/shared/Defs-versions.gmk	Tue Mar 29 11:29:01 2011 -0700
+++ b/make/common/shared/Defs-versions.gmk	Tue Mar 29 20:19:55 2011 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -138,11 +138,15 @@
   endif
   REQUIRED_COMPILER_NAME      = Sun Studio 12 Update 1
   REQUIRED_COMPILER_VERSION   = SS12u1
-  ifeq ($(CC_VERSION),sun)
-    REQUIRED_CC_VER           = 5.10
-  endif
-  ifeq ($(CC_VERSION),gcc)
-    REQUIRED_CC_VER           = 3.4.3
+  # Cross-compilation compiler versions are target specific
+  # so don't set a required version if cross-compiling
+  ifndef CROSS_COMPILE_ARCH
+    ifeq ($(CC_VERSION),sun)
+      REQUIRED_CC_VER           = 5.10
+    endif
+    ifeq ($(CC_VERSION),gcc)
+      REQUIRED_CC_VER           = 3.4.3
+    endif
   endif
   REQUIRED_GCC_VER            = 2.95.2
 endif
@@ -158,11 +162,15 @@
   REQUIRED_COMPILER_NAME      = GCC4
   REQUIRED_COMPILER_VERSION   = GCC4
   REQUIRED_GCC_VER            = 2.95
-  ifeq ($(CC_VERSION),gcc)
-    REQUIRED_CC_VER           = 4.3.0
-  endif
-  ifeq ($(CC_VERSION),sun)
-    REQUIRED_CC_VER           = 5.10
+  # Cross-compilation compiler versions are target specific
+  # so don't set a required version if cross-compiling
+  ifndef CROSS_COMPILE_ARCH
+    ifeq ($(CC_VERSION),gcc)
+      REQUIRED_CC_VER           = 4.3.0
+    endif
+    ifeq ($(CC_VERSION),sun)
+      REQUIRED_CC_VER           = 5.10
+    endif
   endif
 endif