1 #
2 # Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation.
8 #
9 # This code is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # version 2 for more details (a copy is included in the LICENSE file that
13 # accompanied this code).
14 #
15 # You should have received a copy of the GNU General Public License version
16 # 2 along with this work; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any
21 # questions.
22 #
31 # Note that this 'as' is an older version of the Sun Studio 'fbe', and will
32 # use the older style options. The 'fbe' options will match 'cc' and 'CC'.
33 AS = /usr/ccs/bin/as
34
35 NM = /usr/ccs/bin/nm
36 NAWK = /bin/nawk
37
38 MCS = /usr/ccs/bin/mcs
39 STRIP = /usr/ccs/bin/strip
40 endif
41
42 # Check for the versions of C++ and C compilers ($CXX and $CC) used.
43
44 # Get the last thing on the line that looks like x.x+ (x is a digit).
45 COMPILER_REV := \
46 $(shell $(CXX) -V 2>&1 | sed -n 's/^.*[ ,\t]C++[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
47 CC_COMPILER_REV := \
48 $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
49
50 # Pick which compiler is validated
51 ifeq ($(JRE_RELEASE_VER),1.6.0)
52 # Validated compiler for JDK6 is SS11 (5.8)
53 VALIDATED_COMPILER_REVS := 5.8
54 VALIDATED_CC_COMPILER_REVS := 5.8
55 else
56 # Validated compiler for JDK9 is SS12.3 (5.12)
57 VALIDATED_COMPILER_REVS := 5.12
58 VALIDATED_CC_COMPILER_REVS := 5.12
59 endif
60
61 # Warning messages about not using the above validated versions
62 ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS})
63 ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),)
64 PRINTABLE_CC_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_COMPILER_REV})
65 dummy_var_to_enforce_compiler_rev := $(shell \
66 echo >&2 WARNING: You are using CC version ${COMPILER_REV} and \
67 should be using version ${PRINTABLE_CC_REVS}.; \
68 echo >&2 Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this \
69 warning.)
70 endif
71
72 ENFORCE_CC_COMPILER_REV${ENFORCE_CC_COMPILER_REV} := $(strip ${VALIDATED_CC_COMPILER_REVS})
73 ifeq ($(filter ${ENFORCE_CC_COMPILER_REV},${CC_COMPILER_REV}),)
74 PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_CC_COMPILER_REV})
75 dummy_var_to_enforce_c_compiler_rev := $(shell \
76 echo >&2 WARNING: You are using cc version ${CC_COMPILER_REV} and \
77 should be using version ${PRINTABLE_C_REVS}.; \
78 echo >&2 Set ENFORCE_CC_COMPILER_REV=${CC_COMPILER_REV} to avoid this \
79 warning.)
|
1 #
2 # Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation.
8 #
9 # This code is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # version 2 for more details (a copy is included in the LICENSE file that
13 # accompanied this code).
14 #
15 # You should have received a copy of the GNU General Public License version
16 # 2 along with this work; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any
21 # questions.
22 #
31 # Note that this 'as' is an older version of the Sun Studio 'fbe', and will
32 # use the older style options. The 'fbe' options will match 'cc' and 'CC'.
33 AS = /usr/ccs/bin/as
34
35 NM = /usr/ccs/bin/nm
36 NAWK = /bin/nawk
37
38 MCS = /usr/ccs/bin/mcs
39 STRIP = /usr/ccs/bin/strip
40 endif
41
42 # Check for the versions of C++ and C compilers ($CXX and $CC) used.
43
44 # Get the last thing on the line that looks like x.x+ (x is a digit).
45 COMPILER_REV := \
46 $(shell $(CXX) -V 2>&1 | sed -n 's/^.*[ ,\t]C++[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
47 CC_COMPILER_REV := \
48 $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
49
50 # Pick which compiler is validated
51 # Validated compiler for JDK9 is SS12.3 (5.12)
52 VALIDATED_COMPILER_REVS := 5.12
53 VALIDATED_CC_COMPILER_REVS := 5.12
54
55 # Warning messages about not using the above validated versions
56 ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS})
57 ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),)
58 PRINTABLE_CC_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_COMPILER_REV})
59 dummy_var_to_enforce_compiler_rev := $(shell \
60 echo >&2 WARNING: You are using CC version ${COMPILER_REV} and \
61 should be using version ${PRINTABLE_CC_REVS}.; \
62 echo >&2 Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this \
63 warning.)
64 endif
65
66 ENFORCE_CC_COMPILER_REV${ENFORCE_CC_COMPILER_REV} := $(strip ${VALIDATED_CC_COMPILER_REVS})
67 ifeq ($(filter ${ENFORCE_CC_COMPILER_REV},${CC_COMPILER_REV}),)
68 PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_CC_COMPILER_REV})
69 dummy_var_to_enforce_c_compiler_rev := $(shell \
70 echo >&2 WARNING: You are using cc version ${CC_COMPILER_REV} and \
71 should be using version ${PRINTABLE_C_REVS}.; \
72 echo >&2 Set ENFORCE_CC_COMPILER_REV=${CC_COMPILER_REV} to avoid this \
73 warning.)
|