From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24690 invoked by alias); 19 Apr 2006 14:48:58 -0000 Received: (qmail 24682 invoked by uid 22791); 19 Apr 2006 14:48:57 -0000 X-Spam-Check-By: sourceware.org Received: from mail.artimi.com (HELO mail.artimi.com) (217.40.213.68) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Apr 2006 14:48:54 +0000 Received: from mail.artimi.com ([192.168.1.3]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 19 Apr 2006 15:48:51 +0100 Received: from rainbow ([192.168.1.165]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 19 Apr 2006 15:48:51 +0100 From: "Dave Korn" To: Subject: Mainline and branch: --enable-targets=all dead on cygwin Date: Wed, 19 Apr 2006 16:27:00 -0000 Message-ID: <00d201c663c0$5f6f2cf0$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00260.txt.bz2 Hi all, Configuring binutils with --enable-targets=all fails when building gas at obj-coff.o: gcc -DHAVE_CONFIG_H -I. -I/gnu/binutils/binutils-2.16.92/gas -I. -D_GNU_SOURCE - I. -I/gnu/binutils/binutils-2.16.92/gas -I../bfd -I/gnu/binutils/binutils-2.16.9 2/gas/config -I/gnu/binutils/binutils-2.16.92/gas/../include -I/gnu/binutils/bin utils-2.16.92/gas/.. -I/gnu/binutils/binutils-2.16.92/gas/../bfd -I/gnu/binutils /binutils-2.16.92/gas/../intl -I../intl -DLOCALEDIR="\"/usr/build/install/share/ locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /gnu/binutils/binutils-2.16.92/gas/config/obj-coff.c In file included from /gnu/binutils/binutils-2.16.92/gas/config/obj-multi.h:26, from ./obj-format.h:1, from /gnu/binutils/binutils-2.16.92/gas/config/te-pe.h:7, from ./targ-env.h:1, from /gnu/binutils/binutils-2.16.92/gas/as.h:585, from /gnu/binutils/binutils-2.16.92/gas/config/obj-coff.c:25: /gnu/binutils/binutils-2.16.92/gas/config/obj-coff.h:63:1: "TARGET_FORMAT" redefined In file included from ./targ-cpu.h:1, from /gnu/binutils/binutils-2.16.92/gas/config/obj-coff.h:28, from /gnu/binutils/binutils-2.16.92/gas/config/obj-multi.h:26, from ./obj-format.h:1, from /gnu/binutils/binutils-2.16.92/gas/config/te-pe.h:7, from ./targ-env.h:1, from /gnu/binutils/binutils-2.16.92/gas/as.h:585, from /gnu/binutils/binutils-2.16.92/gas/config/obj-coff.c:25: /gnu/binutils/binutils-2.16.92/gas/config/tc-i386.h:69:1: this is the location of the previous definition make[4]: *** [obj-coff.o] Error 1 Both obj-coff.h and tc-i386.h seem to believe they 'own' TARGET_FORMAT. /gnu/binutils/binutils-2.16.92/gas/config/obj-coff.h 59 #ifdef TC_I386 60 #include "coff/i386.h" 61 62 #ifdef TE_PE 63 #define TARGET_FORMAT "pe-i386" 64 #endif 65 66 #ifndef TARGET_FORMAT 67 #define TARGET_FORMAT "coff-i386" 68 #endif 69 #endif /gnu/binutils/binutils-2.16.92/gas/config/tc-i386.h 66 #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ 67 || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) 68 extern const char *i386_target_format PARAMS ((void)); 69 #define TARGET_FORMAT i386_target_format () 70 #else 71 #ifdef OBJ_ELF 72 #define TARGET_FORMAT ELF_TARGET_FORMAT 73 #endif 74 #ifdef OBJ_AOUT 75 #define TARGET_FORMAT AOUT_TARGET_FORMAT 76 #endif 77 #endif Ummm. The next thing I tried was to move that #ifdef TE_PE inside the #ifndef TARGET_FORMAT, like so: 59 #ifdef TC_I386 60 #include "coff/i386.h" 61 62 #ifndef TARGET_FORMAT 63 #ifdef TE_PE 64 #define TARGET_FORMAT "pe-i386" 65 #else 66 #define TARGET_FORMAT "coff-i386" 67 #endif 68 #endif 69 #endif and now all I get is mkdir .libs gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -o as-new.e xe app.o as.o atof-generic.o cond.o depend.o dwarf2dbg.o dw2gencfi.o ecoff.o eho pt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file .o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o sb. o stabs.o subsegs.o symbols.o write.o tc-i386.o obj-multi.o atof-ieee.o obj-coff .o obj-aout.o obj-elf.o e-i386coff.o e-i386aout.o e-i386elf.o ../bfd/.libs/libb fd.a ../libiberty/libiberty.a ./../intl/libintl.a obj-coff.o: In function `coff_frob_symbol': /gnu/binutils/binutils-2.16.92/gas/config/obj-coff.c:1055: undefined reference t o `_an_external_name' collect2: ld returned 1 exit status make[4]: *** [as-new.exe] Error 1 make[4]: Leaving directory `/repository/davek/patch-gnu/binutils/obj-all/gas' because of this: 1054 #ifdef USE_UNIQUE 1055 if (an_external_name != NULL) 1056 unique = an_external_name; 1057 #endif where 'an_external_name' should exist in symbols.c: 62 #ifdef USE_UNIQUE 63 /* The name of an external symbol which is 64 used to make weak PE symbol names unique. */ 65 const char * an_external_name; 66 #endif but doesn't. It is defined in obj-coff.h under #ifdef TE_PE, but symbols.c doesn't include obj-coff.h in this arrangement, because obj-coff.h is included from obj-multi.h: 25 #ifdef OBJ_HEADER 26 #include OBJ_HEADER 27 #else and OBJ_HEADER is only defined in the obj-*.c files and not in symbols.c. Could anyone who knows better than me where the responsibility for setting TARGET_FORMAT truly lies and what's the difference between a TC_xxxx and a TE_xxxxx please comment on this clash? I don't yet get it myself. :-( cheers, DaveK -- Can't think of a witty .sigline today....