Upgrading the compiler in an old dkA/libnds setup

support for the ARM toolchain
Post Reply
sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Upgrading the compiler in an old dkA/libnds setup

Post by sverx » Fri Nov 21, 2014 1:24 pm

I have a very very old project that I'd like to recompile.
Since it's very old, it won't compile with current dkA/libnds, and to make it compatible would require to rewrite from scratch a lot of code, and that's a thing I would never do.
It just compiles fine with the old setup, until I try to activate LTO... in that case the linker phase fails because of this known bug, which has been fixed later. Thus I'd like to somehow replace the old compiler with the one currently shipped with dkA, keeping everything else in place.
Is it completely impossible?

WinterMute
Site Admin
Posts: 1385
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Upgrading the compiler in an old dkA/libnds setup

Post by WinterMute » Fri Nov 21, 2014 2:22 pm

Have you tried replacing the devkitARM folder in that setup with the latest one?

Might need to do something with crt files & linkscripts, not sure how much changed there. Depends how old the setup you have is I guess.
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: Upgrading the compiler in an old dkA/libnds setup

Post by sverx » Fri Nov 21, 2014 8:00 pm

It's very very old, it comes from the time libnds wasn't even supporting the FIFO system between ARM9 and ARM7 :shock:
I tried mixing up some parts of that dkA with some a little bit newer, looked like it was working, the linker didn't went into ICE... but complained something about crt0 not liking my main() anymore :x
Any hints on what I should try?

WinterMute
Site Admin
Posts: 1385
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Upgrading the compiler in an old dkA/libnds setup

Post by WinterMute » Sat Nov 29, 2014 4:12 am

Take the crt0.s and corresponding .ld files from your old devkitARM (arm-elf/lib, arm-eabi/lib or arm-none-eabi/lib, depending on how old your toolchain was) , put them in arm-none-eabi/lib in the new one then run make CRT=<name of crt0 file without the _crt0.s part> in that folder.

You might have to update the linkscripts a bit, binutils behaviour has changed in places.
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests