pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/24345 fix

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

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 and this seems like a better place for
an untested patch anyway) I post it here.


Staffan Thomén
     GPG key: 1024D/7C7E2EF8
 Fingerprint: ADB3 455F 10D5 86D1 78D6  048D 11BB D66E 7C7E 2EF8

--- Sun Feb  8 01:42:07 2004
+++      Sun Feb  8 01:43:25 2004
@@ -252,14 +252,20 @@
 .  if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS])
+_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
 CC=            ${_GCC_CC}
 .  endif
+.  if exists(${_GCCLIBEXECDIR}/cc1) && !empty(_LANGUAGES.gcc:Mc)
+_GCC_CC1=      ${_GCC_DIR}/libexec/cc1
+.  endif
 .  if exists(${_GCCBINDIR}/cpp) && !empty(_LANGUAGES.gcc:Mc)
 _GCC_CPP=      ${_GCC_DIR}/bin/cpp
@@ -270,16 +276,25 @@
 CXX=           ${_GCC_CXX}
 .  endif
+.  if exists(${_GCCLIBEXECDIR}/cc1plus) && !empty(_LANGUAGES.gcc:Mc++)
+_GCC_CXX1=     ${_GCC_DIR}/libexec/cc1plus
+.  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,".
 # 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_}}        
+.       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

Home | Main Index | Thread Index | Old Index