From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29762 invoked by alias); 6 Jun 2011 09:23:16 -0000 Received: (qmail 29753 invoked by uid 22791); 6 Jun 2011 09:23:15 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jun 2011 09:23:00 +0000 Received: by pzk36 with SMTP id 36so1840834pzk.20 for ; Mon, 06 Jun 2011 02:23:00 -0700 (PDT) Received: by 10.68.69.113 with SMTP id d17mr1682595pbu.472.1307352179929; Mon, 06 Jun 2011 02:22:59 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-184-88.ip51.fastwebnet.it [93.34.184.88]) by mx.google.com with ESMTPS id x1sm3554845pbb.50.2011.06.06.02.22.54 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Jun 2011 02:22:58 -0700 (PDT) Message-ID: <4DEC9C6A.3050106@gnu.org> Date: Mon, 06 Jun 2011 09:23:00 -0000 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 MIME-Version: 1.0 To: Rainer Orth CC: gcc-patches@gcc.gnu.org, "Joseph S. Myers" , Ralf Wildenhues , Mike Stump , "Loren J. Rittle" , Kai Tietz , Dave Korn , Jason Thorpe , Krister Walfridsson , Uros Bizjak , Richard Henderson , Eric Botcazou Subject: Re: [build] Move ENABLE_EXECUTE_STACK to toplevel libgcc References: <4DE4AEC2.3030502@gnu.org> <4DE50FFB.90501@gnu.org> <4DE9054B.3050203@gnu.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00367.txt.bz2 On 06/06/2011 11:17 AM, Rainer Orth wrote: > * Instead of __FreeBSD__, one could use HAVE_SYSCTLBYNAME instead, but > that would need a new libgcc config.h header. In addition, we might > have to check for kern.stackprot to make sure the code really works. > > * Similarly, instead of testing __sun__&& __svr4__, one could check > _SC_STACK_PROT. > > * Last, rather than checking __NetBSD__, one could go for HAVE___SYSCTL. > > * __sysctl is currently declared manully. AFAICS there's no header for > that. At least the FreeBSD libc declares it itself in two places: > lib/libc/sys/stack_protector.c and lib/libc/gen/sysctl.c. > > Given that this is closely tied to the various platforms, it seems > appropriate to continue to use the OS defines. Agreed, it would be a worse can of worms when bootstrapping a target (i.e. no target headers are available). Parts I can approve are good. Thanks! Paolo