Subject: pkg/24345 fix
To: None <>
From: Staffan Thomen <>
List: pkgsrc-bugs
Date: 02/08/2004 02:14:02
Content-Type: multipart/mixed;

Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=E9n
     GPG key: 1024D/7C7E2EF8
 Fingerprint: ADB3 455F 10D5 86D1 78D6  048D 11BB D66E 7C7E 2EF8

Content-Type: text/plain;
Content-Disposition: attachment;
Content-Transfer-Encoding: quoted-printable

---	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])
 .  elif !empty(_IS_BUILTIN_GCC:M[yY][eE][sS])
+_GCCLIBEXECDIR=3D	${_CC:H}/../libexec
 .  endif
 .  if exists(${_GCCBINDIR}/gcc) && !empty(_LANGUAGES.gcc:Mc)
 _GCC_CC=3D	${_GCC_DIR}/bin/gcc
 CC=3D		${_GCC_CC}
 .  endif
+.  if exists(${_GCCLIBEXECDIR}/cc1) && !empty(_LANGUAGES.gcc:Mc)
+_GCC_CC1=3D	${_GCC_DIR}/libexec/cc1
+.  endif
 .  if exists(${_GCCBINDIR}/cpp) && !empty(_LANGUAGES.gcc:Mc)
 _GCC_CPP=3D	${_GCC_DIR}/bin/cpp
@@ -270,16 +276,25 @@
 CXX=3D		${_GCC_CXX}
 .  endif
+.  if exists(${_GCCLIBEXECDIR}/cc1plus) && !empty(_LANGUAGES.gcc:Mc++)
+_GCC_CXX1=3D	${_GCC_DIR}/libexec/cc1plus
+.  endif
 .  if exists(${_GCCBINDIR}/g77) && !empty(_LANGUAGES.gcc:Mfortran)
 _GCC_F77=3D	${_GCC_DIR}/bin/g77
 F77=3D		${_GCC_F77}
 PKG_FC:=3D	${F77}
 .  endif
+.  if exists(${_GCCLIBEXECDIR}/f771) && !empty(_LANGUAGES.gcc:Mfortran)
+_GCC_F771=3D	${_GCC_DIR}/libexec/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} =3D=3D "SunOS"
 IMAKEOPTS+=3D	-DHasGcc2=3DYES -DHasGcc2ForCplusplus=3DYES
@@ -340,8 +355,13 @@
 override-tools: ${${_target_}}       =20
+.       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


Content-Type: application/pgp-signature

Version: GnuPG v1.2.1 (IRIX)