Subject: Re: how best to make lang/gcc/buildlink2.mk work with lang/gcc-ssp?
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Johnny C. Lam <firstname.lastname@example.org>
Date: 11/06/2002 12:35:33
On Tue, Nov 05, 2002 at 01:42:43PM -0500, Greg A. Woods wrote:
> 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/buildlink2.mk 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
buildlink2 has some support for building with arbitrary C compilers, but
it's not well-tested. You need to set CC=/path/to/your/C/compiler in
/etc/mk.conf, and the compiler wrappers will call your C compiler
instead of /usr/bin/cc. I'd appreciate knowing if this actually works
The problem that arises is if you need to the package to actually depend
on gcc-ssp because the resulting package links against gcc-ssp's shared
libstdc++.so. I think that you could try to force the issue by setting
BUILDLINK_DEPENDS.gcc=gcc-ssp>=2.95.2 in /etc/mk.conf so that all packages
that use gcc/buildlink2.mk will use the gcc dependency that you specify.
Again, I'd appreciate feedback on whether this works or not.
-- Johnny Lam <email@example.com>