[Coco] More optimizations for the CMOC compiler

Kip Koon computerdoc at sc.rr.com
Sun Aug 9 00:34:30 EDT 2015


Hi Pierre,
I just tried to compile CMOC and received the following messages.
___________________________________________________

root at DS1 ~/CMOC 6809 C (subset) Cross Compiler/cmoc-0.1.11
$ make
Making all in src
make[1]: Entering directory '/home/root/CMOC 6809 C (subset) Cross Compiler/cmoc-0.1.11/src'
Making all in support
make[2]: Entering directory '/home/root/CMOC 6809 C (subset) Cross Compiler/cmoc-0.1.11/src/support'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/root/CMOC 6809 C (subset) Cross Compiler/cmoc-0.1.11/src/support'
Making all in usim-0.91-cmoc
make[2]: Entering directory '/home/root/CMOC 6809 C (subset) Cross Compiler/cmoc-0.1.11/src/usim-0.91-cmoc'
g++ -DPACKAGE_NAME=\"cmoc\" -DPACKAGE_TARNAME=\"cmoc\" -DPACKAGE_VERSION=\"0.1.11\" -DPACKAGE_STRING=\"cmoc\ 0.1.11\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"cmoc\" -DVERSION=\"0.1.11\" -I.     -g -O2 -W -Wall -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cc
main.cc: In function ‘Byte getcharifavail()’:
main.cc:91:57: error: ‘select’ was not declared in this scope
  if (select(STDIN_FILENO + 1, &readset, NULL, NULL, NULL) <= 0)
                                                         ^
Makefile:244: recipe for target 'main.o' failed
make[2]: *** [main.o] Error 1
make[2]: Leaving directory '/home/root/CMOC 6809 C (subset) Cross Compiler/cmoc-0.1.11/src/usim-0.91-cmoc'
Makefile:1187: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/root/CMOC 6809 C (subset) Cross Compiler/cmoc-0.1.11/src'
Makefile:322: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
_______________________________________________________________

This is the gcc version.
________________________________________________________________

root at DS1 ~/CMOC 6809 C (subset) Cross Compiler/cmoc-0.1.11
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc_old/gcc-4.8.3-5.x86_64/src/gcc-4.8.3/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc_old/gcc-4.8.3-5.x86_64/src/gcc-4.8.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id
Thread model: posix
gcc version 4.8.3 (GCC)

root at DS1 ~/CMOC 6809 C (subset) Cross Compiler/cmoc-0.1.11
$
___________________________________________________________

What am I doing wrong?  I'm running Cygwin x64.  I want to check out your C compiler a little bit.  I'm just now learning C so I'm still in the beginner's stage.  I learned C++ years ago so C programs in general are not totally unfamiliar.  I just need to learn the parts of C that did not make it into the C++ Standard.  
Keep up the good work.  I am very interested in your project!  Finally a decent C cross-compiler that compiles to 6809 machine language!  I love it!  If there are any specific tests you would like me to do as you further develop your C Cross-Computer, just let me know.  I would like be a tester for CMOC.  You may have to "hold my hand" as I learn the language so I can do the tests like you wish though.  Thanks for writing this compiler.  I'm sure I will enjoy using it once I get over the learning curve.  :)  Take care my friend.

Kip Koon
computerdoc at sc.rr.com
http://www.cocopedia.com/wiki/index.php/Kip_Koon


> -----Original Message-----
> From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Pierre Sarrazin
> Sent: Saturday, August 08, 2015 5:29 PM
> To: coco at maltedmedia.com
> Subject: [Coco] More optimizations for the CMOC compiler
> 
> Hi folks,
> 
> I have published version 0.1.11 of CMOC, my 6809-generating
> cross-compiler for a subset of the C language:
> 
> http://sarrazip.com/dev/cmoc.html
> 
> I have added an assembly-level optimizer and improved the
> optimization of some boolean expressions, multiplications, divisions
> and modulos.
> 
> Version 0.1.9 restructured the standard library so that only the
> needed portions are included in the final assembly program. A
> program that calls no standard library function can save up to
> about 1900 bytes.
> 
> As always, I'm interested in reading about how people are using this
> compiler. It may lead me in the most useful directions to improve it.
> 
> --
> Pierre Sarrazin <sarrazip @ sarrazip . com>
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list