Thu Nov 27 17:56:52 2008 UTC ()
Adjust xlc_r check to actually look for the right binary.
Prefer xlc_r over cc_r as authoritive name. Export CC_R.
>From Jens Rehstack.


(joerg)
diff -r1.18 -r1.19 pkgsrc/mk/compiler/xlc.mk

cvs diff -r1.18 -r1.19 pkgsrc/mk/compiler/xlc.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/xlc.mk 2008/11/14 14:04:12 1.18
+++ pkgsrc/mk/compiler/xlc.mk 2008/11/27 17:56:52 1.19
@@ -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
74CCPATH= ${XLCBASE}/bin/xlc 74CCPATH= ${XLCBASE}/bin/xlc
75PKG_CC:= ${_XLC_CC} 75PKG_CC:= ${_XLC_CC}
76.endif 76.endif
77.if exists(${XLCBASE}/bin/xlc++) 77.if exists(${XLCBASE}/bin/xlc++)
78LANGUAGES.xlc+= c++ 78LANGUAGES.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++
82CXXPATH= ${XLCBASE}/bin/xlc++ 82CXXPATH= ${XLCBASE}/bin/xlc++
83PKG_CXX:= ${_XLC_CXX} 83PKG_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
89CC_RPATH= ${XLCBASE}/bin/xlc_r 89CC_RPATH= ${XLCBASE}/bin/xlc_r
90PKG_CC_R:= ${_XLC_CC_R} 90PKG_CC_R:= ${_XLC_CC_R}
 91CC_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})
97CC_VERSION_STRING!= ${CCPATH} -qversion 2>&1 | ${GREP} 'IBM XL C.*for' | ${SED} -e 's/^ *//' || ${TRUE} 98CC_VERSION_STRING!= ${CCPATH} -qversion 2>&1 | ${GREP} 'IBM XL C.*for' | ${SED} -e 's/^ *//' || ${TRUE}
98CC_VERSION= ${CC_VERSION_STRING} 99CC_VERSION= ${CC_VERSION_STRING}
99.else 100.else
100CC_VERSION_STRING?= ${CC_VERSION} 101CC_VERSION_STRING?= ${CC_VERSION}
101CC_VERSION?= IBM XL C 102CC_VERSION?= IBM XL C
102.endif 103.endif
103 104