From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 24 16:06:44 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 8300D106564A; Thu, 24 Apr 2008 16:06:44 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by mx1.freebsd.org (Postfix) with ESMTP id 5EA4E8FC17; Thu, 24 Apr 2008 16:06:43 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp5-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp5-g19.free.fr (Postfix) with ESMTP id 855403F626B; Thu, 24 Apr 2008 18:06:42 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp5-g19.free.fr (Postfix) with ESMTP id 6AF5D3F6257; Thu, 24 Apr 2008 18:06:42 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id D41799BF12; Thu, 24 Apr 2008 16:04:15 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id C52F8405B; Thu, 24 Apr 2008 18:04:15 +0200 (CEST) Date: Thu, 24 Apr 2008 18:04:15 +0200 From: Jeremie Le Hen To: Ruslan Ermilov Message-ID: <20080424160415.GC55613@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-hackers@FreeBSD.org Subject: 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: Thu, 24 Apr 2008 16:06:44 -0000 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. Thank you for your help. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >