From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5784 invoked by alias); 16 Apr 2007 14:50:36 -0000 Received: (qmail 5776 invoked by uid 22791); 16 Apr 2007 14:50:35 -0000 X-Spam-Check-By: sourceware.org Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.126.188) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 16 Apr 2007 15:50:29 +0100 Received: from [84.190.54.188] (helo=computername) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis), id 0MKwtQ-1HdSXB2oxL-0004m8; Mon, 16 Apr 2007 16:50:26 +0200 Date: Mon, 16 Apr 2007 21:07:00 -0000 To: "Alan Modra" Subject: Re: Binutils 2.17: configure in libiberty does not find stdlib.h -> build failure From: "Martin Haupt" Cc: binutils@sourceware.org Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 MIME-Version: 1.0 References: <20070416044258.GS28088@bubble.grove.modra.org> Content-Transfer-Encoding: Quoted-Printable Message-ID: In-Reply-To: <20070416044258.GS28088@bubble.grove.modra.org> User-Agent: Opera Mail/9.20 (Win32) Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00213.txt.bz2 On Mon, 16 Apr 2007 06:42:58 +0200, Alan Modra =20=20 wrote: > That will be because Daniel made libiberty/configure.ac invoke > AC_PROG_CPP_WERROR, thus turning cpp warnings into errors. > See http://sourceware.org/ml/binutils/2003-09/msg00416.html > configure in other dirs doesn't do this. I have to excuse myself because I did not really point to the real error=20= =20 message I get from gcc(!). Gcc fails to compile=20=20 toplevel/libiberty/cplus-dem.c in line 55 because of conflicting types for= =20=20 malloc (which implies that there really is a stdlib.h). Here is the error= =20=20 message: if [ x"" !=3D x ]; then \ x86_64-unknown-linux-gnu-gcc -Wl,-dynamic-linker=20=20 -Wl,/cross-tools/x86_64-unknown-linux-gnu/sys-root/lib64/ld-linux-x86-64.so= .2=20=20 -c -DHAVE_CONFIG_H -pipe -O3 -march=3Dathlon64 -I.=20=20 -I../../binutils-2.17/libiberty/../include -W -Wall -pedantic=20=20 -Wwrite-strings -Wstrict-prototypes -Wc++-compat=20=20=20 ../../binutils-2.17/libiberty/cplus-dem.c -o pic/cplus-dem.o; \ else true; fi x86_64-unknown-linux-gnu-gcc -Wl,-dynamic-linker=20=20 -Wl,/cross-tools/x86_64-unknown-linux-gnu/sys-root/lib64/ld-linux-x86-64.so= .2=20=20 -c -DHAVE_CONFIG_H -pipe -O3 -march=3Dathlon64 -I.=20=20 -I../../binutils-2.17/libiberty/../include -W -Wall -pedantic=20=20 -Wwrite-strings -Wstrict-prototypes -Wc++-compat=20=20 ../../binutils-2.17/libiberty/cplus-dem.c -o cplus-dem.o ../../binutils-2.17/libiberty/cplus-dem.c:55: warning: function=20=20 declaration isn't a prototype ../../binutils-2.17/libiberty/cplus-dem.c:55: error: conflicting types for= =20=20 'malloc' ../../binutils-2.17/libiberty/cplus-dem.c:56: warning: function=20=20 declaration isn't a prototype ../../binutils-2.17/libiberty/cplus-dem.c: In function=20=20 'code_for_qualifier': ../../binutils-2.17/libiberty/cplus-dem.c:582: warning: implicit=20=20 declaration of function 'abort' ../../binutils-2.17/libiberty/cplus-dem.c:582: warning: incompatible=20=20 implicit declaration of built-in function 'abort' ../../binutils-2.17/libiberty/cplus-dem.c: In function 'qualifier_string': ../../binutils-2.17/libiberty/cplus-dem.c:622: warning: incompatible=20=20 implicit declaration of built-in function 'abort' ../../binutils-2.17/libiberty/cplus-dem.c: In function 'squangle_mop_up': ../../binutils-2.17/libiberty/cplus-dem.c:1082: warning: implicit=20=20 declaration of function 'free' ../../binutils-2.17/libiberty/cplus-dem.c: In function=20=20 'demangle_qualified': ../../binutils-2.17/libiberty/cplus-dem.c:3177: warning: implicit=20=20 declaration of function 'atoi' make[2]: *** [cplus-dem.o] Error 1 make[2]: Leaving directory=20=20 `/mnt/lfs/temptools/src/binutils-build/libiberty' make[1]: *** [all-libiberty] Error 2 make[1]: Leaving directory `/mnt/lfs/temptools/src/binutils-build' make: *** [all] Error 2 > It is indeed strange that you have linker options being passed to your > cpp. How are you configuring? Do you specify CPP or CPPFLAGS, > perhaps via your environment? I have only specified the following flags: LD_LIBRARY_PATH, CC, CXX, LD,=20= =20 AR, AS, RANLIB. I appended the linker path to CC and CXX, so that I can=20= =20 run 64bit executables without having them statically linked. See here: http://www-1.ibm.com/support/docview.wss?rs=3D2239&context=3DSSJT9L&dc=3DDB= 520&uid=3Dswg21242495&loc=3Den_US&cs=3DUTF-8&lang=3Den&rss=3Dct2239other LD_LIBRARY_PATH points to the 64bit libs. I have not set CPP and CPPFLAGS. Your question about CPP and CPPFLAGS made me curious about why I had not=20= =20 set them. So CPP also points to crosstool-cpp. Binutils compiles now.=20=20 Thank you for your help!