From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23885 invoked by alias); 4 Nov 2016 13:17:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 23866 invoked by uid 89); 4 Nov 2016 13:17:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_RP_RNBL,URIBL_RED autolearn=no version=3.3.2 spammy=Dan, IA64, crossgcc X-HELO: server.danny.cz Date: Fri, 04 Nov 2016 13:17:00 -0000 From: Dan =?UTF-8?B?SG9yw6Fr?= To: libc-alpha@sourceware.org Subject: Re: Bootstrapping cross-toolchain for ia64 Message-Id: <20161104141647.231bb720b4679f7fe57bd81a@danny.cz> In-Reply-To: References: <64a4cff9-b1d3-4645-7baf-29ec50ebbb94@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2016-11/txt/msg00155.txt.bz2 On Fri, 4 Nov 2016 13:06:05 +0000 Joseph Myers wrote: > On Fri, 4 Nov 2016, Adhemerval Zanella wrote: > > > I faced the same issue and the solution I found was to configure > > gcc with '--disable-shared'. It is not an optimal approach for a > > complete toolchain, but it is at least suffice to correctly build > > glibc. > > The first GCC (whose build fails) *is* configured with > --disable-shared (and --without-headers --with-newlib to get > inhibit_libc defined). It still tries to build unwind code that > includes libc headers unconditionally. we used to have the following patch in the Fedora cross-gcc http://pkgs.fedoraproject.org/cgit/rpms/cross-gcc.git/log/cross-gcc-with-libgcc.patch diff -up gcc-4.7.0/libgcc/unwind-generic.h.cross-libgcc-ia64 gcc-4.7.0/libgcc/unwind-generic.h --- gcc-4.7.0/libgcc/unwind-generic.h.cross-libgcc-ia64 2012-06-01 18:14:22.552450391 +0200 +++ gcc-4.7.0libgcc/unwind-generic.h 2012-06-01 18:14:42.523121821 +0200 @@ -211,7 +211,9 @@ _Unwind_SjLj_Resume_or_Rethrow (struct _ compatible with the standard ABI for IA-64, we inline these. */ #ifdef __ia64__ +#ifndef inhibit_libc #include +#endif static inline _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *_C) Dan