Date: Tue, 29 Apr 2008 08:23:26 +0400 From: Ruslan Ermilov <ru@freebsd.org> To: Jeremie Le Hen <jeremie@le-hen.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Using special CFLAGS for a single file without writing the rule Message-ID: <20080429042326.GA32641@team.vega.ru> In-Reply-To: <20080424160415.GC55613@obiwan.tataz.chchile.org> References: <20080424160415.GC55613@obiwan.tataz.chchile.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 24, 2008 at 06:04:15PM +0200, Jeremie Le Hen wrote:
> Hi Ruslan, hi all,
> 
> I don't know if you followed the thread on -arch@, but the outcome is
> basically that SSP should be disabled for a couple of files:
>     lib/csu/*
>     gnu/lib/csu/* (reported by antoine@, but I couldn't verify this one)
>     lib/libc/sys/stack_protector.c
>     sys/kern/stack_protector.c
> 
> Antoine Brodin supplied a patch for the kernel part:
> +kern/stack_protector.c         standard        \
> +       compile-with    "${NORMAL_C:N-fstack-protector*}"
> 
> As for lib/csu/*, this is straightforward, I just have to set
> WITHOUT_SSP in the Makefile.
> 
> The hardest one is lib/libc/sys/stack_protector.c.  I endeavored to find
> a way to compile a single file with ${CFLAGS:N-fstack-protector*}, but I
> found no recipe but writing the whole rule for this file.  I would
> really like to avoid this solution so as to not override bsd.lib.mk
> settings.
> 
> Considering your big experience with the build infrastructure, I suspect
> you would have a solution.
> 
Either by using a special rule, or through a hack similar to
the one found in the last two lines of libc/Makefile.
Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080429042326.GA32641>
