diff options
author | grant <grant@pkgsrc.org> | 2003-05-27 06:55:15 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2003-05-27 06:55:15 +0000 |
commit | cbe64e803d0a2f4ca285bcd96d74d02ff431d8e6 (patch) | |
tree | c00e50f0e310c488a5348d1544ecc357685565b6 /lang | |
parent | 727ad82f486ee3aa31eb7ce02c8826fbe030941d (diff) | |
download | pkgsrc-cbe64e803d0a2f4ca285bcd96d74d02ff431d8e6.tar.gz |
add a buildlink2.mk for gcc-3.3.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/gcc3/buildlink2.mk | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/lang/gcc3/buildlink2.mk b/lang/gcc3/buildlink2.mk new file mode 100644 index 00000000000..2cb1076b57c --- /dev/null +++ b/lang/gcc3/buildlink2.mk @@ -0,0 +1,94 @@ +# $NetBSD: buildlink2.mk,v 1.1 2003/05/27 06:55:15 grant Exp $ + +.if !defined(GCC3_BUILDLINK2_MK) +GCC3_BUILDLINK2_MK= # defined + +.include "../../mk/bsd.prefs.mk" + +GCC_REQD?= 3.3 +BUILDLINK_DEPENDS.gcc?= gcc3>=${GCC_REQD} +BUILDLINK_PKGSRCDIR.gcc?= ../../lang/gcc3 + +# Packages that use the C++ compiler and subsequently link against the +# shared libstdc++ from the package need a full dependency. +# +.if defined(USE_CXX) +BUILDLINK_DEPMETHOD.gcc+= full +.else +BUILDLINK_DEPMETHOD.gcc?= build +.endif + +BUILDLINK_PREFIX.gcc= ${LOCALBASE} + +_GCC_SUBPREFIX= gcc-3.3/ +_GCC_PREFIX= ${BUILDLINK_PREFIX.gcc}/${_GCC_SUBPREFIX} +_GCC_ARCHSUBDIR= lib/gcc-lib/${MACHINE_GNU_PLATFORM}/3.3 +_GCC_ARCHDIR= ${_GCC_PREFIX}${_GCC_ARCHSUBDIR} + +BUILDLINK_LDFLAGS.gcc= -L${_GCC_ARCHDIR} -Wl,${RPATH_FLAG}${_GCC_ARCHDIR} -L${_GCC_PREFIX}lib -Wl,${RPATH_FLAG}${_GCC_PREFIX}lib + +_GCC_VERSION!= ( ${CC} -dumpversion ) 2>/dev/null || ${ECHO} 0 + +GCC_VERSION= ${_GCC_VERSION} +GCC_PKG= gcc-${GCC_VERSION} + +.if defined(USE_PKGSRC_GCC) +_NEED_PKGSRC_GCC= YES +.else +_NEED_PKGSRC_GCC!= \ + if ${PKG_ADMIN} pmatch '${BUILDLINK_DEPENDS.gcc}' ${GCC_PKG}; then \ + gccpath=`${TYPE} gcc | ${AWK} '{ print $$NF }'`; \ + if [ "$$gccpath" = "${_GCC_PREFIX}bin/gcc" ]; then \ + ${ECHO} "YES"; \ + else \ + ${ECHO} "NO"; \ + fi; \ + else \ + ${ECHO} "YES"; \ + fi +.endif + +.if ${_NEED_PKGSRC_GCC} == "YES" +BUILDLINK_PACKAGES+= gcc +PATH:= ${_GCC_PREFIX}bin:${PATH} +CC= ${_GCC_PREFIX}bin/gcc +CPP= ${_GCC_PREFIX}bin/cpp +CXX= ${_GCC_PREFIX}bin/g++ +F77= ${_GCC_PREFIX}bin/g77 +PKG_FC= ${F77} + +. if defined(USE_CXX) +LDFLAGS+= ${BUILDLINK_LDFLAGS.gcc} +. endif +BUILDLINK_WRAPPER_ENV+= \ + COMPILER_PATH="${BUILDLINK_DIR}/bin"; export COMPILER_PATH +.endif # _NEED_PKGSRC_GCC == YES + +# These file are from gcc-3.3. +BUILDLINK_FILES.gcc= ${_GCC_SUBPREFIX}include/c++/3.3/* +BUILDLINK_FILES.gcc= ${_GCC_SUBPREFIX}include/c++/3.3/*/* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/include/* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/include/*/* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/include/*/*/* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/include/*/*/*/* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/lib*.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}${_GCC_ARCHSUBDIR}/specs +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}${MACHINE_GNU_PLATFORM}/include/* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}${MACHINE_GNU_PLATFORM}/include/*/* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/lib-org-w3c-dom.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/lib-org-xml-sax.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/libffi* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/libfrtbegin.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/libg2c.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/libgcc_s.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/libgcj.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/libiberty.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/libobjc.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/libstdc++.* +BUILDLINK_FILES.gcc+= ${_GCC_SUBPREFIX}lib/libsupc++.* + +BUILDLINK_TARGETS+= gcc-buildlink + +gcc-buildlink: _BUILDLINK_USE + +.endif # GCC3_BUILDLINK2_MK |