From patchwork Fri Dec 9 10:59:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pageexec@freemail.hu X-Patchwork-Id: 9467863 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BB498607D8 for ; Fri, 9 Dec 2016 11:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC2052522B for ; Fri, 9 Dec 2016 11:01:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E2F6285D5; Fri, 9 Dec 2016 11:01:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 139C42522B for ; Fri, 9 Dec 2016 11:01:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932261AbcLILBZ (ORCPT ); Fri, 9 Dec 2016 06:01:25 -0500 Received: from r00tworld.com ([212.85.137.150]:35107 "EHLO r00tworld.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932245AbcLILBY (ORCPT ); Fri, 9 Dec 2016 06:01:24 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by r00tworld.com (8.13.1/8.13.1) with ESMTP id uB9AxrRu020279; Fri, 9 Dec 2016 11:59:53 +0100 Received: from r00tworld.com ([127.0.0.1]) by localhost (r00tworld.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19267-01; Fri, 9 Dec 2016 11:59:48 +0100 (CET) Received: from [169.254.79.10] (x.r00tworld.com [212.85.137.150]) by r00tworld.com (8.13.1/8.13.1) with ESMTP id uB9Axf9w020262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Dec 2016 11:59:43 +0100 From: "PaX Team" To: Kees Cook , Andrew Donnellan Date: Fri, 09 Dec 2016 11:59:42 +0100 MIME-Version: 1.0 Subject: Re: [PATCH 3/3] powerpc: enable support for GCC plugins Reply-to: pageexec@freemail.hu CC: "linuxppc-dev@lists.ozlabs.org" , "kernel-hardening@lists.openwall.com" , Emese Revfy , LKML , linux-kbuild , Brad Spengler , Michal Marek Message-ID: <584A8E9E.22035.590FC72@pageexec.freemail.hu> In-reply-to: References: <20161206062800.21800-1-andrew.donnellan@au1.ibm.com>, , X-mailer: Pegasus Mail for Windows (4.72.572) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.12 (r00tworld.com [212.85.137.150]); Fri, 09 Dec 2016 11:59:43 +0100 (CET) X-Virus-Scanned: r00tworld Anti-Virus System Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 9 Dec 2016 at 13:48, Andrew Donnellan wrote: > >> as for the solutions, the general advice should enable the use of otherwise > >> failing gcc versions instead of forcing updating to new ones (though the > >> latter is advisable for other reasons but not everyone's in the position to > >> do so easily). in my experience all one needs to do is manually install the > >> missing files from the gcc sources (ideally distros would take care of it). > > If someone else is willing to write up that advice, then great. > > >> the specific problem addressed here can (and IMHO should) be solved in > >> another way: remove the inclusion of the offending headers in gcc-common.h > >> as neither tm.h nor c-common.h are needed by existing plugins. for background, > > We can't build without tm.h: http://pastebin.com/W0azfCr0 you'll need to repeat the removal of dependent headers. based on a quick test here across gcc 4.5-6.2, if you remove rtl.h, tm_p.h, hard-reg-set.h and emit-rtl.h in addition to tm.h, the plugins should build fine. > And we get warnings without c-common.h: http://pastebin.com/Aw8CAj10 that's not due to c-common.h. gcc versions 4.5-4.6 are compiled as a C program and gcc 4.7 can be compiled both as a C and a C++ program (IIRC, distros opted for the latter, i forget what manually built versions default to but i guess you went with the C compilation for your gcc anyway). couple that with -Wmissing-prototypes and you get that warning regardless of c-common.h being included. something like this should fix it: > These were all manually built using a script running on a Debian box. > Installing precompiled distro versions of rather old gccs would have > been somewhat challenging. I've just rebuilt 4.6.4 to double check that > I wasn't just seeing things, but it seems that it definitely is still > putting c-common.h in the old location. for reference, this is the git commit that did the move: commit 7bedc3a05d34cd81e4835a2d3ff8c0ec7108eeb5 Author: steven Date: Sat Jun 5 20:33:22 2010 +0000 gcc/ChangeLog: * c-common.c: Move to c-family/. * c-common.def: Likewise. * c-common.h: Likewise. --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/scripts/gcc-plugins/gcc-generate-gimple-pass.h 2016-12-06 01:01:54.521724573 +0100 +++ b/scripts/gcc-plugins/gcc-generate-gimple-pass.h 2016-12-09 11:43:32.225226164 +0100 @@ -136,6 +136,7 @@ return new _PASS_NAME_PASS(); } #else +struct opt_pass *_MAKE_PASS_NAME_PASS(void); struct opt_pass *_MAKE_PASS_NAME_PASS(void) { return &_PASS_NAME_PASS.pass;