The easiest way to provide these files is to build the Binutils package and GAS. Configure them with the same ‘--host’ and ‘--target’ options that you use for configuring GNU CC, then build and install them. They install their executables automatically into the proper directory. Alas, they do not support all the targets that GNU CC supports.
If you want to install libraries to use with the cross-compiler, such as a standard C library, put them in the directory ‘/usr/local/target/lib’; installation of GNU CC copies all the files in that subdirectory into the proper place for GNU CC to find them and link with them.
The following example shows how to copy some libraries from a target-machine.
ftp target-machine lcd /usr/local/target/lib cd /lib get libc.a cd /usr/lib get libg.a get libm.a quitThe precise set of libraries you’ll need, and their locations on the target machine, vary depending on its operating system.
Many targets require “start files” such as ‘crt0.o’ and ‘crtn.o’ which are linked into each executable. These too should be placed in ‘/usr/local/target/lib’. There may be several alternatives for ‘crt0.o’, for use with profiling or other compilation options. Check your target’s definition of STARTFILE_SPEC to find out what start files it uses.
The following is an example of copying these files from a target-machine.
ftp target-machine lcd /usr/local/target/lib prompt cd /lib mget *crt*.o cd /usr/lib mget *crt*.o quit