From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29418 invoked by alias); 29 Jan 2004 17:00:00 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29376 invoked from network); 29 Jan 2004 16:59:58 -0000 Received: from unknown (HELO atom.ncube.com) (134.242.21.65) by sources.redhat.com with SMTP; 29 Jan 2004 16:59:58 -0000 Received: from atom.ncube.com (atom.ncube.com [127.0.0.1]) by atom.ncube.com (8.12.8/8.12.8) with ESMTP id i0TGxuK5013350; Thu, 29 Jan 2004 08:59:56 -0800 Received: from localhost (dlc@localhost) by atom.ncube.com (8.12.8/8.12.8/Submit) with ESMTP id i0TGxtw4013346; Thu, 29 Jan 2004 08:59:56 -0800 X-Authentication-Warning: atom.ncube.com: dlc owned process doing -bs Date: Thu, 29 Jan 2004 17:00:00 -0000 From: dan clark To: Felix Lee cc: gdb-patches@sources.redhat.com Subject: with-headers should be 'build' != 'host' In-Reply-To: <20040129034507.D5314180D@grayscale.canids> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-943706556-1075395595=:13269" X-SW-Source: 2004-01/txt/msg00741.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --8323328-943706556-1075395595=:13269 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-length: 1943 Thank you for the clarification. I agree that a fix should be applied to configure.in. Since the tar file includes both configure and configure.in the configure script must also be patched in attempts to use the 6.0 distribution as provided. The use of is_cross_compiler does seem to be overloaded. In particular, it is subsequently used for determining the skipdirs, determining if newlib should be built, and if it is OK to have the 'with_headers' value defined, the later of which is most problematic. If the 'build' != 'host' then it is likely that 'with_headers' will be defined. But it may very well be that 'host' == 'target' in this case. The fix I proposed is a bit heavy handed, perhaps the more appropriate way of dealing with this issue is the refine the test which results in the error: "*** --with-headers is only supported when cross compiling" The resulting revised patch is attached for clarity. dan On Wed, 28 Jan 2004, Felix Lee wrote: > dan clark : > > The configure script in 6.0 checks if the host != target to decide if a > > cross compiler should be used. > > no, it doesn't. is_cross_compiler is a badly named variable. it > means you're building a cross development gdb, and it doesn't > have anything to do with whether you're using a cross compiler to > build gdb. (the variable name makes more sense when you have an > integrated gdb/gcc source tree.) > > there are different tests elsewhere for build != host. > > (note, configure is a file generated by autoconf. patches should > be made to configure.in.) > > I don't really see a reason for the variable is_cross_compiler > to exist. the comment says > # Define is_cross_compiler to save on calls to 'test'. > but it's usually used like this > if test x${is_cross_compiler} != xno ; then > so it's not reducing the number of tests much. I think directly > testing host = target would be clearer. > -- > > --8323328-943706556-1075395595=:13269 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="diff.out" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: diff Content-Disposition: attachment; filename="diff.out" Content-length: 2188 KioqIGNvbmZpZ3VyZQlUaHUgSmFuIDI5IDA4OjU1OjM1IDIwMDQNCi0tLSBj b25maWd1cmUub3JpZwlUaHUgSmFuIDI5IDA4OjU2OjAxIDIwMDQNCioqKioq KioqKioqKioqKiBjb3B5X2RpcnM9DQoqKiogMTYwMywxNjA5ICoqKioNCiAg IyBIYW5kbGUgLS13aXRoLWhlYWRlcnM9WFhYLiAgSWYgdGhlIHZhbHVlIGlz IG5vdCAieWVzIiwgdGhlIGNvbnRlbnRzIG9mDQogICMgdGhlIG5hbWVkIGRp cmVjdG9yeSBhcmUgY29waWVkIHRvICQodG9vbGRpcikvc3lzLWluY2x1ZGUu DQogIGlmIHRlc3QgeCIke3dpdGhfaGVhZGVyc30iICE9IHggOyB0aGVuDQoh ICAgaWYgdGVzdCB4IiR7aG9zdH0iID0geCIke2J1aWxkfSI7IHRoZW4NCiAg ICAgIGVjaG8gMT4mMiAnKioqJyAtLXdpdGgtaGVhZGVycyBpcyBvbmx5IHN1 cHBvcnRlZCB3aGVuI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