Mercurial > hg > graal-compiler
comparison make/solaris/makefiles/sparcWorks.make @ 4891:719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
Summary: Cleaned up make variables for compilers and linker to consistently use CXX for C++ compiler, CC for C compiler and LD for linker.
Reviewed-by: dholmes, ohrstrom
author | erikj |
---|---|
date | Mon, 06 Feb 2012 09:14:22 +0100 |
parents | da0999c4b733 |
children | 7292cff45988 d652a62d6e03 |
comparison
equal
deleted
inserted
replaced
4890:c77d473e71f7 | 4891:719f7007c8e8 |
---|---|
24 | 24 |
25 # Compiler-specific flags for sparcworks. | 25 # Compiler-specific flags for sparcworks. |
26 | 26 |
27 # tell make which C and C++ compilers to use | 27 # tell make which C and C++ compilers to use |
28 CC = cc | 28 CC = cc |
29 CPP = CC | 29 CXX = CC |
30 | 30 |
31 # Note that this 'as' is an older version of the Sun Studio 'fbe', and will | 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'. | 32 # use the older style options. The 'fbe' options will match 'cc' and 'CC'. |
33 AS = /usr/ccs/bin/as | 33 AS = /usr/ccs/bin/as |
34 | 34 |
35 NM = /usr/ccs/bin/nm | 35 NM = /usr/ccs/bin/nm |
36 NAWK = /bin/nawk | 36 NAWK = /bin/nawk |
37 | 37 |
38 REORDER_FLAG = -xF | 38 REORDER_FLAG = -xF |
39 | 39 |
40 # Check for the versions of C++ and C compilers ($CPP and $CC) used. | 40 # Check for the versions of C++ and C compilers ($CXX and $CC) used. |
41 | 41 |
42 # Get the last thing on the line that looks like x.x+ (x is a digit). | 42 # Get the last thing on the line that looks like x.x+ (x is a digit). |
43 COMPILER_REV := \ | 43 COMPILER_REV := \ |
44 $(shell $(CPP) -V 2>&1 | sed -n 's/^.*[ ,\t]C++[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') | 44 $(shell $(CXX) -V 2>&1 | sed -n 's/^.*[ ,\t]C++[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') |
45 C_COMPILER_REV := \ | 45 CC_COMPILER_REV := \ |
46 $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') | 46 $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') |
47 | 47 |
48 # Pick which compiler is validated | 48 # Pick which compiler is validated |
49 ifeq ($(JRE_RELEASE_VER),1.6.0) | 49 ifeq ($(JRE_RELEASE_VER),1.6.0) |
50 # Validated compiler for JDK6 is SS11 (5.8) | 50 # Validated compiler for JDK6 is SS11 (5.8) |
51 VALIDATED_COMPILER_REVS := 5.8 | 51 VALIDATED_COMPILER_REVS := 5.8 |
52 VALIDATED_C_COMPILER_REVS := 5.8 | 52 VALIDATED_CC_COMPILER_REVS := 5.8 |
53 else | 53 else |
54 # Validated compiler for JDK7 is SS12 update 1 + patches (5.10) | 54 # Validated compiler for JDK7 is SS12 update 1 + patches (5.10) |
55 VALIDATED_COMPILER_REVS := 5.10 | 55 VALIDATED_COMPILER_REVS := 5.10 |
56 VALIDATED_C_COMPILER_REVS := 5.10 | 56 VALIDATED_CC_COMPILER_REVS := 5.10 |
57 endif | 57 endif |
58 | 58 |
59 # Warning messages about not using the above validated versions | 59 # Warning messages about not using the above validated versions |
60 ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS}) | 60 ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS}) |
61 ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),) | 61 ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),) |
65 should be using version ${PRINTABLE_CC_REVS}.; \ | 65 should be using version ${PRINTABLE_CC_REVS}.; \ |
66 echo >&2 Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this \ | 66 echo >&2 Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this \ |
67 warning.) | 67 warning.) |
68 endif | 68 endif |
69 | 69 |
70 ENFORCE_C_COMPILER_REV${ENFORCE_C_COMPILER_REV} := $(strip ${VALIDATED_C_COMPILER_REVS}) | 70 ENFORCE_CC_COMPILER_REV${ENFORCE_CC_COMPILER_REV} := $(strip ${VALIDATED_CC_COMPILER_REVS}) |
71 ifeq ($(filter ${ENFORCE_C_COMPILER_REV},${C_COMPILER_REV}),) | 71 ifeq ($(filter ${ENFORCE_CC_COMPILER_REV},${CC_COMPILER_REV}),) |
72 PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_C_COMPILER_REV}) | 72 PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_CC_COMPILER_REV}) |
73 dummy_var_to_enforce_c_compiler_rev := $(shell \ | 73 dummy_var_to_enforce_c_compiler_rev := $(shell \ |
74 echo >&2 WARNING: You are using cc version ${C_COMPILER_REV} and \ | 74 echo >&2 WARNING: You are using cc version ${CC_COMPILER_REV} and \ |
75 should be using version ${PRINTABLE_C_REVS}.; \ | 75 should be using version ${PRINTABLE_C_REVS}.; \ |
76 echo >&2 Set ENFORCE_C_COMPILER_REV=${C_COMPILER_REV} to avoid this \ | 76 echo >&2 Set ENFORCE_CC_COMPILER_REV=${CC_COMPILER_REV} to avoid this \ |
77 warning.) | 77 warning.) |
78 endif | 78 endif |
79 | 79 |
80 COMPILER_REV_NUMERIC := $(shell echo $(COMPILER_REV) | awk -F. '{ print $$1 * 100 + $$2 }') | 80 COMPILER_REV_NUMERIC := $(shell echo $(COMPILER_REV) | awk -F. '{ print $$1 * 100 + $$2 }') |
81 | 81 |
96 } \ | 96 } \ |
97 } \ | 97 } \ |
98 } \ | 98 } \ |
99 END { exit rc; }' | 99 END { exit rc; }' |
100 | 100 |
101 LINK_LIB.CC/PRE_HOOK += $(JVM_CHECK_SYMBOLS) || exit 1; | 101 LINK_LIB.CXX/PRE_HOOK += $(JVM_CHECK_SYMBOLS) || exit 1; |
102 | 102 |
103 # New architecture options started in SS12 (5.9), we need both styles to build. | 103 # New architecture options started in SS12 (5.9), we need both styles to build. |
104 # The older arch options for SS11 (5.8) or older and also for /usr/ccs/bin/as. | 104 # The older arch options for SS11 (5.8) or older and also for /usr/ccs/bin/as. |
105 # Note: default for 32bit sparc is now the same as v8plus, so the | 105 # Note: default for 32bit sparc is now the same as v8plus, so the |
106 # settings below have changed all 32bit sparc builds to be v8plus. | 106 # settings below have changed all 32bit sparc builds to be v8plus. |
516 #OPT_CFLAGS += -Qoption ccfe -xglobalstatic | 516 #OPT_CFLAGS += -Qoption ccfe -xglobalstatic |
517 #DEBUG_CFLAGS += -Qoption ccfe -xglobalstatic | 517 #DEBUG_CFLAGS += -Qoption ccfe -xglobalstatic |
518 #FASTDEBUG_CFLAGS += -Qoption ccfe -xglobalstatic | 518 #FASTDEBUG_CFLAGS += -Qoption ccfe -xglobalstatic |
519 | 519 |
520 ifeq (${COMPILER_REV_NUMERIC}, 502) | 520 ifeq (${COMPILER_REV_NUMERIC}, 502) |
521 COMPILER_DATE := $(shell $(CPP) -V 2>&1 | sed -n '/^.*[ ]C++[ ]\([1-9]\.[0-9][0-9]*\)/p' | awk '{ print $$NF; }') | 521 COMPILER_DATE := $(shell $(CXX) -V 2>&1 | sed -n '/^.*[ ]C++[ ]\([1-9]\.[0-9][0-9]*\)/p' | awk '{ print $$NF; }') |
522 ifeq (${COMPILER_DATE}, 2001/01/31) | 522 ifeq (${COMPILER_DATE}, 2001/01/31) |
523 # disable -g0 in fastdebug since SC6.1 dated 2001/01/31 seems to be buggy | 523 # disable -g0 in fastdebug since SC6.1 dated 2001/01/31 seems to be buggy |
524 # use an innocuous value because it will get -g if it's empty | 524 # use an innocuous value because it will get -g if it's empty |
525 FASTDEBUG_CFLAGS = -c | 525 FASTDEBUG_CFLAGS = -c |
526 endif | 526 endif |
566 # all "#pragma ident" directives in header and source files.) | 566 # all "#pragma ident" directives in header and source files.) |
567 # This command "compresses" the .comment sections simply by | 567 # This command "compresses" the .comment sections simply by |
568 # removing repeated lines. The data can be extracted from | 568 # removing repeated lines. The data can be extracted from |
569 # binaries in the field by using "mcs -p libjvm.so" or the older | 569 # binaries in the field by using "mcs -p libjvm.so" or the older |
570 # command "what libjvm.so". | 570 # command "what libjvm.so". |
571 LINK_LIB.CC/POST_HOOK += $(MCS) -c $@ || exit 1; | 571 LINK_LIB.CXX/POST_HOOK += $(MCS) -c $@ || exit 1; |
572 # (The exit 1 is necessary to cause a build failure if the command fails and | 572 # (The exit 1 is necessary to cause a build failure if the command fails and |
573 # multiple commands are strung together, and the final semicolon is necessary | 573 # multiple commands are strung together, and the final semicolon is necessary |
574 # since the hook must terminate itself as a valid command.) | 574 # since the hook must terminate itself as a valid command.) |
575 | 575 |
576 # Also, strip debug and line number information (worth about 1.7Mb). | 576 # Also, strip debug and line number information (worth about 1.7Mb). |
577 # If we can create .debuginfo files, then the VM is stripped in vm.make | 577 # If we can create .debuginfo files, then the VM is stripped in vm.make |
578 # and this macro is not used. | 578 # and this macro is not used. |
579 STRIP_LIB.CC/POST_HOOK = $(STRIP) -x $@ || exit 1; | 579 STRIP_LIB.CXX/POST_HOOK = $(STRIP) -x $@ || exit 1; |
580 # STRIP_LIB.CC/POST_HOOK is incorporated into LINK_LIB.CC/POST_HOOK | 580 # STRIP_LIB.CXX/POST_HOOK is incorporated into LINK_LIB.CXX/POST_HOOK |
581 # in certain configurations, such as product.make. Other configurations, | 581 # in certain configurations, such as product.make. Other configurations, |
582 # such as debug.make, do not include the strip operation. | 582 # such as debug.make, do not include the strip operation. |