diff options
author | joerg <joerg> | 2008-12-29 16:53:06 +0000 |
---|---|---|
committer | joerg <joerg> | 2008-12-29 16:53:06 +0000 |
commit | b96f57a543f0eed17000570915ca0a3966f969b7 (patch) | |
tree | b060d263a708e6a544e2271de0b9a6491ed48f67 /mk/compiler | |
parent | 546eb82a71b4439dfcd132b393b1c5d556e9b57a (diff) | |
download | pkgsrc-b96f57a543f0eed17000570915ca0a3966f969b7.tar.gz |
Improve AIX/XLC support:
- provide cpp wrapper using cc -E
- provide c++_r wrapper working like c++
- provide -rpath handling for cc
- fix some debug messages to provide the correct script name
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/xlc.mk | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mk/compiler/xlc.mk b/mk/compiler/xlc.mk index 9cbaff10eba..2b4a483db73 100644 --- a/mk/compiler/xlc.mk +++ b/mk/compiler/xlc.mk @@ -1,4 +1,4 @@ -# $NetBSD: xlc.mk,v 1.19 2008/11/27 17:56:52 joerg Exp $ +# $NetBSD: xlc.mk,v 1.20 2008/12/29 16:53:06 joerg Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -71,6 +71,9 @@ LANGUAGES.xlc+= c _XLC_VARS+= CC _XLC_CC= ${_XLC_DIR}/bin/xlc _ALIASES.CC= cc xlc +_XLC_VARS+= CPP +_XLC_CPP= ${_XLC_DIR}/bin/cpp +PKG_CPP:= ${_XLC_CPP} CCPATH= ${XLCBASE}/bin/xlc PKG_CC:= ${_XLC_CC} .endif @@ -90,6 +93,14 @@ CC_RPATH= ${XLCBASE}/bin/xlc_r PKG_CC_R:= ${_XLC_CC_R} CC_R?= cc_r .endif +.if exists(${XLCBASE}/bin/xlc++_r) +_XLC_VARS+= CXX_R +_XLC_CXX_R= ${_XLC_DIR}/bin/xlc++_r +_ALIASES.CXX_R= c++_r xlc++_r +CXX_RPATH= ${XLCBASE}/bin/xlc++_r +PKG_CXX_R:= ${_XLC_CXX_R} +CXX_R?= c++_r +.endif _COMPILER_STRIP_VARS+= ${_XLC_VARS} _COMPILER_RPATH_FLAG= -Wl,-R _LINKER_RPATH_FLAG= -R @@ -119,6 +130,15 @@ _LANGUAGES.xlc+= ${LANGUAGES.xlc:M${_lang_}} PREPEND_PATH+= ${_XLC_DIR}/bin .endif +override-tools: ${_XLC_CPP} +${_XLC_CPP}: + ${RUN}${MKDIR} ${.TARGET:H} + ${RUN} \ + {${ECHO} '#!${TOOLS_SHELL}'; \ + ${ECHO} 'exec ${XLCBASE}/bin/xlc -E @$$@"'; \ + ) > ${.TARGET} + ${RUN}${CHMOD} +x ${.TARGET} + # Create compiler driver scripts in ${WRKDIR}. .for _var_ in ${_XLC_VARS} . if !target(${_XLC_${_var_}}) |