sh-elf-g++

Heya,

I had been using an old tutorial to get my DC Dev setup created when I found the tutorial at http://www.hangar-eleven.de. I went through the entire process as layed out by the tutorial and was met with no errors. When I went to compile KOS I ran into issues of sh-elf-g++ not being found. I had compiled per the instructions for the C++ support so just assumed that this binary would have been created. Is there anything special I need to do to get this binary created in reference to the instructions at http://www.hangar-eleven.de (specifically here: http://www.hangar-eleven.de/en/devdc-gcc-sh4-xgcc.html).

I checked the flags on my sh-elf-gcc and noted I had the ability to compile c++:

./sh-elf-gcc -v

Configured with: ../gcc-3.0.4/configure --target=sh-elf --prefix=/usr/local/ --w

ithout-headers --with-newlib --enable-languages=c : (reconfigured) ../gcc-3.0.4/

configure --target=sh-elf --prefix=/usr/local/ --without-headers --with-newlib -

-enable-languages=c,c++

Thread model: single

gcc version 3.0.4

So in KOS I tried setting sh-elf-gcc as the compiler for the portions of the KOS source that need it and had the following error:

make[1]: Entering directory `/kos/libk++'

/usr/local//bin/sh-elf-gcc -Wall -g -ml -m4-single-only -O2 -fno-builtin -fno-st

rict-aliasing -fomit-frame-pointer -fno-optimize-sibling-calls -D_arch_dreamcas

t -fno-operator-names -fno-rtti -fno-exceptions -I/kos/include -I/kos/libc/inclu

de -I/kos/kernel/arch/dreamcast/include -I/kos/addons/include -c mem.cc -o mem.o

sh-elf-gcc: mem.cc: C++ compiler not installed on this system

make[1]: *** [mem.o] Error 1

make[1]: Leaving directory `/kos/libk++'

make: *** [build-libk++] Error 2

Any ideas/tips? I'm going to try to start with a clean structure and just do a --enable-languages=c++ to see if it will just create this binary, but I have a feeling that it won't do exactly as needed.
 
g++ just calls gcc with certain options implied for C++ support. If your "sh-elf-gcc" won't compile C++ code, something was wrong with your final build/install of GCC.
 
Thanks for the note m8. Yeah, I found that I needed to add some flags here and there to get the file seperate. Cygwin started being a big buggy/resource hoggy so I'm currently investigating some other environments. Just a note (I'll add it to my links post), anyone looking to quickly get going with DC Development might check this post at DCEmu's forums: http://www.dcemulation.com/phpBB/viewtopic.php?t=46641.

A good quick, easy to understand tutorial with precompiled binaries all nicely packaged with instructions on getting going with Dev-C++ for Windows.
 
Yeah, generally I'd recommend MSYS, but the only real problem with Dev-C++ is the lack of a Bourne shell and Unix-compatible fileutils commands. It's not vital for development, but some Makefiles assume that these things are present because they're standard on Unix/Linux. You can edit them, or with some work you can probably get Win32 ports of the necessary tools integrated into Dev-C++ (it seems quite well-designed and flexible).
 
Yeah, MSYS/MinGW is what I ended up using. Seems to be going a lot smoother than Cygwin so far. There are several nice toolchain build scripts for KOS/gcc/newlib/binutils for this environment as well. So far I really like it.
 
Back
Top