From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 04:56:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14425106564A for ; Tue, 29 Apr 2008 04:56:19 +0000 (UTC) (envelope-from rermilov@team.vega.ru) Received: from mail.vega.ru (infra.dev.vega.ru [90.156.167.14]) by mx1.freebsd.org (Postfix) with ESMTP id B492B8FC19 for ; Tue, 29 Apr 2008 04:56:18 +0000 (UTC) (envelope-from rermilov@team.vega.ru) Received: from [87.242.97.68] (port=60684 helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68 (FreeBSD)) (envelope-from ) id 1JqhNL-000GuB-1e; Tue, 29 Apr 2008 04:23:31 +0000 Received: from edoofus.dev.vega.ru (localhost [127.0.0.1]) by edoofus.dev.vega.ru (8.14.2/8.14.2) with ESMTP id m3T4NRfx032750; Tue, 29 Apr 2008 08:23:27 +0400 (MSD) (envelope-from rermilov@team.vega.ru) Received: (from ru@localhost) by edoofus.dev.vega.ru (8.14.2/8.14.2/Submit) id m3T4NQkr032749; Tue, 29 Apr 2008 08:23:26 +0400 (MSD) (envelope-from rermilov@team.vega.ru) X-Authentication-Warning: edoofus.dev.vega.ru: ru set sender to rermilov@team.vega.ru using -f Date: Tue, 29 Apr 2008 08:23:26 +0400 From: Ruslan Ermilov To: Jeremie Le Hen Message-ID: <20080429042326.GA32641@team.vega.ru> References: <20080424160415.GC55613@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080424160415.GC55613@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org Subject: Re: Using special CFLAGS for a single file without writing the rule X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 04:56:19 -0000 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