Subject: how best to make lang/gcc/ work with lang/gcc-ssp?
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Greg A. Woods <>
List: tech-pkg
Date: 11/05/2002 13:42:43
We have two variants of GCC in pkgsrc:  lang/gcc and lang/gcc-ssp.

They are built from exactly the same base source, and the latter has
some added patches to optionally include the "Stack Smashing Protector"
run-time in the code it generates.

There's support in lang/gcc/ to make it realtively easy for
other packages to specify that they need to be built with pkgsrc GCC
(they just define USE_PKGSRC_GCC and include this file).  However
there's no way yet to allow that dependency to be fulfilled with

I think this could be fixed by using some tricks with pkg_info to check
which variant is installed and adjusting the internal _GCC_SUBPREFIX
setting as appropriate.

I'd propose a patch but I'm not sure how this is supposed to work with
these two packages on SunOS.  I'm guessing there's actually a missing
CONFLICTS entry for SunOS since it doesn't look to me like both variants
can be installed at the same time on SunOS (in which case nothing
special needs to be done to select the variant on SunOS -- only one can
be available at a time and they both have the same command names and are
installed in the same bin).

Another alternative is to just always include the SSP patches in
lang/gcc and just avoid the issue altogether.  I really don't see why
SSP isn't native in GCC by now, and maybe it will be someday.

[[ I was going to try lang/clisp on sparc with the gcc-ssp I have
installed on my build machine when I ran into this dilema.  My i386
build machine has both lang/gcc and lang/gcc-ssp installed, but I didn't
really care to waste space with two GCCs on my sparc. ]]

								Greg A. Woods

+1 416 218-0098;            <>;           <>
Planix, Inc. <>; VE3TCP; Secrets of the Weird <>