From patchwork Mon Oct 12 09:58:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 529006 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 75B001402A8 for ; Mon, 12 Oct 2015 20:59:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=sn3rzhfg; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:date:from:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=rKNJX Me/CKfEjtuAkgrTSmT1zP8o4a/JYbCdGsGFko2Ib5tCNe0IQI+33xbK2+FQc+gAA 8SKrbvupYMF/3XgcP4BDv0UItHzpO3sUxA1PojNeNms4lWqRuW0ZUCTjYd7cLcdb n9/QTwGcv+bKdxD9LHKOFtazyskxnF6a7fKxHw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:date:from:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=lZVgATWWNUf dBnXDPW7acwTdec8=; b=sn3rzhfg915aVxFOiNmYpt3ZIgfH4YU298vgREEAc6T 776hmMn6x4N5vCmkTOuq+BvkPGwigl7CSiMqpiLcdld/E7/8l8AQL4bkSuqnYKeJ oPvkdCA4vn37jjx/wIOL0NdwgpDob0nFyLQp5Y5jaQBLkjX5JrBOj7Hu859eIu78 = Received: (qmail 47367 invoked by alias); 12 Oct 2015 09:58:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 47307 invoked by uid 89); 12 Oct 2015 09:58:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD, URIBL_BLACK autolearn=no version=3.3.2 X-HELO: e06smtp09.uk.ibm.com Received: from e06smtp09.uk.ibm.com (HELO e06smtp09.uk.ibm.com) (195.75.94.105) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 12 Oct 2015 09:58:50 +0000 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Oct 2015 10:58:45 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp09.uk.ibm.com (192.168.101.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 12 Oct 2015 10:58:42 +0100 X-IBM-Helo: d06dlp03.portsmouth.uk.ibm.com X-IBM-MailFrom: uweigand@de.ibm.com X-IBM-RcptTo: gcc-patches@gcc.gnu.org Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id E15B21B08061 for ; Mon, 12 Oct 2015 10:58:45 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t9C9wfud34209794 for ; Mon, 12 Oct 2015 09:58:41 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t9C9wfRm019447 for ; Mon, 12 Oct 2015 03:58:41 -0600 Received: from oc7340732750.ibm.com (icon-9-164-172-75.megacenter.de.ibm.com [9.164.172.75]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t9C9wfvw019429; Mon, 12 Oct 2015 03:58:41 -0600 Received: by oc7340732750.ibm.com (Postfix, from userid 500) id 63E773CDC; Mon, 12 Oct 2015 11:58:40 +0200 (CEST) Subject: Re: [RFA 1/2]: Don't ignore target_header_dir when deciding inhibit_libc To: hans-peter.nilsson@axis.com (Hans-Peter Nilsson) Date: Mon, 12 Oct 2015 11:58:40 +0200 (CEST) From: "Ulrich Weigand" Cc: law@redhat.com, gcc-patches@gcc.gnu.org In-Reply-To: <201510090234.t992YXgY028845@ignucius.se.axis.com> from "Hans-Peter Nilsson" at Oct 09, 2015 04:34:33 AM MIME-Version: 1.0 Message-Id: <20151012095840.63E773CDC@oc7340732750.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15101209-0037-0000-0000-00000437588A Hans-Peter Nilsson wrote: > > > So, ISTM we should change --with-headers (=yes) to either look > > > in sys-include or in include. Setting it to sys-include > > > wouldn't help you or anyone else as it's already the default... > > > > On the other hand, the current docs appear to imply that the > > intent was for --with-headers (=yes) to look into a pre-existing > > sys-include directory for headers. > > Right. So, if you'd prefer to align the implementation with > that, I don't mind. But, these are odd cases as-is, so current > use and users matter when aligning the documentation and > implementation and I wouldn't be surprised if the entire > usage-space is between ours... So overall, I now this is probably the best way forward: 1) Fix --with-headers to work just like no argument does now, i.e. look in sys-include. This is a simple bugfix that brings behavior in line with documentation. It does imply that everybody has to use sys-include, but that seems to be accepted practice anyway. (For me, it just means adding a symlink.) If at some point we do want to make things work without sys-include, I see two options: 2a) Change to not look into sys-include, but include. This would be a change in existing behavior that would affect some users. (They could get the old behavior back by simply adding --with-headers to their configure line, however.) --or-- 2b) Change target_header_dir from a single directory to a list of directories, and check all of these for header files. This list would typically include both sys-include and include. This should not change behavior for any existing user, and would bring the header search at configure time in line with the actual search order used by the compiler at run time, which will probably be the least surprise to users anyway ... For 1), something like the following should probably suffice: I'll probably not spend any more time right now to try to implement either of the 2) variants; I can live with using sys-include for now. Bye, Ulrich Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 228530) +++ gcc/configure.ac (working copy) @@ -1993,7 +1993,7 @@ elif test "x$TARGET_SYSTEM_ROOT" != x; t fi if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then - if test "x$with_headers" != x; then + if test "x$with_headers" != x && test "x$with_headers" != xyes; then target_header_dir=$with_headers elif test "x$with_sysroot" = x; then target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include"