delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/03/09:23:22

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4AF04062.8040905@gmail.com>
Date: Tue, 03 Nov 2009 14:38:26 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Build a toolchain for ARM with cygwin 1.5.25-15 ?
References: <9af5fe740911030328r24fb018dwb8c2626942f32e1b AT mail DOT gmail DOT com>
In-Reply-To: <9af5fe740911030328r24fb018dwb8c2626942f32e1b@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Marcel Rutten wrote:

> building the toolchain is done in 4 steps:
> 
> 1 build binutils,
> 2 build gcc stage 1, a barebones gcc, for building glibc
> 3 build glibc
> 4 build gcc stage 2, with c and c++ support.
> 
> Things go wrong in step 3, the linker starts complaining about
> undefined references, all referring to weak symbols( __open and a
> bunch of others ).

> Obviously, the cygwin versions of gas and ld should support weak
> symbols when compiling for arm-linux-gnueabi, before my plan of
> building this toolchain will succeed.

  The versions you built in step 1, yes.

> What I don't see is why the host platform has to support weak symbols
> (in PE-dll's) before the compiler/linker for the target platform can
> use them as well.

  It doesn't.  The real problem is either that the tools you built in step 1
didn't get the right --target setting and ended up being native tools, or that
the glibc configure in step 3 is for some reason failing to find them and ends
up invoking the native tools.

> Else, if I install a compiled version of glibc for the target
> processor (built on another platform), then build gcc stage 2, could
> that be useful and lead to a working toolchain?

  The technique of taking a copy of the real sysroot (libs and include dir)
from a live target (or a distro mirror/install cd/whatever) and building your
compiler against that, rather than bootstrapping the whole library from
scratch, has lots to recommend it, and should be somewhat simpler.  It'll
still need to be able to find the correct target binutils, though, no matter
what; you need to solve that problem first I think.

    cheers,
      DaveK


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019