From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21162 invoked by alias); 18 Jan 2012 12:01:14 -0000 Received: (qmail 21152 invoked by uid 22791); 18 Jan 2012 12:01:12 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_PX,TW_RK,TW_XL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bar.sig21.net (HELO bar.sig21.net) (80.81.252.164) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Jan 2012 12:00:53 +0000 Received: from p5099b351.dip0.t-ipconnect.de ([80.153.179.81] helo=zzz.local) by bar.sig21.net with esmtpsa (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.69) (envelope-from ) id 1RnUC5-0007zv-R5; Wed, 18 Jan 2012 13:00:49 +0100 Received: from js by zzz.local with local (Exim 4.77) (envelope-from ) id 1RnUC5-0004a5-5C; Wed, 18 Jan 2012 13:00:45 +0100 Date: Wed, 18 Jan 2012 12:01:00 -0000 From: Johannes Stezenbach To: "Yann E. MORIN" Cc: crossgcc@sourceware.org Subject: Re: gold vs. CT_STATIC_TOOLCHAIN Message-ID: <20120118120045.GA17526@sig21.net> References: <20111202132450.GA24105@sig21.net> <20111214111524.GA27754@sig21.net> <20111214114306.GA27923@sig21.net> <201201170022.31356.yann.morin.1998@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201201170022.31356.yann.morin.1998@free.fr> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-21-Score: -2.9 (--) X-Spam-21-Report: No, score=-2.9 required=8.0 tests=ALL_TRUSTED=-1,BAYES_00=-1.9 autolearn=ham X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00043.txt.bz2 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