Cross compiler with cygwin

Joe Humel jhumel@intrinsix.com
Wed Mar 7 18:01:00 GMT 2001


Hi.  I'm trying to learn how to build cross compilers with
cygwin.

First I build and test a native compiler like this:

         ./configure
         make
         gcc
hello.c
         ./a                                                                      //
Voila, it works.
                 
Then I try to build a cross compiler like this:

         ./config.guess  
                                                              //
result is i686-pc-cygwin32
         ./configure
--target=i686-pc-linux-gnu 
--host=i686-pc-cygwin32   // because I can test on
i686-pc-linux-gnu 
         make

The configure step completes without error, but make barfs after a
while.  The carnage is pasted below.  Things start going south
after the "blah, blah, blah" editorial comment that I
added.  

Any help appreciated.
Joe Humel


$ make
make[1]: Entering directory `/gcc-2.95.2-6/libiberty'
rm -f needed-list; touch needed-list; \
for f in atexit calloc memchr memcmp memcpy memmove memset rename strchr
strerro
r strrchr strstr strtol strtoul tmpnam vfprintf vprintf vfork waitpid
bcmp bcopy
 bzero; do \
  for g in asprintf.o basename.o insque.o mkstemps.o sigsetmask.o
vasprintf.o ;
do \
    case "$g" in \
      *$f*) echo $g >> needed-list ;;
\
    esac; \
  done; \
done
echo argv.o choose-temp.o concat.o cplus-dem.o fdmatch.o fnmatch.o
getopt.o geto
pt1.o getpwd.o getruntime.o hashtab.o hex.o floatformat.o objalloc.o
obstack.o p

blah, blah, blah

touch s-check
gcc -DCROSS_COMPILE -DIN_GCC     -g -O2 
-DHAVE_CONFIG_H    -I. -I. -I./config -
I./../include  \
  -DTARGET_NAME=\"i686-pc-linux-gnu\" \
  -c `echo ./toplev.c | sed 's,^\./,,'`
toplev.c:1188: warning: initialization from incompatible pointer
type
toplev.c:1188: warning: initialization from incompatible pointer
type
toplev.c:1188: warning: initialization from incompatible pointer
type
toplev.c:1188: warning: initialization from incompatible pointer
type
toplev.c:1188: warning: initialization from incompatible pointer
type
toplev.c:1188: warning: initialization from incompatible pointer
type
toplev.c:1188: warning: initialization from incompatible pointer
type
toplev.c:1188: warning: initialization from incompatible pointer
type
toplev.c:1188: warning: initialization from incompatible pointer
type
gcc -DCROSS_COMPILE -DIN_GCC     -g -O2 
-DHAVE_CONFIG_H  -o cc1.exe toplev.o ve
rsion.o tree.o print-tree.o stor-layout.o fold-const.o function.o stmt.o
except.
o expr.o calls.o expmed.o explow.o optabs.o intl.o varasm.o rtl.o
print-rtl.o rt
lanal.o emit-rtl.o genrtl.o real.o dbxout.o sdbout.o dwarfout.o
dwarf2out.o xcof
fout.o bitmap.o alias.o gcse.o integrate.o jump.o cse.o loop.o unroll.o
flow.o s
tupid.o combine.o varray.o regclass.o regmove.o local-alloc.o global.o
reload.o
reload1.o caller-save.o insn-peep.o reorg.o sched.o final.o recog.o
reg-stack.o
insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o
profil
e.o insn-attrtab.o i386.o getpwd.o  convert.o mbchar.o dyn-string.o
splay-tree.o
 graph.o sbitmap.o resource.o hash.o c-parse.o c-lang.o c-lex.o
c-pragma.o c-dec
l.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o 
obstack.o
-ladvapi32 ../libiberty/libiberty.a
toplev.o(.text+0x74dc): undefined reference to
`dwarfout_file_scope_decl'
toplev.o(.text+0x7511): undefined reference to `dwarf2out_decl'
toplev.o(.text+0x8030): undefined reference to `dwarfout_init'
toplev.o(.text+0x8072): undefined reference to `dwarf2out_init'
toplev.o(.text+0x81d1): undefined reference to `dwarfout_finish'
toplev.o(.text+0x8201): undefined reference to `dwarf2out_finish'
toplev.o(.text+0x8c42): undefined reference to
`dwarfout_file_scope_decl'
toplev.o(.text+0x8c90): undefined reference to `dwarf2out_decl'
toplev.o(.text+0x8d32): undefined reference to
`dwarfout_file_scope_decl'
toplev.o(.text+0x8d80): undefined reference to `dwarf2out_decl'
toplev.o(.text+0x9e0a): undefined reference to
`dwarfout_file_scope_decl'
toplev.o(.text+0x9e38): undefined reference to `dwarf2out_decl'
toplev.o(.text+0xc88e): undefined reference to
`dwarfout_start_new_source_file'
toplev.o(.text+0xc8ac): undefined reference to
`dwarf2out_start_source_file'
toplev.o(.text+0xc8e6): undefined reference to
`dwarfout_resume_previous_source_
file'
toplev.o(.text+0xc900): undefined reference to
`dwarf2out_end_source_file'
toplev.o(.text+0xc92e): undefined reference to `dwarfout_define'
toplev.o(.text+0xc94d): undefined reference to `dwarf2out_define'
toplev.o(.text+0xc982): undefined reference to `dwarfout_undef'
toplev.o(.text+0xc9a1): undefined reference to `dwarf2out_undef'
tree.o(.text+0x4df8): undefined reference to
`i386_pe_valid_decl_attribute_p'
tree.o(.text+0x4e65): undefined reference to
`i386_pe_valid_type_attribute_p'
tree.o(.text+0x4f0d): undefined reference to
`i386_pe_valid_type_attribute_p'
tree.o(.text+0x524e): undefined reference to
`i386_pe_merge_decl_attributes'
varasm.o(.text+0x769): undefined reference to
`i386_pe_dllexport_name_p'
varasm.o(.text+0x77b): undefined reference to
`i386_pe_record_exported_symbol'
varasm.o(.text+0xb74): undefined reference to
`i386_pe_encode_section_info'
varasm.o(.text+0xb84): undefined reference to
`i386_pe_encode_section_info'
varasm.o(.text+0x1625): undefined reference to
`i386_pe_encode_section_info'
varasm.o(.text+0x1642): undefined reference to
`i386_pe_encode_section_info'
varasm.o(.text+0x18f5): undefined reference to
`i386_pe_unique_section'
varasm.o(.text+0x1a99): undefined reference to
`i386_pe_dllexport_name_p'
varasm.o(.text+0x1aab): undefined reference to
`i386_pe_record_exported_symbol'
varasm.o(.text+0x1ad7): undefined reference to
`i386_pe_declare_function_type'
varasm.o(.text+0x2247): undefined reference to
`i386_pe_dllexport_name_p'
varasm.o(.text+0x225c): undefined reference to
`i386_pe_record_exported_symbol'
varasm.o(.text+0x226c): undefined reference to
`i386_pe_dllimport_name_p'
varasm.o(.text+0x23bd): undefined reference to
`i386_pe_unique_section'
varasm.o(.text+0x249d): undefined reference to
`i386_pe_dllexport_name_p'
varasm.o(.text+0x24b2): undefined reference to
`i386_pe_record_exported_symbol'
varasm.o(.text+0x2600): undefined reference to
`i386_pe_record_external_function
'
varasm.o(.text+0x2631): undefined reference to
`i386_pe_declare_function_type'
varasm.o(.text+0x4873): undefined reference to
`i386_pe_encode_section_info'
collect2: ld returned 1 exit status
make[1]: *** [cc1.exe] Error 1
make[1]: Leaving directory `/gcc-2.95.2-6/gcc'
make: *** [all-gcc] Error 2




More information about the crossgcc mailing list