head 1.10; access; symbols pkgsrc-2023Q4:1.10.0.2 pkgsrc-2023Q4-base:1.10 pkgsrc-2023Q3:1.9.0.2 pkgsrc-2023Q3-base:1.9 pkgsrc-2023Q2:1.8.0.62 pkgsrc-2023Q2-base:1.8 pkgsrc-2023Q1:1.8.0.60 pkgsrc-2023Q1-base:1.8 pkgsrc-2022Q4:1.8.0.58 pkgsrc-2022Q4-base:1.8 pkgsrc-2022Q3:1.8.0.56 pkgsrc-2022Q3-base:1.8 pkgsrc-2022Q2:1.8.0.54 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.8.0.52 pkgsrc-2022Q1-base:1.8 pkgsrc-2021Q4:1.8.0.50 pkgsrc-2021Q4-base:1.8 pkgsrc-2021Q3:1.8.0.48 pkgsrc-2021Q3-base:1.8 pkgsrc-2021Q2:1.8.0.46 pkgsrc-2021Q2-base:1.8 pkgsrc-2021Q1:1.8.0.44 pkgsrc-2021Q1-base:1.8 pkgsrc-2020Q4:1.8.0.42 pkgsrc-2020Q4-base:1.8 pkgsrc-2020Q3:1.8.0.40 pkgsrc-2020Q3-base:1.8 pkgsrc-2020Q2:1.8.0.36 pkgsrc-2020Q2-base:1.8 pkgsrc-2020Q1:1.8.0.16 pkgsrc-2020Q1-base:1.8 pkgsrc-2019Q4:1.8.0.38 pkgsrc-2019Q4-base:1.8 pkgsrc-2019Q3:1.8.0.34 pkgsrc-2019Q3-base:1.8 pkgsrc-2019Q2:1.8.0.32 pkgsrc-2019Q2-base:1.8 pkgsrc-2019Q1:1.8.0.30 pkgsrc-2019Q1-base:1.8 pkgsrc-2018Q4:1.8.0.28 pkgsrc-2018Q4-base:1.8 pkgsrc-2018Q3:1.8.0.26 pkgsrc-2018Q3-base:1.8 pkgsrc-2018Q2:1.8.0.24 pkgsrc-2018Q2-base:1.8 pkgsrc-2018Q1:1.8.0.22 pkgsrc-2018Q1-base:1.8 pkgsrc-2017Q4:1.8.0.20 pkgsrc-2017Q4-base:1.8 pkgsrc-2017Q3:1.8.0.18 pkgsrc-2017Q3-base:1.8 pkgsrc-2017Q2:1.8.0.14 pkgsrc-2017Q2-base:1.8 pkgsrc-2017Q1:1.8.0.12 pkgsrc-2017Q1-base:1.8 pkgsrc-2016Q4:1.8.0.10 pkgsrc-2016Q4-base:1.8 pkgsrc-2016Q3:1.8.0.8 pkgsrc-2016Q3-base:1.8 pkgsrc-2016Q2:1.8.0.6 pkgsrc-2016Q2-base:1.8 pkgsrc-2016Q1:1.8.0.4 pkgsrc-2016Q1-base:1.8 pkgsrc-2015Q4:1.8.0.2 pkgsrc-2015Q4-base:1.8 pkgsrc-2015Q3:1.6.0.20 pkgsrc-2015Q3-base:1.6 pkgsrc-2015Q2:1.6.0.18 pkgsrc-2015Q2-base:1.6 pkgsrc-2015Q1:1.6.0.16 pkgsrc-2015Q1-base:1.6 pkgsrc-2014Q4:1.6.0.14 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.12 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.6.0.10 pkgsrc-2014Q2-base:1.6 pkgsrc-2014Q1:1.6.0.8 pkgsrc-2014Q1-base:1.6 pkgsrc-2013Q4:1.6.0.6 pkgsrc-2013Q4-base:1.6 pkgsrc-2013Q3:1.6.0.4 pkgsrc-2013Q3-base:1.6 pkgsrc-2013Q2:1.6.0.2 pkgsrc-2013Q2-base:1.6 pkgsrc-2013Q1:1.5.0.20 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.5.0.18 pkgsrc-2012Q4-base:1.5 pkgsrc-2012Q3:1.5.0.16 pkgsrc-2012Q3-base:1.5 pkgsrc-2012Q2:1.5.0.14 pkgsrc-2012Q2-base:1.5 pkgsrc-2012Q1:1.5.0.12 pkgsrc-2012Q1-base:1.5 pkgsrc-2011Q4:1.5.0.10 pkgsrc-2011Q4-base:1.5 pkgsrc-2011Q3:1.5.0.8 pkgsrc-2011Q3-base:1.5 pkgsrc-2011Q2:1.5.0.6 pkgsrc-2011Q2-base:1.5 pkgsrc-2011Q1:1.5.0.4 pkgsrc-2011Q1-base:1.5 pkgsrc-2010Q4:1.5.0.2 pkgsrc-2010Q4-base:1.5 pkgsrc-2010Q3:1.2.0.2 pkgsrc-2010Q3-base:1.2 pkgsrc-2010Q2:1.1.0.28 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.26 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.24 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.22 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.20 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.18 pkgsrc-2009Q1-base:1.1 pkgsrc-2008Q4:1.1.0.16 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.14 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.12 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.10 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.8 pkgsrc-2008Q1:1.1.0.6 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.4 pkgsrc-2007Q4-base:1.1 pkgsrc-2007Q3:1.1.0.2 pkgsrc-2007Q3-base:1.1; locks; strict; comment @# @; 1.10 date 2023.12.12.16.41.49; author gdt; state Exp; branches; next 1.9; commitid OMBpYtUbaJ1AdcQE; 1.9 date 2023.06.27.10.27.21; author riastradh; state Exp; branches; next 1.8; commitid YYdDXuq2VpGTxzuE; 1.8 date 2015.10.09.17.27.09; author he; state Exp; branches; next 1.7; commitid cXqkLsEbTMsNrsEy; 1.7 date 2015.10.08.21.09.53; author he; state Exp; branches; next 1.6; commitid IJOPJMKf6HIcIlEy; 1.6 date 2013.05.09.23.37.26; author riastradh; state Exp; branches; next 1.5; 1.5 date 2010.12.26.14.23.47; author asau; state Exp; branches; next 1.4; 1.4 date 2010.12.26.14.20.01; author asau; state Exp; branches; next 1.3; 1.3 date 2010.11.03.18.05.05; author adam; state Exp; branches; next 1.2; 1.2 date 2010.07.30.07.58.59; author asau; state Exp; branches; next 1.1; 1.1 date 2007.09.18.01.51.10; author reed; state Exp; branches; next ; desc @@ 1.10 log @pcc.mk: Adapt c99 flags Change the commented-out flag setting from testing USE_LANGUAGES, which won't work with new-style FORCE_C_STD, to setting _C_STD_FLAG.c99, which compiler.mk will add via wrappers. This is a comment-only change; the new code awaits testing much as the old code did. @ text @# $NetBSD: pcc.mk,v 1.9 2023/06/27 10:27:21 riastradh Exp $ # # This is the compiler definition for the PCC compiler. # # User-settable variables: # # PCCBASE # The base directory where the compiler is installed. # .if !defined(COMPILER_PCC_MK) COMPILER_PCC_MK= defined # Add the dependency on pcc # NOTE: not enabled by default as may be installed already # TODO: check for this? #TOOL_DEPENDS+= pcc-[0-9]*:../../lang/pcc .include "../../mk/bsd.prefs.mk" PCCBASE?= ${TOOLBASE} # common definitions _COMPILER_TYPE.c= CC _COMPILER_TYPE.c++ = CXX _COMPILER_TYPE.fortran= FC # PCC-specific definitions _COMPILER_LANGS= c c++ fortran77 _COMPILER_NAME.c= pcc # TODO: _COMPILER_NAME.c++ = CC _COMPILER_NAME.fortran77= f77 # LANGUAGES. is the list of supported languages by the # compiler. # LANGUAGES.pcc= # empty .for l in ${_COMPILER_LANGS} . for t in ${_COMPILER_TYPE.${l}} . for n in ${_COMPILER_NAME.${l}} . if exists(${PCCBASE}/bin/${n}) LANGUAGES.pcc+= ${l} _COMPILER_STRIP_VARS+= ${t} ${t}PATH= ${PCCBASE}/bin/${n} PKG_${t}:= ${PCCBASE}/bin/${n} . endif . endfor . endfor .endfor # Export flags to turn on c99 mode to the generic processing code in ../compiler.mk. # TODO: enable and test # _C_STD_FLAG.c99= -xc99 _LINKER_RPATH_FLAG= -R _COMPILER_RPATH_FLAG= -Wl,-R .if exists(${CCPATH}) CC_VERSION_STRING!= ${CCPATH} -v 2>&1 || ${TRUE} CC_VERSION!= ${CCPATH} -v 2>&1 | ${GREP} -E '^(pcc|Portable C Compiler)' .else CC_VERSION_STRING?= ${CC_VERSION} CC_VERSION?= pcc .endif # _LANGUAGES. is ${LANGUAGES.} restricted to the # ones requested by the package in USE_LANGUAGES. # _LANGUAGES.pcc= # empty .for _lang_ in ${USE_LANGUAGES} _LANGUAGES.pcc+= ${LANGUAGES.pcc:M${_lang_}} .endfor .endif # COMPILER_PCC_MK @ 1.9 log @Split native and cross LOCALBASE for cross-compilation. This way, you can use an unprivileged prefix of ~/cross/pkg to cross-compile packages that, when installed, will go in /usr/pkg. In mk.conf: - Set CROSS_LOCALBASE to determine the installation prefix of packages that you cross-compile. - Set LOCALBASE to determine the installation prefix of native packages needed for cross compilation. Both default to /usr/pkg. Note: CROSS_LOCALBASE defaults to /usr/pkg even if you set LOCALBASE. Of course, if you're not cross-compiling, this has no effect. When cross-compiling a package: - LOCALBASE is where cross-compiled packages will be installed. (`make install' will put it in ${CROSS_DESTDIR}${LOCALBASE}, of course, but when you later use pkg_add to install the binary package on the system you're compiling it for, it will go in ${LOCALBASE}. And you can still set PREFIX for an individual package, but LOCALBASE refers to where cross-compiled packages are generally installed, other than the specific ones that override PREFIX.) - TOOLBASE is where tool dependencies are installed and available to be executed at build-time. For example, if you have TOOL_DEPENDS on a program that is installed in (say) foo/bin/xyz which is not in PATH so you have to refer ot its full pathname, you can execute ${TOOLBASE}/foo/bin/xyz instead of ${LOCALBASE}/foo/bin/xyz. I chose this split, rather than the other way around, because I expect that references that are baked into installed packages to be more common than references that are executed at build-time, but I didn't do an extensive study of the matter. I chose the name TOOLBASE because it's where TOOL_DEPENDS go. @ text @d1 1 a1 1 # $NetBSD: pcc.mk,v 1.8 2015/10/09 17:27:09 he Exp $ d53 3 a55 4 # Turn on C99 support if required #.if !empty(USE_LANGUAGES:Mc99) #_WRAP_EXTRA_ARGS.CC+= -xc99 #.endif @ 1.8 log @Correction to the previous: we must use ${GREP} -E, there's no ${EGREP} here. @ text @d1 1 a1 1 # $NetBSD: pcc.mk,v 1.7 2015/10/08 21:09:53 he Exp $ d21 1 a21 1 PCCBASE?= ${LOCALBASE} @ 1.7 log @Extend the pattern matching the -v output from pcc. @ text @d1 1 a1 1 # $NetBSD: pcc.mk,v 1.6 2013/05/09 23:37:26 riastradh Exp $ d64 1 a64 1 CC_VERSION!= ${CCPATH} -v 2>&1 | ${EGREP} '^(pcc|Portable C Compiler)' @ 1.6 log @Split BUILD_DEPENDS into TOOL_DEPENDS and BUILD_DEPENDS in mk/. Build depends are target packages that are needed at build-time for, e.g., static libraries to link against, header files to include, &c. Tool depends are native packages that are needed at build-time for, e.g., compilers/linkers/&c. to run. ok agc @ text @d1 1 a1 1 # $NetBSD: pcc.mk,v 1.5 2010/12/26 14:23:47 asau Exp $ d64 1 a64 1 CC_VERSION!= ${CCPATH} -v 2>&1 | ${GREP} '^pcc' @ 1.5 log @Remove possibly confusing variable assignment. @ text @d1 1 a1 1 # $NetBSD: pcc.mk,v 1.4 2010/12/26 14:20:01 asau Exp $ d17 1 a17 1 #BUILD_DEPENDS+= pcc-[0-9]*:../../lang/pcc @ 1.4 log @Fortran is not Fortran-77 anymore. @ text @d1 1 a1 1 # $NetBSD: pcc.mk,v 1.3 2010/11/03 18:05:05 adam Exp $ a32 1 _COMPILER_NAME.fortran= f77 @ 1.3 log @* Use LOCALBASE instead of PREFIX for PCC and Clang compiler detection (otherwise Makefiles with mk/compiler.mk included fall back to GCC). * Simplified compiler/clang.mk. @ text @d1 1 a1 1 # $NetBSD: pcc.mk,v 1.2 2010/07/30 07:58:59 asau Exp $ d29 1 a29 1 _COMPILER_LANGS= c c++ fortran fortran77 @ 1.2 log @Implement "fortran77" as alias for "fortran". @ text @d1 1 a1 1 # $NetBSD: pcc.mk,v 1.1 2007/09/18 01:51:10 reed Exp $ d21 1 a21 1 PCCBASE?= ${PREFIX} @ 1.1 log @For Portable C Compiler. Add beginning of PKGSRC_COMPILER=pcc support. Based on "sunpro". Please help improve this. I have not tested with C++ or fortan. @ text @d1 1 a1 1 # $NetBSD$ d29 1 a29 1 _COMPILER_LANGS= c c++ fortran d34 1 @