public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Joseph Myers <joseph@codesourcery.com>
Cc: libc-alpha@sourceware.org
Subject: Re: Bootstrapping cross-toolchain for ia64
Date: Fri, 04 Nov 2016 13:17:00 -0000	[thread overview]
Message-ID: <5d06fa42-5467-98b3-d0b6-aadaff842c9f@linaro.org> (raw)
In-Reply-To: <alpine.DEB.2.20.1611041305100.1065@digraph.polyomino.org.uk>



On 04/11/2016 11:06, 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.

Yeah I noted, but I think I am doing something different than your
intention.  Since the aim of the toolchain I intend to use is just
to *build* ia64 glibc (since I have no way to actually testing it) 
I basically did

  1. gcc:
    1.1. make all-gcc
    1.2. make install-gcc
  2. glibc
    2.1. make install-bootstrap-headers=yes install-headers
    2.2. make csu/subdir_lib
    2.3. install csu/crt1.o csu/crti.o csu/crtn.o $INSTALL_PATH/$TARGET/lib
    2.4. $TARGET-gcc $CFLAGS_GLIBC $CFLAGS_GLIBC -nostdlib -nostartfiles \
         -shared -x c /dev/null -o $INSTALL_PATH/$TARGET/lib/libc.so
    2.5. touch $INSTALL_PATH/$TARGET/include/gnu/stubs.h
  3. gcc:
    3.1. make all-target-libgcc
    3.2. install-target-libgcc
  4. glibc:
    4.1. make
    4.2. make install
  5. gcc:
    5.1. make all
    5.2. make install

Yes, I know this is *far* from ideal (resulting toolchain is mostly unusable
for actually testing since it lacks shared libgcc), but at least it can verify
glibc build for ia64-linux-gnu targets.

  reply	other threads:[~2016-11-04 13:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04  0:52 Joseph Myers
2016-11-04 12:10 ` Adhemerval Zanella
2016-11-04 13:06   ` Joseph Myers
2016-11-04 13:17     ` Adhemerval Zanella [this message]
2016-11-04 13:17     ` Dan Horák
2016-11-04 13:31       ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d06fa42-5467-98b3-d0b6-aadaff842c9f@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).