This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Here are the diffs from FAQ-0.7 to FAQ-0.8. As always, suggestions for changes are welcome, but I'd prefer that they be in form of patches. Thanks. [If I get some diffs in the next couple of weeks, I'll make FAQ-0.9 shortly after.] I changed the canadian cross build script (also called 3-way build script) a bit [mostly minor enhancements] and tested it with m68k-coff and h8300-hms targets. The script is in ftp://ftp.cygnus.com/pub/embedded/crossgcc/build-3way.sh The FAQ is in ftp://ftp.cygnus.com/pub/embedded/crossgcc/FAQ. *** FAQ-0.7 Sun Jun 23 10:09:56 1996 --- FAQ-0.8 Mon Mar 17 12:13:03 1997 *************** *** 3,8 **** =================================== ! Version: 0.7 ! Last Updated: 960622 Maintainer: dje@cygnus.com Location: ftp://ftp.cygnus.com/pub/embedded/crossgcc/FAQ --- 3,8 ---- =================================== ! Version: 0.8 ! Last Updated: 970317 Maintainer: dje@cygnus.com Location: ftp://ftp.cygnus.com/pub/embedded/crossgcc/FAQ *************** Subscription requests should be sent to *** 14,23 **** with a body of 1 line containing "subscribe crossgcc <your-email-address>" and nothing else (and no <>'s around your email address). This list is run by the "majordomo" software. ! FIXME: This FAQ is unfinished (in the sense that there are some obvious ! sections it needs, some included below). Please send contributions to ! dje@cygnus.com. Table of Contents --- 14,27 ---- with a body of 1 line containing "subscribe crossgcc <your-email-address>" and nothing else (and no <>'s around your email address). + To unsubscribe, send a message to "crossgcc-request@cygnus.com" + with a body of 1 line containing "unsubscribe crossgcc <your-email-address>" + and nothing else (and no <>'s around your email address). + The email address you use to unsubscribe *must* be identical, character for + character, to one used to subscribe, and case is important too. This list is run by the "majordomo" software. ! This FAQ is unfinished (in the sense that there are some obvious sections ! it needs, some included below). Please send contributions to dje@cygnus.com. Table of Contents *************** Table of Contents *** 35,49 **** 3.1 Unix and related systems 3.2 One pass installation of GCC+Binutils ! 3.3 Cygnus releases ! 3.3.1 Where are the info files? ! 3.3.2 How do I build a Cygnus release? ! 3.4 Win32 systems ! 3.5 MSDOS systems ! 3.5.1 How do I build a cross-compiler with DJGPP? ! 3.6 Canadian Crosses (or, Building a DOS hosted cross compiler without using DOS) ! 3.6.1 What is a Canadian Cross? ! 3.6.2 How do I build an MSDOS hosted cross compiler without using MSDOS? ! 3.7 Disk space requirements 4. Frequently Encountered Problems --- 39,55 ---- 3.1 Unix and related systems 3.2 One pass installation of GCC+Binutils ! 3.3 Can I build in a directory different from the source tree? ! 3.4 Can I use a non-GNU make? ! 3.5 Cygnus releases ! 3.5.1 Where are the info files? ! 3.5.2 How do I build a Cygnus release? ! 3.6 Win32 systems ! 3.7 MSDOS systems ! 3.7.1 How do I build a cross-compiler with DJGPP? ! 3.8 Canadian Crosses (or, Building a DOS hosted cross compiler without using DOS) ! 3.8.1 What is a Canadian Cross? ! 3.8.2 How do I build an MSDOS hosted cross compiler without using MSDOS? ! 3.9 Disk space requirements 4. Frequently Encountered Problems *************** Table of Contents *** 78,82 **** 8. Target specific info ! e.g. Using BDM on a 68k, crt0's for specific cards, ... 9. Operating systems for embedded systems --- 84,88 ---- 8. Target specific info ! 8.1 What embedded targets are supported? 9. Operating systems for embedded systems *************** Table of Contents *** 91,95 **** 10.4 Other mailing lists, web sites, newsgroups, etc. ! 11. Contributors 1. List of the pieces needed and where to find them --- 97,103 ---- 10.4 Other mailing lists, web sites, newsgroups, etc. ! 11. Glossary ! ! 12. Contributors 1. List of the pieces needed and where to find them *************** you to avoid overloading prep. The list *** 104,114 **** "finger fsf@prep.ai.mit.edu". ! Compiler: GCC 2.7.2, file gcc-2.7.2.tar.gz ! Assembler: GAS 2.6, file binutils-2.6.tar.gz ! Linker: GLD 2.6, file binutils-2.6.tar.gz ! Utilities: Binutils 2.6, file binutils-2.6.tar.gz Debugger: GDB 4.16, file gdb-4.16.tar.gz --- 112,125 ---- "finger fsf@prep.ai.mit.edu". ! Compiler: GCC 2.7.2.1, file gcc-2.7.2.1.tar.gz ! ! gcc-2.7.2.2 may also be used, it's difference over 2.7.2.1 is ! for linux native compilers, which aren't a concern here. ! Assembler: GAS 2.7, file binutils-2.7.tar.gz ! Linker: GLD 2.7, file binutils-2.7.tar.gz ! Utilities: Binutils 2.7, file binutils-2.7.tar.gz Debugger: GDB 4.16, file gdb-4.16.tar.gz *************** Debugger: GDB 4.16, file gdb-4.16.tar.gz *** 116,121 **** Library: There are currently two choices for a library, the GNU libc (Glibc) and a library put together by Cygnus (Newlib). ! GLIBC 1.09, file glibc-1.09.tar.gz ! Newlib 1.7.0, file newlib-1.7.0.tar.gz in directory ftp.cygnus.com:/pub/newlib --- 127,132 ---- Library: There are currently two choices for a library, the GNU libc (Glibc) and a library put together by Cygnus (Newlib). ! GLIBC 2.0.1, file glibc-2.0.1.tar.gz ! Newlib 1.7.1, file newlib-1.7.1.tar.gz in directory ftp.cygnus.com:/pub/newlib *************** various sources. *** 127,131 **** 2.1 Cygnus patches ! crossgcc-gcc-2.7.2.patch This patch adds these things. --- 138,142 ---- 2.1 Cygnus patches ! crossgcc-gcc-2.7.2.1.patch This patch adds these things. *************** crossgcc-gcc-2.7.2.patch *** 155,164 **** This is needed for example in a Canadian Cross where one is building a DOS hosted cross compiler from a Unix system. The patch is available in ftp.cygnus.com:/pub/embedded/crossgcc. To apply the patch: ! cd gcc-2.7.2 ! patch -p1 <../crossgcc-gcc-2.7.2.patch 2.2 Patch for binutils-2.6 GAS bug "Case value 3 unexpected at line 1557" --- 166,180 ---- This is needed for example in a Canadian Cross where one is building a DOS hosted cross compiler from a Unix system. + e. Provide ppc-asm.h. The patch is available in ftp.cygnus.com:/pub/embedded/crossgcc. To apply the patch: ! cd gcc-2.7.2.1 ! patch <../crossgcc-gcc-2.7.2.1.patch ! ! crossgcc-gcc-2.7.2.2.patch is also available it is identical to ! crossgcc-gcc-2.7.2.1.patch except for a few changes necessary to make ! it apply properly. 2.2 Patch for binutils-2.6 GAS bug "Case value 3 unexpected at line 1557" *************** Binutils-2.6 has a bug in the i386 port *** 171,174 **** --- 187,192 ---- This bug is present in all i386 ports. The patch is in ftp://ftp.cygnus.com/pub/embedded/crossgcc/binutils-2.6-obj-coff.patch + + This patch is not necessary for binutils-2.7 or later. 3. How to configure, build, and install GCC as a cross-compiler *************** mkdir build-binutils build-gcc build-new *** 214,228 **** # Configure, build and install binutils cd build-binutils ! ../binutils-2.6/configure --host=$host --target=$target --prefix=$prefix -v make all install # Configure, build and install gcc cd ../build-gcc ! ../gcc-2.7.2/configure --host=$host --target=$target --prefix=$prefix -v make all install # Configure, build and install newlib cd ../build-newlib ! ../newlib-1.7.0/configure --host=$host --target=$target --prefix=$prefix -v # The settings for FOO_FOR_TARGET aren't necessary if you put $prefix/bin # in your path before running this. --- 232,246 ---- # Configure, build and install binutils cd build-binutils ! ../binutils-2.7/configure --host=$host --target=$target --prefix=$prefix -v make all install # Configure, build and install gcc cd ../build-gcc ! ../gcc-2.7.2.1/configure --host=$host --target=$target --prefix=$prefix -v make all install # Configure, build and install newlib cd ../build-newlib ! ../newlib-1.7.1/configure --host=$host --target=$target --prefix=$prefix -v # The settings for FOO_FOR_TARGET aren't necessary if you put $prefix/bin # in your path before running this. *************** make all install *** 242,247 **** Is there an easier way? Yes! ! If you study the top-level Makefile that comes with binutils-2.6, ! newlib-1.7.0, or gdb-4.16, you'll see that they're all quite similar (not surprising since they're essentially the same file). --- 260,265 ---- Is there an easier way? Yes! ! If you study the top-level Makefile that comes with binutils-2.7, ! newlib-1.7.1, or gdb-4.16, you'll see that they're all quite similar (not surprising since they're essentially the same file). *************** layout different than what would normall *** 251,259 **** sources. ! You will need to apply the Cygnus crossgcc-gcc-2.7.2.patch. What we now need to do is turn this directory layout ! ./binutils-2.6/ bfd/ binutils/ --- 269,277 ---- sources. ! You will need to apply the Cygnus crossgcc-gcc-2.7.2.1.patch. What we now need to do is turn this directory layout ! ./binutils-2.7/ bfd/ binutils/ *************** What we now need to do is turn this dire *** 265,270 **** opcodes/ texinfo/ ! ./gcc-2.7.2/ ! ./newlib-1.7.0/ config/ libgloss/ --- 283,288 ---- opcodes/ texinfo/ ! ./gcc-2.7.2.1/ ! ./newlib-1.7.1/ config/ libgloss/ *************** A script exists to reorganize the above *** 302,311 **** It assumes: - you're using a version of make that understands VPATH (e.g. GNU make) ! - ./binutils-2.6 exists ! - ./gcc-2.7.2 exists ! - ./newlib-1.7.0 exists - ./src does not exist ! The script is one-tree-1.2.sh from ftp.cygnus.com:/pub/embedded/crossgcc. It will create a subdirectory called `src'. --- 320,329 ---- It assumes: - you're using a version of make that understands VPATH (e.g. GNU make) ! - ./binutils-2.7 exists ! - ./gcc-2.7.2.1 exists ! - ./newlib-1.7.1 exists - ./src does not exist ! The script is one-tree-1.3.sh from ftp.cygnus.com:/pub/embedded/crossgcc. It will create a subdirectory called `src'. *************** cd ../build-gdb *** 322,330 **** make all install ! 3.3 Cygnus Releases ! What if I come across a Cygnus release? ! 3.3.1 Where are the info files? Cygnus releases differ from FSF releases in that files that are not really --- 340,368 ---- make all install ! 3.3 Can I build in a directory different from the source tree? ! Yes. ! However, it requires a version of make that understands VPATH. ! SunOS make may or may not be sufficient: it's VPATH support has problems ! which require extra effort to support and developers don't always adhere ! to the restrictions. If you don't use GNU make you're on your own ! as far as getting the build to work. ! ! 3.4 Can I use a non-GNU make? ! ! Yes. ! ! However, there are a few things to be wary of: ! ! - you must build in the source tree ! ! - testing generally isn't done with non-GNU makes so one is more likely to ! run into build problems - these problems can be fixed of course but it may ! require effort on your part ! ! 3.5 Cygnus Releases ! ! 3.5.1 Where are the info files? Cygnus releases differ from FSF releases in that files that are not really *************** files) are not included. Instead, they *** 333,337 **** toolchain. ! 3.3.2 How do I build a Cygnus release? Cygnus releases are essentially the "one-pass installation" tree, except --- 371,375 ---- toolchain. ! 3.5.2 How do I build a Cygnus release? Cygnus releases are essentially the "one-pass installation" tree, except *************** upon a Cygnus release, here is a quick i *** 345,354 **** Suppose you happen upon a Cygnus release and want to build a ! sparc-sun-solaris2 cross sparc64-elf compiler. Do this: src=/path/to/source/tree rel=/path/to/install/tree host=sparc-sun-solaris2 ! target=sparc64-elf mkdir build cd build --- 383,392 ---- Suppose you happen upon a Cygnus release and want to build a ! sparc-sun-solaris2 cross h8300-hms compiler. Do this: src=/path/to/source/tree rel=/path/to/install/tree host=sparc-sun-solaris2 ! target=h8300-hms mkdir build cd build *************** make -k check *** 362,369 **** The gcc and g++ execute tests won't do much in this particular example ! (sparc64-elf doesn't really exist yet, the configuration for UltraSPARC's ! running Solaris 2.5 is sparc-sun-solaris2, duh ... :-) ! 3.4 Win32 hosted cross-compilers There is work in progress that will let the GNU tools be used as a native --- 400,407 ---- The gcc and g++ execute tests won't do much in this particular example ! unless dejagnu has been configured to use the simulator or target board ! for the execute tests. ! 3.6 Win32 hosted cross-compilers There is work in progress that will let the GNU tools be used as a native *************** compiler in the win32 environment and al *** 371,375 **** hosted or win32 targeted). Join the gnu-win32@cygnus.com mailing list if you wish to help out. The release is kept in ! ftp://ftp.cygnus.com/pub/sac/win32. The configuration for this project is i386-cygwin32. --- 409,413 ---- hosted or win32 targeted). Join the gnu-win32@cygnus.com mailing list if you wish to help out. The release is kept in ! ftp://ftp.cygnus.com/pub/gnu-win32. The configuration for this project is i386-cygwin32. *************** with a body of 1 line containing "subscr *** 379,389 **** and nothing else (and no <>'s around your email address). ! 3.5 MSDOS hosted cross-compilers ! The primary MSDOS port is `djgpp', a port of the GNU tools to MSDOS by ! DJ Delorie, using `go32', a 32 bit extender. See the djgpp FAQ for more details (http://www.delorie.com/djgpp/faq/). ! 3.5.1 How do I build a cross-compiler with DJGPP? The procedure is basically this. --- 417,427 ---- and nothing else (and no <>'s around your email address). ! 3.7 MSDOS hosted cross-compilers ! The primary MSDOS port is version 1 of `djgpp', a port of the GNU tools to ! MSDOS by DJ Delorie, using `go32', a 32 bit extender. See the djgpp FAQ for more details (http://www.delorie.com/djgpp/faq/). ! 3.7.1 How do I build a cross-compiler with DJGPP? The procedure is basically this. *************** The procedure is basically this. *** 402,408 **** * Run make. ! 3.6 Canadian Crosses ! 3.6.1 What is a Canadian Cross? One cool thing about the GNU tools is that they support building a cross --- 440,446 ---- * Run make. ! 3.8 Canadian Crosses ! 3.8.1 What is a Canadian Cross? One cool thing about the GNU tools is that they support building a cross *************** parties now so the name is a bit dated, *** 415,419 **** example, one to build an MSDOS hosted cross-compiler on a Unix box. ! 3.6.2 How do I build an MSDOS hosted cross compiler without using MSDOS? Suppose one wanted to build an MSDOS cross m68k-coff cross --- 453,457 ---- example, one to build an MSDOS hosted cross-compiler on a Unix box. ! 3.8.2 How do I build an MSDOS hosted cross compiler without using MSDOS? Suppose one wanted to build an MSDOS cross m68k-coff cross *************** to build the m68k-coff libraries. But i *** 432,440 **** a sunos4 native compiler. That's two. We also need a sunos4 cross i386-go32 compiler to build the programs that run on MSDOS (go32 is the ! name of a 32 bit extender written by DJ Delorie that all the MSDOS tools will use). Finally, we need an i386-go32 cross m68k-coff compiler: our final goal. Four compilers. However, the process is quite straightforward once you understand all the pieces that are needed. Assume the source tree has been created with the "one-tree" script. The following is the list of steps, written so that it can be copied --- 470,481 ---- a sunos4 native compiler. That's two. We also need a sunos4 cross i386-go32 compiler to build the programs that run on MSDOS (go32 is the ! name of a 32 bit extender (*) written by DJ Delorie that all the MSDOS tools will use). Finally, we need an i386-go32 cross m68k-coff compiler: our final goal. Four compilers. However, the process is quite straightforward once you understand all the pieces that are needed. + (*) The 32 bit extender is no longer required with recent versions of go32. + However, newlib has not been updated. + Assume the source tree has been created with the "one-tree" script. The following is the list of steps, written so that it can be copied *************** into a shell script and run. *** 442,463 **** #!/bin/sh ! # This script is from crossgcc FAQ-0.7. # Before using this script it is a good idea to check with the most recent # version of the FAQ to see if any changes have been made. The FAQ can be # obtained from ftp://ftp.cygnus.com/pub/embedded/crossgcc/FAQ. # # Note: This script provides support for cygwin32 hosts (the configuration # of the gnu-win32 project), but current FSF releases of GCC,Binutils do not # support cygwin32. The support is present in case you pick up a copy of # the cygwin32 source tree. ! # Create some variables that will be useful. ! build=sparc-sun-sunos4.1.3 host=i386-go32 target=m68k-coff - here=`pwd` - # `src' is presumed to have been built with the "one-tree" script. src=$here/src ! rel=/bar # Install the toolchain in /bar again. # Build directory for the $build cross $host toolchain. --- 483,548 ---- #!/bin/sh ! # This script is build-3way.sh from crossgcc FAQ-0.8. # Before using this script it is a good idea to check with the most recent # version of the FAQ to see if any changes have been made. The FAQ can be # obtained from ftp://ftp.cygnus.com/pub/embedded/crossgcc/FAQ. # + # This patch assumes: + # - the source tree contains binutils, gcc, and newlib build with the + # one-tree script + # - that crossgcc-gcc-2.x.y.patch has been applied + # # Note: This script provides support for cygwin32 hosts (the configuration # of the gnu-win32 project), but current FSF releases of GCC,Binutils do not # support cygwin32. The support is present in case you pick up a copy of # the cygwin32 source tree. + # + # Syntax: sh build-3way.sh [install] + # + # The default is to configure and build, but not install. + # + # The recommended way to use this script is to modify the variables + # build,host,target,src,rel,relexec as necessary, then run: + # + # build-3way.sh + # build-3way.sh install + # + # The process is rather involved as there are a lot of steps. + # On the other hand, it is really rather straightforward. + # The goal is to build a $host cross $target toolchain. Some hosts aren't + # well suited to program development (eg: msdos) and other hosts may not have + # complete GNU support yet. Both of these cases are ideallyhandled by a + # script like this where we build everything in a more familiar and + # comfortable environment (eg: unix). + # + # The toolchain we are building is composed of basically two pieces: + # + # 1) programs that run in the host environment. + # These include gcc, cpp, cc1, as, ld, objdump, etc. These critters + # are built with a $build cross $host cross-compiler. + # + # 2) libraries of functions that run in the target environment. + # These include libgcc.a, libc.a, libm.a, etc. These critters are + # built with a $build cross $target cross-compiler. + # + # We end up building 3 complete toolchains: $build cross $host, + # $build cross $target, and ultimately $host cross $target. + # Remember, the only environment in which we can run programs is $build: + # that is the reason for the complexity. + # + # The cool thing is that this can be done at all! ! set -e ! ! here=`pwd` ! ! action=$1 ! ! build=sparc-sun-solaris2 host=i386-go32 target=m68k-coff src=$here/src ! rel=/tmp/test ! relexec=$rel/H-${host} # Build directory for the $build cross $host toolchain. *************** b2t=$here/b-${build}-x-${target} *** 468,491 **** h2t=$here/b-${host}-x-${target} ! # The first step is to build a sunos4 cross go32 cross-compiler. ! # The value for --prefix we give here is /tmp/junk as we don't intend ! # to install this toolchain. ! [ -d $b2h ] || mkdir $b2h ! (cd $b2h ; CC=gcc $src/configure --host=${build} --target=${host} --prefix=/tmp/junk -v) ! [ $? = 0 ] || exit 1 ! (cd $b2h ; make all-gcc all-target-newlib CC=gcc CFLAGS=-g) ! [ $? = 0 ] || exit 1 # Now build a $build cross $target toolchain. # The value for --prefix we give here is /tmp/junk as we don't intend # to install this toolchain. ! [ -d $b2t ] || mkdir $b2t ! (cd $b2t ; CC=gcc $src/configure --host=${build} --target=${target} --prefix=/tmp/junk -v) ! [ $? = 0 ] || exit 1 ! (cd $b2t ; make all CC=gcc CFLAGS=-g) ! [ $? = 0 ] || exit 1 # Now that we've built the tools that we need, we can finally build # our $host cross $target toolchain. --- 553,594 ---- h2t=$here/b-${host}-x-${target} ! ###################################################################### ! # ! # The first step is to build a $build cross $host cross-compiler. ! if [ ! -f $b2h/configure.done ] ; then ! [ -d $b2h ] || mkdir $b2h ! (cd $b2h ; CC=gcc $src/configure --host=${build} --target=${host} --prefix=/tmp/junk -v) ! touch $b2h/configure.done ! fi ! # For cygwin32 so mount,umount get built. ! ( ! cd $b2h/gcc ! rm -f crt0.o libc.a libg.a libm.a libcygwin.a libkernel32.a ! ln -s ../${host}/newlib/crt0.o . ! ln -s ../${host}/newlib/libc.a . ! ln -s ../${host}/newlib/libg.a . ! ln -s ../${host}/newlib/libm.a . ! ln -s ../${host}/winsup/libcygwin.a . ! ln -s ../${host}/winsup/libkernel32.a . ! ) ! (cd $b2h ; make -w all-target-newlib all-target-winsup CC=gcc) + ###################################################################### + # # Now build a $build cross $target toolchain. # The value for --prefix we give here is /tmp/junk as we don't intend # to install this toolchain. ! if [ ! -f $b2t/configure.done ] ; then ! [ -d $b2t ] || mkdir $b2t ! (cd $b2t ; CC=gcc $src/configure --host=${build} --target=${target} --prefix=/tmp/junk -v) ! touch $b2t/configure.done ! fi ! #(cd $b2t ; make -w all-gcc all-target-newlib CC=gcc CFLAGS=-g) ! (cd $b2t ; make -w all-gcc CC=gcc CFLAGS=-g) + ###################################################################### + # # Now that we've built the tools that we need, we can finally build # our $host cross $target toolchain. *************** h2t=$here/b-${host}-x-${target} *** 494,512 **** # we can't use -B../newlib/. This works around that. The alternative # is to install the $build cross $host toolchain and use that. - # libcygwin.a and libkernel32.a are only needed by cygwin32 hosted toolchains. ( cd $b2h/gcc ! rm -f crt0.o libc.a libm.a ln -s ../${host}/newlib/crt0.o . ln -s ../${host}/newlib/libc.a . ln -s ../${host}/newlib/libm.a . ! case $host in ! *cygwin32*) ! rm -f libcygwin.a libkernel32.a ! ln -s ../${host}/winsup/libcygwin.a . ! ln -s ../${host}/winsup/libkernel32.a . ! ;; ! esac ) --- 597,610 ---- # we can't use -B../newlib/. This works around that. The alternative # is to install the $build cross $host toolchain and use that. ( cd $b2h/gcc ! rm -f crt0.o libc.a libg.a libm.a libcygwin.a libkernel32.a ln -s ../${host}/newlib/crt0.o . ln -s ../${host}/newlib/libc.a . + ln -s ../${host}/newlib/libg.a . ln -s ../${host}/newlib/libm.a . ! ln -s ../${host}/winsup/libcygwin.a . ! ln -s ../${host}/winsup/libkernel32.a . ) *************** CXX_FOR_BUILD=gcc *** 519,533 **** # These are for building programs and libraries that run on $host. ! case $host in ! *cygwin32*) ! CC="$b2h/gcc/xgcc -B$b2h/gcc/ -isystem $src/winsup/include -isystem $b2h/${host}/newlib/targ-include -isystem $src/newlib/libc/include" ;; ! *) ! CC="$b2h/gcc/xgcc -B$b2h/gcc/ -isystem $b2h/${host}/newlib/targ-include -isystem $src/newlib/libc/include" ;; ! esac AR=$b2h/binutils/ar RANLIB=$b2h/binutils/ranlib # These are for building libraries that run on $target. ! CC_FOR_TARGET="$b2t/gcc/xgcc -B$b2t/gcc/ -isystem $b2t/${target}/newlib/targ-include -isystem $src/newlib/libc/include" GCC_FOR_TARGET="$CC_FOR_TARGET" CC_FOR_TARGET="$CC_FOR_TARGET" --- 617,626 ---- # These are for building programs and libraries that run on $host. ! CC="$b2h/gcc/xgcc -B$b2h/gcc/ -isystem $src/winsup/include -isystem $b2h/${host}/newlib/targ-include -isystem $src/newlib/libc/include" AR=$b2h/binutils/ar RANLIB=$b2h/binutils/ranlib # These are for building libraries that run on $target. ! CC_FOR_TARGET="$b2t/gcc/xgcc -B$b2t/gcc/ -isystem $src/winsup/include -isystem $b2t/${target}/newlib/targ-include -isystem $src/newlib/libc/include" GCC_FOR_TARGET="$CC_FOR_TARGET" CC_FOR_TARGET="$CC_FOR_TARGET" *************** AR_FOR_TARGET=$b2t/binutils/ar *** 538,560 **** NM_FOR_TARGET=$b2t/binutils/nm.new RANLIB_FOR_TARGET=$b2t/binutils/ranlib ! # $DLLTOOL_FOR_TARGET is only needed for cygwin32 hosted systems, but # it doesn't hurt to always pass it. DLLTOOL_FOR_TARGET=$b2t/binutils/dlltool ! # Don't add -g here if hosting on i386-go32 and don't comment this out ! # (that will cause -g to be used). ! # There's a fixed size to the line number table (or something like that). CFLAGS=-O # Ready. Configure and build. ! [ -d $h2t ] || mkdir $h2t ! ! (cd $h2t ; CC="$CC" AR="$AR" RANLIB="$RANLIB" $src/configure --build=${build} --host=${host} --target=${target} --prefix=$rel -v) ! [ $? = 0 ] || exit 1 cd $h2t ! make all \ CC_FOR_BUILD="$CC_FOR_BUILD" \ CXX_FOR_BUILD="$CXX_FOR_BUILD" \ --- 631,660 ---- NM_FOR_TARGET=$b2t/binutils/nm.new RANLIB_FOR_TARGET=$b2t/binutils/ranlib ! # $DLLTOOL_FOR_TARGET is only needed for win32 hosted systems, but # it doesn't hurt to always pass it. DLLTOOL_FOR_TARGET=$b2t/binutils/dlltool + #BISON=$b2h/byacc/byacc ! # For go32 cannot use -g because it can overflow coff debug info tables. CFLAGS=-O + CXXFLAGS=-O # Ready. Configure and build. ! if [ ! -f $h2t/configure.done ] ; then ! [ -d $h2t ] || mkdir $h2t ! (cd $h2t ; CC="$CC" AR="$AR" RANLIB="$RANLIB" $src/configure --build=${build} --host=${host} --target=${target} --prefix=$rel --exec-prefix=$relexec -v) ! touch $h2t/configure.done ! fi cd $h2t ! # `info' already made for FSF releases. ! #maketargets="all info" ! maketargets=all ! ! make -w ${maketargets} \ ! CFLAGS="$CFLAGS" \ ! CXXFLAGS="$CXXFLAGS" \ CC_FOR_BUILD="$CC_FOR_BUILD" \ CXX_FOR_BUILD="$CXX_FOR_BUILD" \ *************** make all \ *** 565,596 **** CC_FOR_TARGET="$CC_FOR_TARGET" \ CXX_FOR_TARGET="$CC_FOR_TARGET" \ ! AS_FOR_TARGET="$AS_FOR_TARGET" \ ! LD_FOR_TARGET="$LD_FOR_TARGET" \ ! AR_FOR_TARGET="$AR_FOR_TARGET" \ ! NM_FOR_TARGET="$NM_FOR_TARGET" \ ! RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" \ DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" ! [ $? = 0 ] || exit 1 ! # All we have to do now is install it. ! # This piece is separated from the previous make as sometimes ! # one wants to install things differently. ! ! #make install \ ! # CC_FOR_BUILD="$CC_FOR_BUILD" \ ! # CXX_FOR_BUILD="$CXX_FOR_BUILD" \ ! # CC="$CC" \ ! # AR="$AR" \ ! # RANLIB="$RANLIB" \ ! # GCC_FOR_TARGET="$CC_FOR_TARGET" \ ! # CC_FOR_TARGET="$CC_FOR_TARGET" \ ! # CXX_FOR_TARGET="$CC_FOR_TARGET" \ ! # AS_FOR_TARGET="$AS_FOR_TARGET" \ ! # LD_FOR_TARGET="$LD_FOR_TARGET" \ ! # AR_FOR_TARGET="$AR_FOR_TARGET" \ ! # NM_FOR_TARGET="$NM_FOR_TARGET" \ ! # RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" \ ! # DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Almost done. Before the toolchain is usable we need to --- 665,701 ---- CC_FOR_TARGET="$CC_FOR_TARGET" \ CXX_FOR_TARGET="$CC_FOR_TARGET" \ ! AS_FOR_TARGET=$AS_FOR_TARGET \ ! LD_FOR_TARGET=$LD_FOR_TARGET \ ! AR_FOR_TARGET=$AR_FOR_TARGET \ ! NM_FOR_TARGET=$NM_FOR_TARGET \ ! RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET \ DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" ! # All done, install if asked to. ! if [ x"$action" = xinstall ] ; then ! make -w install install-info \ ! CFLAGS="$CFLAGS" \ ! CXXFLAGS="$CXXFLAGS" \ ! CC_FOR_BUILD="$CC_FOR_BUILD" \ ! CXX_FOR_BUILD="$CXX_FOR_BUILD" \ ! CC="$CC" \ ! AR="$AR" \ ! RANLIB="$RANLIB" \ ! GCC_FOR_TARGET="$CC_FOR_TARGET" \ ! CC_FOR_TARGET="$CC_FOR_TARGET" \ ! CXX_FOR_TARGET="$CC_FOR_TARGET" \ ! AS_FOR_TARGET=$AS_FOR_TARGET \ ! LD_FOR_TARGET=$LD_FOR_TARGET \ ! AR_FOR_TARGET=$AR_FOR_TARGET \ ! NM_FOR_TARGET=$NM_FOR_TARGET \ ! RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET \ ! DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" ! ! # Install cygwin.dll [if built]. ! if [ -f $b2h/$host/winsup/new-cygwin.dll ] ; then ! cp $b2h/$host/winsup/new-cygwin.dll $relexec/bin/cygwin.dll ! fi ! fi # Almost done. Before the toolchain is usable we need to *************** of tools to do this. It works on the "i *** 611,615 **** procedure and produces a tar/zip'able tree that is ready to install and use. ! FIXME: procedure for using dosrel-1.0 missing. Once the tree is built and installed in MSDOS, you need to set several --- 716,736 ---- procedure and produces a tar/zip'able tree that is ready to install and use. ! Modify the steps in dosrel-1.0/README as follows: ! ! 1) Build and install the DOS hosted cross-compiler using the Canadian-Cross ! method. ! ! 2) Configure this directory the same way you configured the DOS cross-compiler. ! We build in the source directory here. The argument to --exec-prefix ! violates DOS's 8.3 rules but the violation is harmless. ! eg: /path/to/binutils-2.7/configure --srcdir=. \ ! --build=$build host=i386-go32 --target=$target \ ! --prefix=$prefix --exec-prefix=$prefix/H-i386-go32 -v ! ! 3) Run "make dos-tree GO32_STRIP=/path/to/b-sparc-sun-solaris2-x-i386-go32/binutils/strip.new". ! ! 4) Subdirectory `dos-tree' is now ready to copy over to DOS and use. ! You will need to edit `set-env.bat' in the `bin' directory to tell GCC ! and the various pieces where you installed them. Once the tree is built and installed in MSDOS, you need to set several *************** The latest version of djgpp doesn't requ *** 634,638 **** toolchain (binutils (?)) and the Newlib library haven't been updated yet. ! 3.7 Disk space requirements How much disk space is required? --- 755,759 ---- toolchain (binutils (?)) and the Newlib library haven't been updated yet. ! 3.9 Disk space requirements How much disk space is required? *************** to be installed by running `gcc --print- *** 662,666 **** like this: ! install: /calvin/dje/rel/H-sparc-sun-solaris2/lib/gcc-lib/sparc-sun-solaris2/2.7.2/ programs: [... omitted ...] libraries: [... omitted ...] --- 783,787 ---- like this: ! install: /calvin/dje/rel/H-sparc-sun-solaris2/lib/gcc-lib/sparc-sun-solaris2/2.7.2.1/ programs: [... omitted ...] libraries: [... omitted ...] *************** The `install' line tells you where GCC w *** 671,675 **** 2) Set the environment variable GCC_EXEC_PREFIX to the directory where you installed GCC. For example, if you installed GCC in /home/gcc [and file ! cc1 lives in /home/gcc/lib/gcc-lib/$target/2.7.2 where $target is the --target argument that was passed to configure], then set GCC_EXEC_PREFIX to /home/gcc/lib/gcc-lib/. The trailing '/' is important! --- 792,796 ---- 2) Set the environment variable GCC_EXEC_PREFIX to the directory where you installed GCC. For example, if you installed GCC in /home/gcc [and file ! cc1 lives in /home/gcc/lib/gcc-lib/$target/2.7.2.1 where $target is the --target argument that was passed to configure], then set GCC_EXEC_PREFIX to /home/gcc/lib/gcc-lib/. The trailing '/' is important! *************** libgcc.a is a library internal to GCC. *** 780,786 **** (for example, say, 32 bit integer multiply) - software floating point support for chips that don't have hardware ! floating point routines (see 5.3). - other routines needed to implement language functionality that GCC ! doesn't emit inline code for. 5.2 How do I force GCC to emit inline code for memcpy? --- 901,907 ---- (for example, say, 32 bit integer multiply) - software floating point support for chips that don't have hardware ! floating point routines (see 5.3) - other routines needed to implement language functionality that GCC ! doesn't emit inline code for 5.2 How do I force GCC to emit inline code for memcpy? *************** Newlib, being intended for embedded syst *** 818,823 **** (and is more memory-efficient than glibc). - (FIXME: Need to say more here.) - 5.4 What if I need software floating point support? --- 939,942 ---- *************** in a library compiled for the m68020. A *** 844,850 **** Yes. Depending upon the target, there should be --enable options to ! allow you to select which libraries you want to build. ! ! m68k: FIXME: unfinished 6. Using GDB for Remote Debugging --- 963,970 ---- Yes. Depending upon the target, there should be --enable options to ! allow you to select which libraries you want to build. This varies ! over time so listing them here might not be useful. The best way ! to find out is to study the config-ml.in script at the top of the ! newlib source tree. 6. Using GDB for Remote Debugging *************** the targets that it supports. That is t *** 854,859 **** If you have `info' and the gdb `info' files installed you can run "info -f gdb.info -n Remote" to view the relevant section. - - FIXME: Should still have a list of frequently asked questions. 7. S Records, etc. --- 974,977 ---- *************** objcopy can be used to convert an existi *** 874,886 **** Use --output-target=srec. - FIXME: Need someone to finish this section. - 7.2 How do I use the linker to generate S Records? ! FIXME: Need someone to write this section. 8. Target Specific Info ! FIXME: Unfinished. 9. Operating systems for embedded systems --- 992,1028 ---- Use --output-target=srec. 7.2 How do I use the linker to generate S Records? ! Pass -oformat=srec to GLD. 8. Target Specific Info ! 8.1 What embedded targets are supported? ! ! Here is a partial list. ! ! They are named by the argument one would use with the --target= option ! of `configure'. ! ! a29k-amd-udi ! arm-aout ! arm-coff ! h8300-hms ! hppa1.1-hp-proelf ! i386-aout ! i386-coff ! i386-elf ! i960-coff ! m68k-aout ! m68k-coff ! mips-ecoff ! mips-elf ! mips64-elf ! powerpc-eabi ! sh-hms ! sparc-aout ! sparclite-aout ! sparclite-coff ! sparc64-elf 9. Operating systems for embedded systems *************** with the software to find out how to rep *** 953,959 **** right to the page you need to read for GCC. ! Failing that, please include the following information: ! - version number (e.g. gcc-2.7.2) - configuration (the arguments you passed to `configure') - (in the case of gas, gcc, glibc, and newlib) preprocessed source that triggers the bug. Preprocessed source can either be obtained by passing --- 1095,1104 ---- right to the page you need to read for GCC. ! Failing that, always include the following information: ! - version number (e.g. gcc-2.7.2.1) - configuration (the arguments you passed to `configure') + - type of system you are compiling on (e.g. i386-linux, sparc-solaris2), + ideally this is the result of the `config.guess' program that is included + in the source tree - (in the case of gas, gcc, glibc, and newlib) preprocessed source that triggers the bug. Preprocessed source can either be obtained by passing *************** Failing that, please include the followi *** 963,966 **** --- 1108,1113 ---- say "GCC can't compile file foo.c from program Bar version 4.2". - complete list of options passed to the program (e.g. gcc -g -O2 ...). + - the text of the error message [as output by the program, do not edit it + for brevity] 10.4 Other mailing lists, web sites, newsgroups, etc. *************** miscellaneous newsgroups *** 983,987 **** FIXME: Others? ! 11. Contributors. The following people have contributed to this FAQ. Thanks! --- 1130,1170 ---- FIXME: Others? ! 11. Glossary ! ! Canadian Cross ! ! This is a cross compiler where build machine != host machine. ! See section 3.6 for more information. ! ! cross compiler ! ! This is a compiler that builds programs for a machine different ! than the one the compiler is run on. For example, an i386-linux ! cross m68k-coff compiler is one where GCC runs on an i386-linux ! machine and compiles programs for running on m68k-coff machines. ! ! build machine ! ! This is the machine the toolchain is being built on. ! In the case of a Canadian Cross, it is not the same as the ! host machine. ! ! host machine ! ! This is the machine the toolchain programs (GCC, GAS, etc.) ! will run on. In the case of a cross compiler, this is not the ! same as the target machine. ! ! native compiler ! ! This is a compiler where host == target. ! ! target machine ! ! This is the machine the toolchain builds programs for. ! ! FIXME: Others? ! ! 12. Contributors. The following people have contributed to this FAQ. Thanks!