Developing under linux

mrkotfw

Mid Boss
blush.gif
hey i switched to linux, is it possible to code under it? i think i can use the *.exe under wine but how about the SH compiler? im asking is there a tutorial on how to install it but still keep the old compiler? the stuff is under /usr/bin .... im not sure, i dont want to mess up my stuff.... so can you guys help me out trying to get a nice enviroment to dev on? thanks guys i kinda wanna enter the contest oh and the people who coded something already... GREAT FUCKING JOB. im extremely amazed.
cool.gif
but watch out i'll try to code a real mean Demo :devil
 
If you mean the Sega-provided compiler, install it in a separate directory (eg. ~/nescphp/sega/) and set up your path so it is seen before the system compiler.

If you want to use the GNUSH compiler (there is a native Red Hat version) or build your own, it uses the prefix naming convention (eg. sh-elf-gcc) so there's no conflict. Of course, it could/should still be installed into a separate location, to reduce the mess.
 
ok, thanks man... also. i use redhat and also what do you mean setup my path? also... where can i get the latest build for sh-elf-gcc because i dont have this and i did choose 'everything' on the install so it can install everything. thanks please respond ASAP
 
If you choose to install the compiler to directory /foo/bar, then when you open a terminal for compiling you should set the path to /foo/bar/bin:$path (the exact syntax depends on the shell you're using). You can write a small script that does this and does whatever other initialisation you want.

You can get the GNUSH toolchain from www.gnush.com.
 
IIRC the Sega-provided compiler (or libs) came with a batch file that set up some required environment variables, did you remember to set them up? (Note that the example I gave doesn't necessarily correspond to the actual directory structure.)
 
could you maybe log onto IRC? my nick is piratero on EFNET

well some people told me but i still dont get it...

/me has a hard head
 
hey i switched to linux, is it possible to code under it?

Yes. In fact, you're now arguably using the main development target for the GNU toolchain, so things are likely to work a bit faster/better than on Windows

If you want to use SGL, you'll need to run the include files (and possibly the linker scripts, makefiles, and a few other misc bits; been a while since I've tried it) through a program like "dos2unix" (there's a good chance that you already have this program) to get rid of the DOS cruft. I'm thinking I might try to do this and produce a tarball with everything corrected, because you're certainly not the first person to need to do it, and probably won't be the last. antime, would you be willing to host this on your site if I manage to get it working?

i dont have this and i did choose 'everything' on the install so it can install everything

"Everything" means everything that your install CD set has packages for. Cross compilers aren't a general interest item, aside from the fact that there are tens (if not hundreds) of possible variations.
 
Yeah, I should have enough disk quota left to host it.

By the by, the Sega compiler is DOS software (using an extender), so Wine may not help if you're still trying to go that route.
 
The .tar.bz2 of the work in progress on my disk now is a little less than 8MB. If disk space is a problem I could produce a stripped down archive (just getting rid of the precompiled sample binaries cuts it down by about 3MB, and that's even without going in and getting rid of the .o files) and/or write a script to convert the standard one, the modifications needed aren't as bad as I thought (AFAICT, haven't been able to test the produced binary but there are no longer any build errors) and I'm using unmodified library files, so it would probably be a waste to duplicate everything...

edit: cleaned out the .o files, now it's down to about 2.7MB
 
Well, it's not quite done yet, but I think (hope? still don't have commslink so I can't test without burning a CD, which will have to wait until tomorrow) the worst is over (error messages like "file format is ambiguous" tend to get a guy's spirits down). I'd like to get it to where all the samples can be compiled as well...

update: pretty much finished, going to see if I can get someone who can run an emulator to test binaries in a bit. The build system for ip.bin is pretty hairy, so I haven't got it working, but I don't think it's worth it to delay putting together the package with the contest deadline looming and all...
 
Tried a produced binary on a Saturn, didn't work.
sad.gif


Still not giving up, but it's hard to say how long it will take now.

update: was just a stupid error in my linker script tweaks. Akira is walking around my TV screen as I type this.
biggrin.gif


Cleanup and release soon I guess.
 
Whoever has the KPIT SuperH toolchain, what are the names of the program files? Is it just sh-coff-gcc, sh-coff-as, sh-coff-ld etc, or have they used other names?

edit: also, what are the versions of the programs (I'm mainly interested in GCC and ld versions, but whatever else you feel like posting is fine
smile.gif
)
 
Code:
2002/09/20 16:18      628,174 cygtcl83.dll

2002/09/20 16:18      23,859 cygtclpip83.dll

2002/09/20 16:18      205,312 cygtix4183.dll

2002/09/20 16:18      924,904 cygtk83.dll

2002/09/20 15:42      769,352 cygwin1.dll

2002/09/18 12:24      304,240 sh-coff-addr2line.exe

2002/09/18 12:24      272,549 sh-coff-ar.exe

2002/09/18 12:24      435,466 sh-coff-as.exe

2002/09/18 13:21      123,197 sh-coff-c++.exe

2002/09/18 13:21      99,500 sh-coff-c++filt.exe

2002/09/18 13:22      123,231 sh-coff-cpp.exe

2002/09/18 13:21      123,197 sh-coff-g++.exe

2002/09/18 13:22      121,661 sh-coff-gcc.exe

2002/09/18 13:21      15,665 sh-coff-gccbug

2002/09/18 13:21      58,500 sh-coff-gcov.exe

2002/09/20 16:18     2,344,382 sh-coff-gdb.exe

2002/09/18 12:24      377,271 sh-coff-gprof.exe

2002/09/18 12:24      453,315 sh-coff-ld.exe

2002/09/18 12:24      316,256 sh-coff-nm.exe

2002/09/18 12:24      449,204 sh-coff-objcopy.exe

2002/09/18 12:24      473,476 sh-coff-objdump.exe

2002/09/18 13:21      76,600 sh-coff-protoize.exe

2002/09/18 12:24      272,549 sh-coff-ranlib.exe

2002/09/18 12:24      229,046 sh-coff-readelf.exe

2002/09/20 16:18      351,119 sh-coff-run.exe

2002/09/18 12:24      251,752 sh-coff-size.exe

2002/09/18 12:24      251,663 sh-coff-strings.exe

2002/09/18 12:24      449,204 sh-coff-strip.exe

2002/09/18 13:21      70,549 sh-coff-unprotoize.exe

2002/09/20 16:18      25,783 tclsh83.exe

2002/09/20 16:18      36,306 tix4183.exe

2002/09/20 16:18       2,121 tixindex

2002/09/20 16:18      67,506 wish83.exe

All remaining files use normal nomenclature.

KPIT's has his compiller rebuilt with all major GCC releases, up to the v3 one a month or so ago, altough mine's is still the GNUSH_v0204 release for gcc and ld.
 
Thanks. The reason I ask is that, oddly enough, I'm using an sh-elf toolchain (the one I built for Dreamcast stuff, in fact) without problems and wanted to provide KPIT-compatible definitions in the Makefile since that seems to be the easiest way for most people to get a SuperH cross compiler...

KPIT's has his compiller rebuilt with all major GCC releases, up to the v3 one a month or so ago, altough mine's is still the GNUSH_v0204 release for gcc and ld.

What releases of GCC and binutils do these correspond to? I'm currently using GCC 3.0.4 and binutils 2.11.2 at the moment, for what it's worth...
 
Okay, the "fixed" SGL distribution is available on antime's site in the "Compilers, Libs, and Tools" section. I'd appreciate any feedback on how this works for people, especially those using GCC 2.x.x, 3.2.x, or prereleases. In theory this should work on Windows as well as on Unix/Linux systems, so I'd like to know if that is indeed the case.

What's changed:

- Eliminated precompiled object files for samples (except the sample ip.bin, which can't currently be built without the DOS/Windows-specific SuperH assembly translation system "GASP") for huge space/bandwidth savings.

- Moved all configuration for samples to the top-level Makefile.template; define your compiler/path here once instead of editing the Makefile for each sample.

- Ran all important sources/headers through a DOS->UNIX text conversion program to eliminate errors like "stray /032 in program".

- Fixed a bug in one of the samples that resulted in lib/sglarea.o being deleted during the clean process.
 
Back
Top