public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@sig21.net>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: crossgcc@sourceware.org
Subject: Re: gold vs. CT_STATIC_TOOLCHAIN
Date: Wed, 18 Jan 2012 12:01:00 -0000	[thread overview]
Message-ID: <20120118120045.GA17526@sig21.net> (raw)
In-Reply-To: <201201170022.31356.yann.morin.1998@free.fr>

Hi Yann,

On Tue, Jan 17, 2012 at 12:22:31AM +0100, Yann E. MORIN wrote:
> Sorry for the delay, important stuff to attend IRL... :-/

No problem, I was only worried because your email bounced.
Is anciens.enib.fr gone for good?

> On Wednesday 14 December 2011 12:43:06 Johannes Stezenbach wrote:
> > [INFO ]  Installing binutils
> > [EXTRA]    Configuring binutils
> > [EXTRA]    Prepare binutils for static build
> > [EXTRA]    Building binutils
> > [ERROR]    g++: error: unrecognized option '-all-static'
> > [ERROR]    make[5]: *** [ld-new] Error 1
> [--SNIP--]
> > This happens both with CT_BINUTILS_LINKERS_LIST="gold" and "ld,gold".
> > 
> > Oh, and my host gcc is "gcc version 4.6.2 (Debian 4.6.2-7)",
> > binutils are "GNU ld (GNU Binutils for Debian) 2.22".
> > (I'm using Debian sid).
> 
> Ah, I see why I don't have the issue. I'm using squeeze, and that has
> gcc 4.4.5 and binutils 2.20.1.
> 
> Now, with respect to your initial patch... Your proposal was to disable gold
> when building a static toolchain. I'd rather that we fix gold static build.
> 
> Unless someone beats me to it, I'll look at fixining this...

sid also has "gcc-4.4 (Debian 4.4.6-14) 4.4.6" but it also does not
support -all-static (which makes sense because it is a libtool option).

A few lines from my build log, maybe you can check what is different
for you:

[INFO ]  Installing binutils
[EXTRA]    Configuring binutils
[DEBUG]    Extra config passed: '--enable-ld=no --enable-gold=yes --with-pkgversion=crosstool-NG hg+unknown-20120113.153456 - pxlw-201111 --disable-nls'
[DEBUG]    ==> Executing: 'CFLAGS= -pipe ' 'CXXFLAGS= -pipe ' '/home/js/toolchain-v2/build/.build/src/binutils-2.22/configure' '--build=i686-build_pc-linux-gnu' '--host=i686-build_pc-linux-gnu' '--target=arm-unknown-linux-uclibcgnueabi' '--prefix=/tmp/tc/arm-unknown-linux-uclibcgnueabi' '--disable-multilib' '--disable-werror' '--enable-ld=no' '--enable-gold=yes' '--with-pkgversion=crosstool-NG hg+unknown-20120113.153456 - pxlw-201111' '--disable-nls' '--with-float=soft' '--with-sysroot=/tmp/tc/arm-unknown-linux-uclibcgnueabi/arm-unknown-linux-uclibcgnueabi/sysroot'

[EXTRA]    Building binutils
[DEBUG]    ==> Executing: 'make' 'LDFLAGS=-static -all-static' '-j5'

[ALL  ]    /bin/bash ./libtool --tag=CC   --mode=link i686-build_pc-linux-gnu-gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -pipe  -rpath /tmp/tc/arm-unknown-linux-uclibcgnueabi/i686-build_pc-linux-gnu/arm-unknown-linux-uclibcgnueabi/lib -release `cat ../bfd/libtool-soversion`  -static -all-static -o libopcodes.la  dis-buf.lo disassemble.lo dis-init.lo arm-dis.lo
[ALL  ]    libtool: link: i686-build_pc-linux-gnu-ar cru .libs/libopcodes.a  dis-buf.o disassemble.o dis-init.o arm-dis.o
[ALL  ]    libtool: link: i686-build_pc-linux-gnu-ranlib .libs/libopcodes.a
[ALL  ]    libtool: link: ( cd ".libs" && rm -f "libopcodes.la" && ln -s "../libopcodes.la" "libopcodes.la" )
[ALL  ]    libtooldir=`/bin/bash ./libtool --config | sed -n -e 's/^objdir=//p'`;       if [ -f $libtooldir/libopcodes.a ]; then
         cp $libtooldir/libopcodes.a libopcodes.tmp;     i686-build_pc-linux-gnu-ranlib libopcodes.tmp;          /bin/bash /home/js/toolchain-v2/build/.build/src/binutils-2.22/opcodes/../move-if-change libopcodes.tmp libopcodes.a;         else true; fi

[ALL  ]    i686-build_pc-linux-gnu-ar cru libgold.a archive.o attributes.o binary.o common.o compressed_output.o copy-relocs.o cref.o defstd.o descriptors.o dirsearch.o dynobj.o dwarf_reader.o ehframe.o errors.o expression.o fileread.o gc.o gold.o gold-threads.o icf.o incremental.o int_encoding.o layout.o mapfile.o merge.o object.o options.o output.o parameters.o plugin.o readsyms.o reduced_debug_output.o reloc.o resolve.o script-sections.o script.o stringpool.o symtab.o target.o target-select.o timer.o version.o workqueue.o workqueue-threads.o  yyscript.o
[ALL  ]    i686-build_pc-linux-gnu-ranlib libgold.a
[ALL  ]    i686-build_pc-linux-gnu-g++ -W -Wall    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=ld-new -pipe   -static -all-static -o ld-new main.o i386.o x86_64.o sparc.o powerpc.o arm.o arm-reloc-property.o libgold.a ../libiberty/libiberty.a    -lz
[ERROR]    g++: error: unrecognized option '-all-static'


The difference for gold is that libtool is not used.  The easiest fix would be
to patch the gold Makefile to filter out the -all-static.  Or maybe gold
can be libtoolized. But first I would be interested to understand why this builds for you.


Thanks
Johannes

--
For unsubscribe information see http://sourceware.org/lists.html#faq

      reply	other threads:[~2012-01-18 12:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 13:25 Johannes Stezenbach
2011-12-13 17:23 ` Johannes Stezenbach
2011-12-13 22:32   ` Yann E. MORIN
2011-12-14  0:09 ` Yann E. MORIN
2011-12-14 11:15   ` Johannes Stezenbach
2011-12-14 11:43     ` Johannes Stezenbach
2012-01-16 23:22       ` Yann E. MORIN
2012-01-18 12:01         ` Johannes Stezenbach [this message]

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=20120118120045.GA17526@sig21.net \
    --to=js@sig21.net \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@free.fr \
    /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).