This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more infromation.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Bob Stafford wrote: > I'm trying to build a cross compiler to generate code for a simple 68340 > > evaluation system. Whne linking a hello world program I get the > following errors > > [bobstaff@snooker 340]$ m68k-coff-gcc hello.c -L > /usr/lib/gcc-lib/m68k-coff/2.95.2 -lgcc > /usr/m68k-coff/lib/crt0.o:../../../../src/libgloss/m68k/crt0.S:16: > undefined reference to `hardware_init_hook' > /usr/m68k-coff/lib/crt0.o(.text+0x48):../../../../src/libgloss/m68k/crt0.S: > > undefined reference to `software_init_hook' > /usr/m68k-coff/lib/crt0.o(.text+0x58):../../../../src/libgloss/m68k/crt0.S: > > undefined reference to `__FINI_SECTION__' > /usr/m68k-coff/lib/crt0.o(.text+0x5e):../../../../src/libgloss/m68k/crt0.S: > > undefined reference to `atexit' > /usr/m68k-coff/lib/crt0.o(.text+0x64):../../../../src/libgloss/m68k/crt0.S: > > undefined reference to `__INIT_SECTION__' > /tmp/ccrQMMiN.o(.text+0x1e):hello.c: undefined reference to `printf' > /usr/lib/gcc-lib/m68k-coff/2.95.2/libgcc.a(_exit.o): In function `exit': > > /home/bobstaff/340/b-m68k-coff/gcc/../../src/gcc/libgcc2.c(.text+0x12): > undefined reference to `_cleanup' > /home/bobstaff/340/b-m68k-coff/gcc/../../src/gcc/libgcc2.c(.text+0x1a): > undefined reference to `_exit' > collect2: ld returned 1 exit status > > I believe I probably need to provide some board support functions to get > rid of these errors. Can anybody point me in the direction of some docs > on the web that explain what functions I need to write and what they > should do. Alternatively are these functions available somewhere. I had similar problems when I compiled a powerpc-eabi cross-compiler. I found that I could compile but not link. I could link if I gave an option of "-mads", "-msim" or "-myellowknife". The reason for this is apparent in the specs file. These options link in extra libraries (eg. libads.a). These are the board support libraries. You need to get a newgloss board support package which best matches your hardware, copy it, edit the files to cater for any board differences (these should be minimal). You can then compile it and make a library and put it with the other bsp libraries. You can then edit you specs file to add an option of -mmyboard and get it to link in the library. Alternatively you can just add -lmyboard to your link command. You may find a board support package that doesn't need modification as it matches all the requirements to get the board running. In this case, just add the relevant options to the compiler or linker command lines. I had a look for 68k bsp options but didn't find any. I think the info pages were for gcc-2.7.2 though so gcc-2.95.2 might have extra options ? Brendan Simon. ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |