Updating GCC

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7499
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has thanked: 4 times
Been thanked: 10 times
Contact:

Updating GCC

Post by Quzar »

Can someone please help me? Im on a winbox running cygwin and the version of GCC it comes with is 3.3.1 which is supposed to have problems with sh4. Could someone show me what i need to download and how to install it so that it replaces the older version?
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
GPF
DC Developer
DC Developer
Posts: 529
Joined: Wed Oct 17, 2001 7:44 pm
Location: Texas
Has thanked: 0
Been thanked: 0
Contact:

Post by GPF »

rerun the cygwin setup and select the newer version of GCC. Or if I misunderstand your question I think you can download new version of GCC from http://gcc.gnu.org/releases.html - just choose the mirror link and select a mirror to download it from.

Troy
itoledo
DC Developer
DC Developer
Posts: 47
Joined: Tue Aug 26, 2003 1:54 pm
Location: Santiago, CL
Has thanked: 0
Been thanked: 0
Contact:

Post by itoledo »

the gcc compiler that you get with cygwin compiles for x86, not sh4. you need to build your 'own' sh4 compiler (sh4-elf-gcc) from the gcc sources. check the tutorial at http://www.hangar-eleven.de/en/devdc-index.html.
User avatar
SinisterTengu
DC Developer
DC Developer
Posts: 382
Joined: Wed Oct 17, 2001 7:44 pm
Location: Arlington, WA
Has thanked: 0
Been thanked: 0

Post by SinisterTengu »

Yeah, and actually 3.3.1 as well as 3.4.0 should work if you build them for SH4. I've had no problems with it, but apparently people on the KOS list say you should switch -fno-optimize-sibling-calls in the environ_dreamcast.sh file to -fno-crossjumping. I didn't do this and my rumble pack demo still compiled and worked fine, but I think Dan said stuff like FoF wouldn't compile unless he did switched those flags. I used gcc-3.4.0, binutils-2.14 (2.15 didn't work), and newlib-1.12.0, and followed the hangar-eleven guide (I didn't comment out that thing in errno.h though, I don't think thats needed any more because mine built fine without doing that).
Image
Image
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7499
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has thanked: 4 times
Been thanked: 10 times
Contact:

Post by Quzar »

hrm... ok well i guess im stuck with whatever i have now because i really dont understand how to update anything... even with that tut.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
q_006
Mental DCEmu
Mental DCEmu
Posts: 415
Joined: Thu Oct 10, 2002 7:18 pm
Has thanked: 0
Been thanked: 0
Contact:

Post by q_006 »

is there anyway to make GCC produce better SH-4 asm?
can it be done manually or do we have to wait for the GCC peeps to do such things?
User avatar
SinisterTengu
DC Developer
DC Developer
Posts: 382
Joined: Wed Oct 17, 2001 7:44 pm
Location: Arlington, WA
Has thanked: 0
Been thanked: 0

Post by SinisterTengu »

You could try different optimization settings, but otherwise, you'll just have to wait :?
Image
Image
Ian Micheal
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 4865
Joined: Fri Jul 11, 2003 9:56 pm
Has thanked: 2 times
Been thanked: 4 times

Post by Ian Micheal »

Try these together to get better code


-fbranch-probabilities -funroll-loops -frerun-loop-opt -fstrict-aliasing -fomit-frame-pointer -fstrength-reduce -fschedule-insns2 -freduce-all-givs -ffunction-sections -fdata-sections -mieee

Ive found this genrates about as good as you can get.
Dreamcast forever!!!
Post Reply