|
|||
|---|---|---|---|
| Home Blog News Documentation Installation Target Support Bug Database Source Repository Contact |
Building the Run Time LibrariesThe ELLCC C run time library, libecc, is based on source code from several sources. The C standard library is based on the NetBSD C library. Support for operations, such as 64 bit additions and floating point, that a target does not support directly are provided by the LLVM project's compiler-rt.Now build the libraries: [~/ellcc] main% cd
libecc/obj[~/ellcc/libecc/obj] main% make installThis will build and install libraries for all the supported processors and operating systems. The bin directory should look something like this: [~/ellcc] main% ls bin
arm-elf-as* ecc-ranlib* llvm-size* qemu-ga* arm-elf-ecc@ ecc-readelf* llvm-stub* qemu-i386* arm-linux-ecc@ ecc-size* llvm-tblgen* qemu-img* arm-netbsd-ecc@ ecc-strings* macho-dump* qemu-io* armv7-elf-ecc@ ecc-strip* microblaze-elf-as* qemu-microblaze* armv7-linux-ecc@ i386-elf-as* microblaze-elf-ecc@ qemu-mips* armv7-netbsd-ecc@ i386-elf-ecc@ microblaze-linux-ecc@ qemu-mipsel* armv7sf-elf-ecc@ i386-linux-ecc@ microblaze-netbsd-ecc@ qemu-nbd* armv7sf-linux-ecc@ i386-netbsd-ecc@ mips32r2-elf-ecc@ qemu-ppc* armv7sf-netbsd-ecc@ llc* mips32r2-linux-ecc@ qemu-ppc64* bugpoint* lli* mips32r2-netbsd-ecc@ qemu-ppc64abi32* c-index-test* llvm-ar* mips32r2sf-elf-ecc@ qemu-sparc* clang-tblgen* llvm-as* mips32r2sf-linux-ecc@ qemu-system-arm* ecc* llvm-bcanalyzer* mips32r2sf-netbsd-ecc@ qemu-system-microblaze* ecc++@ llvmc* mips-elf-as* qemu-system-mips* ecc-addr2line* llvm-config* mips-elf-ecc@ qemu-system-mipsel* ecc-ar* llvm-config-2* mips-linux-ecc@ qemu-system-ppc* ecc-as* llvm-cov* mips-netbsd-ecc@ qemu-system-ppc64* ecc-c++filt* llvm-diff* opt* qemu-system-sparc* ecc-elfedit* llvm-dis* ppc64-elf-as* qemu-system-x86_64* ecc-embedspu* llvm-dwarfdump* ppc64-elf-ecc@ qemu-x86_64* ecc-gdb* llvm-extract* ppc64-linux-ecc@ sparc-elf-as* ecc-gdbserver* llvm-ld* ppc64-netbsd-ecc@ sparc-elf-ecc@ ecc-gdbtui* llvm-link* ppc-elf-as* sparc-linux-ecc@ ecc-gprof* llvm-mc* ppc-elf-ecc@ tblgen* ecc-ld* llvm-nm* ppc-linux-ecc@ x86_64-elf-as* ecc-ld.bfd* llvm-objdump* ppc-netbsd-ecc@ x86_64-elf-ecc@ ecc-nm* llvm-prof* qemu* x86_64-linux-ecc@ ecc-objcopy* llvm-ranlib* qemu-arm* x86_64-netbsd-ecc@ ecc-objdump* llvm-rtdyld* qemu-armeb* Symbolic links have been added to ecc for every processor/operating system for which libraries have been successfully built. You can use the appropriate symbolic link to run the compiler and the appropriate include files and libraries will be used to build your programs. A Quick Sanity CheckI use the bzip2 program as an initial sanity check for all the processors. I've modified the Makefile to build bzip2 for each processor and run it under QEMU. If the make succeeds, you are in business.[~/ellcc/test] main% cd ..
[~/ellcc] main% cd test/src/bzip2-1.0.6/ [~/ellcc/test/src/bzip2-1.0.6] main% make ... [Several builds and runs of bzip2] ... If you got this far and the 'cmp's didn't complain, it looks like you're in business. To install in /usr/local/bin, /usr/local/lib, /usr/local/man and /usr/local/include, type make install To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type make install PREFIX=/xxx/yyy If you are (justifiably) paranoid and want to see what 'make install' is going to do, you can first do make -n install or make -n install PREFIX=/xxx/yyy respectively. The -n instructs make to show the commands it would execute, but not actually execute them. Instructions for use are in the preformatted manual page, in the file bzip2.txt. For more detailed documentation, read the full manual. It is available in Postscript form (manual.ps), PDF form (manual.pdf), and HTML form (manual.html). You can also do "bzip2 --help" to see some helpful information. "bzip2 -L" displays the software license. make[1]: Leaving directory `/home/rich/ellcc/test/src/bzip2-1.0.6' [~/ellcc/test/src/bzip2-1.0.6] main% A More Complete Sanity CheckI've started to add unit and regression testing to ELLCC. The tests compile and run various programs for all the ELLCC targets as well as two sanity checks. For the first sanity check, libecc and the test programs are built by gcc rather than ecc and the entire test suite is run on the gcc compiled versions. The second sanity check involves running the test suite compiled by gcc but using the normal host libraries.You can run the regression tests by going into the tests/obj directory: [~/ellcc] main% cd test/objTo run the tests, simply type: [~/ellcc/test/obj] main%
make checkYou'll get a lot of output but if the compilation and execution of each test works, the entire test run should complete without error. ...The sources for the various tests are under the test/src directory. Good luck! |
||