Skip to content

Add gcc2.96#1979

Merged
mkst merged 3 commits into
decompme:mainfrom
SBird1337:main
Jun 11, 2026
Merged

Add gcc2.96#1979
mkst merged 3 commits into
decompme:mainfrom
SBird1337:main

Conversation

@SBird1337

Copy link
Copy Markdown
Contributor

Adds backend boilerplate for GCC 2.96, depends on decompme/compilers#73 .

GCC 2.96 is a development snapshot between GCC 2.95 "agbcc" and GCC 3 which already has a unified thumb/arm compiler in one binary (-mthumb, -marm).

It was used in the game Golden Sun for the GBA.

If possible it would be nice to have a compiler flag preset for Golden Sun 1, it uses caller-save r4 to perform some arcane magic:

-O2 -mthumb -mthumb-interwork -mcpu=arm7tdmi -fcall-used-r4

Comment thread backend/coreapp/compilers.py Outdated
GCC_296 = GCCCompiler(
id = "gcc2.96",
platform=GBA,
cc='"${COMPILER_DIR}"/usr/local/bin/arm-elf-gcc $COMPILER_FLAGS -S -o - "$INPUT" | arm-none-eabi-as -mcpu=arm7tdmi -o "$OUTPUT"'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason you aren't using usr/local/bin/arm-elf-as ? wont this affect matching?

@SBird1337 SBird1337 Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it should, most GBA games use modern gnu as as the assembler. We certainly do for the gs-decomp project as building the whole toolchain is a little more involved than just getting gcc / cc1.

E: To clearify: I kinda just mirrored a) the other gba compilers, b) our own Makefile :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you guys are getting matches without needing era-specific assembler then all good - was just flagging to make sure it wasnt a mistake :)

@mkst mkst merged commit d7b3f57 into decompme:main Jun 11, 2026
7 checks passed
@mkst

mkst commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Created a preset: https://decomp.me/preset/236. I can assign you as the owner once you've created a scratch on the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants