Hi, in a bored moment I wrote this, which should address the problem of pkg/24345. It creates a new directory in ${WORKDIR}/.gcc, libexec and links cc1/cc1plus/f771 there as appropriate, letting gcc find them in ../libexec. Having not found any established way of contacting the appropriate person, (aside from appending to the bug report? should I do this? I found no clues on www.netbsd.org and this seems like a better place for an untested patch anyway) I post it here. Regards, -- Staffan Thomén GPG key: 1024D/7C7E2EF8 Fingerprint: ADB3 455F 10D5 86D1 78D6 048D 11BB D66E 7C7E 2EF8
--- gcc.mk.orig Sun Feb 8 01:42:07 2004 +++ gcc.mk Sun Feb 8 01:43:25 2004 @@ -252,14 +252,20 @@ . if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) _GCCBINDIR= ${_GCC_PREFIX}bin +_GCCLIBEXECDIR= ${_GCC_PREFIX}libexec . elif !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) _GCCBINDIR= ${_CC:H} +_GCCLIBEXECDIR= ${_CC:H}/../libexec . endif . if exists(${_GCCBINDIR}/gcc) && !empty(_LANGUAGES.gcc:Mc) _GCC_CC= ${_GCC_DIR}/bin/gcc _GCC_LINKS+= _GCC_CC CC= ${_GCC_CC} . endif +. if exists(${_GCCLIBEXECDIR}/cc1) && !empty(_LANGUAGES.gcc:Mc) +_GCC_CC1= ${_GCC_DIR}/libexec/cc1 +_GCC_LINKS+= _GCC_CC1 +. endif . if exists(${_GCCBINDIR}/cpp) && !empty(_LANGUAGES.gcc:Mc) _GCC_CPP= ${_GCC_DIR}/bin/cpp _GCC_LINKS+= _GCC_CPP @@ -270,16 +276,25 @@ _GCC_LINKS+= _GCC_CXX CXX= ${_GCC_CXX} . endif +. if exists(${_GCCLIBEXECDIR}/cc1plus) && !empty(_LANGUAGES.gcc:Mc++) +_GCC_CXX1= ${_GCC_DIR}/libexec/cc1plus +_GCC_LINKS+= _GCC_CXX1 +. endif . if exists(${_GCCBINDIR}/g77) && !empty(_LANGUAGES.gcc:Mfortran) _GCC_F77= ${_GCC_DIR}/bin/g77 _GCC_LINKS+= _GCC_F77 F77= ${_GCC_F77} PKG_FC:= ${F77} . endif +. if exists(${_GCCLIBEXECDIR}/f771) && !empty(_LANGUAGES.gcc:Mfortran) +_GCC_F771= ${_GCC_DIR}/libexec/f771 +_GCC_LINKS+= _GCC_F771 +. endif # GCC passes flags to the linker using "-Wl,". _COMPILER_LD_FLAG= -Wl, +# # Pass the required flags to imake to tell it we're using gcc on Solaris. . if ${OPSYS} == "SunOS" IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES @@ -340,8 +355,13 @@ override-tools: ${${_target_}} ${${_target_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} +. ifdef ${${_target_}:M*libexec*} + ${_PKG_SILENT}${_PKG_DEBUG} \ + ${LN} -fs ${_GCCLIBEXECDIR}/${${_target_}:T} ${.TARGET} +. else ${_PKG_SILENT}${_PKG_DEBUG} \ ${LN} -fs ${_GCCBINDIR}/${${_target_}:T} ${.TARGET} +. endifdef . endif . endfor . endif # COMPILER_GCC_MK
Attachment:
pgpLnNKjyOZMo.pgp
Description: PGP signature