| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: xlc.mk,v 1.18 2008/11/14 14:04:12 joerg Exp $ | | 1 | # $NetBSD: xlc.mk,v 1.19 2008/11/27 17:56:52 joerg Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. | | 3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. |
4 | # All rights reserved. | | 4 | # All rights reserved. |
5 | # | | 5 | # |
6 | # This code is derived from software contributed to The NetBSD Foundation | | 6 | # This code is derived from software contributed to The NetBSD Foundation |
7 | # by Grant Beattie. | | 7 | # by Grant Beattie. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -72,32 +72,33 @@ _XLC_VARS+= CC | | | @@ -72,32 +72,33 @@ _XLC_VARS+= CC |
72 | _XLC_CC= ${_XLC_DIR}/bin/xlc | | 72 | _XLC_CC= ${_XLC_DIR}/bin/xlc |
73 | _ALIASES.CC= cc xlc | | 73 | _ALIASES.CC= cc xlc |
74 | CCPATH= ${XLCBASE}/bin/xlc | | 74 | CCPATH= ${XLCBASE}/bin/xlc |
75 | PKG_CC:= ${_XLC_CC} | | 75 | PKG_CC:= ${_XLC_CC} |
76 | .endif | | 76 | .endif |
77 | .if exists(${XLCBASE}/bin/xlc++) | | 77 | .if exists(${XLCBASE}/bin/xlc++) |
78 | LANGUAGES.xlc+= c++ | | 78 | LANGUAGES.xlc+= c++ |
79 | _XLC_VARS+= CXX | | 79 | _XLC_VARS+= CXX |
80 | _XLC_CXX= ${_XLC_DIR}/bin/xlc++ | | 80 | _XLC_CXX= ${_XLC_DIR}/bin/xlc++ |
81 | _ALIASES.CXX= c++ xlc++ | | 81 | _ALIASES.CXX= c++ xlc++ |
82 | CXXPATH= ${XLCBASE}/bin/xlc++ | | 82 | CXXPATH= ${XLCBASE}/bin/xlc++ |
83 | PKG_CXX:= ${_XLC_CXX} | | 83 | PKG_CXX:= ${_XLC_CXX} |
84 | .endif | | 84 | .endif |
85 | .if exists(${XLCBASE}/bin/xlc) | | 85 | .if exists(${XLCBASE}/bin/xlc_r) |
86 | _XLC_VARS+= CC_R | | 86 | _XLC_VARS+= CC_R |
87 | _XLC_CC_R= ${_XLC_DIR}/bin/cc_r | | 87 | _XLC_CC_R= ${_XLC_DIR}/bin/xlc_r |
88 | _ALIASES.CC_R= cc_r xlc_r | | 88 | _ALIASES.CC_R= cc_r xlc_r |
89 | CC_RPATH= ${XLCBASE}/bin/xlc_r | | 89 | CC_RPATH= ${XLCBASE}/bin/xlc_r |
90 | PKG_CC_R:= ${_XLC_CC_R} | | 90 | PKG_CC_R:= ${_XLC_CC_R} |
| | | 91 | CC_R?= cc_r |
91 | .endif | | 92 | .endif |
92 | _COMPILER_STRIP_VARS+= ${_XLC_VARS} | | 93 | _COMPILER_STRIP_VARS+= ${_XLC_VARS} |
93 | _COMPILER_RPATH_FLAG= -Wl,-R | | 94 | _COMPILER_RPATH_FLAG= -Wl,-R |
94 | _LINKER_RPATH_FLAG= -R | | 95 | _LINKER_RPATH_FLAG= -R |
95 | | | 96 | |
96 | .if exists(${CCPATH}) | | 97 | .if exists(${CCPATH}) |
97 | CC_VERSION_STRING!= ${CCPATH} -qversion 2>&1 | ${GREP} 'IBM XL C.*for' | ${SED} -e 's/^ *//' || ${TRUE} | | 98 | CC_VERSION_STRING!= ${CCPATH} -qversion 2>&1 | ${GREP} 'IBM XL C.*for' | ${SED} -e 's/^ *//' || ${TRUE} |
98 | CC_VERSION= ${CC_VERSION_STRING} | | 99 | CC_VERSION= ${CC_VERSION_STRING} |
99 | .else | | 100 | .else |
100 | CC_VERSION_STRING?= ${CC_VERSION} | | 101 | CC_VERSION_STRING?= ${CC_VERSION} |
101 | CC_VERSION?= IBM XL C | | 102 | CC_VERSION?= IBM XL C |
102 | .endif | | 103 | .endif |
103 | | | 104 | |