From: Nick Newsgroups: comp.os.msdos.djgpp Subject: Binutils cross-compilation errors Date: Sat, 06 Oct 2001 13:50:15 -0400 Organization: MindSpring Enterprises Lines: 94 Message-ID: <3BBF4457.D7800608@yahoo.com> NNTP-Posting-Host: a5.f7.99.32 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 6 Oct 2001 17:50:29 GMT X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I am trying to build Binutils 2.11.2 as a cross compiler hosted on i386-pc-msdosdjgpp targeted to h8300-hitachi-hms. I installed djdev203b, Binutils 2.11.2 binaries, GCC 2.95.3 binaries, and the most recent versions of Bash, Diffutils, Fileutils, Findutils, Sed, Grep, Gawk, Shellutils, Textutils, Texinfo, Less, and Flex into c:\djgpp. They work fine. Then I downloaded bnu2112s.zip and unzipped it into c:\gcc-h8. I went into /gcc-h8/gnu/binutl-2.112/djbuild, set CC to gcc, and ran `sh djconfig.sh --target=h8300-hitachi-hms'. It successfully configured, and made a Makefile. I then typed `make'. The first errors I got were improper symlinks (like ../xyzzy.la to xyzzy.la). They went away when I restarted Make. Then I got some error about "TARGET_ARCH" undefined in output-file.c in the GAS directory. I guessed and defined it to `bfd_arch_h8300' in `gas/config/tc-h8300.h', and it worked. But now, compiling `gas/config/tc-h8300.c', I get errors that I cannot figure out. Here is the complete abbreviated log of warnings and errors: gcc -DHAVE_CONFIG_H -I. -I/gcc-h8/gnu/binutl-2.112/gas -I. -D_GNU_SOURCE -I. -I/gcc-h8/gnu/binutl-2.112/gas -I../bfd -I/gcc-h8/gnu/binutl-2.112/gas/config -I/gcc-h8/gnu/binutl-2.112/gas/../include -I/gcc-h8/gnu/binutl-2.112/gas/.. -I/gcc-h8/gnu/binutl-2.112/gas/../bfd -I/gcc-h8/gnu/binutl-2.112/gas/../intl -I../intl -DLOCALEDIR="\"/dev/env/DJDIR/share/locale\"" -W -Wall -gstabs+ -O2 -c /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c In file included from /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:30: /gcc-h8/gnu/binutl-2.112/gas/../include/opcode/h8300.h:597: warning: missing initializer /gcc-h8/gnu/binutl-2.112/gas/../include/opcode/h8300.h:597: warning: (near initialization for `ops[355].inbase') /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c: In function `get_specific': /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:675: warning: comparison between signed and unsigned /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:692: warning: comparison between signed and unsigned /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c: In function `check_operand': /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:790: warning: comparison between signed and unsigned /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c: In function `build_bytes': /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1053: warning: comparison between signed and unsigned /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1071: warning: suggest parentheses around comparison in operand of & /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:929: warning: `absat' might be used uninitialized in this function /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:930: warning: `immat' might be used uninitialized in this function /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:931: warning: `nib' might be used uninitialized in this function /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c: In function `clever_message': /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1152: warning: comparison between signed and unsigned /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c: At top level: /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1305: parse error before `object_headers' ^ | I believe above means that object_headers isn't a valid type. I did some header tracing, and it only is valid if BFD_ASSEMBLER (I think) is not defined. /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1305: warning: type defaults to `int' in declaration of `headers' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1305: warning: data definition has no type or storage class /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1306: parse error before `{' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1319: parse error before `object_headers' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1319: warning: type defaults to `int' in declaration of `headers' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1319: warning: data definition has no type or storage class /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1320: parse error before `{' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1418: parse error before `object_headers' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1418: warning: type defaults to `int' in declaration of `headers' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1418: warning: data definition has no type or storage class /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1421: parse error before `{' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1423: parse error before string constant /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1423: warning: type defaults to `int' in declaration of `as_abort' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1423: conflicting types for `as_abort' /gcc-h8/gnu/binutl-2.112/gas/as.h:557: previous declaration of `as_abort' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1423: warning: data definition has no type or storage class /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1437: conflicting types for `md_apply_fix' /gcc-h8/gnu/binutl-2.112/gas/tc.h:78: previous declaration of `md_apply_fix' /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c: In function `md_estimate_size_before_relax': /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1469: warning: control reaches end of non-void function /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c: In function `md_pcrel_from': /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1486: warning: control reaches end of non-void function /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c: In function `tc_reloc_mangle': /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1501: warning: comparison between signed and unsigned /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1530: dereferencing pointer to incomplete type /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1531: dereferencing pointer to incomplete type /gcc-h8/gnu/binutl-2.112/gas/config/tc-h8300.c:1542: dereferencing pointer to incomplete type ^ | I think it's another invalid type problem. make.exe[3]: *** [tc-h8300.o] Error 1 make.exe[3]: Leaving directory `c:/gcc-h8/gnu/binutl-2.112/djbuild/gas' make.exe[2]: *** [all-recursive] Error 1 make.exe[2]: Leaving directory `c:/gcc-h8/gnu/binutl-2.112/djbuild/gas' make.exe[1]: *** [all-recursive-am] Error 2 make.exe[1]: Leaving directory `c:/gcc-h8/gnu/binutl-2.112/djbuild/gas' make.exe: *** [all-gas] Error 2