devkitPPC uses g++ to link?
Posted: Sat Nov 09, 2013 1:37 am
Hi, I'm wrangling my own build system, and I noticed from the devkitppc makefiles that it uses g++ to link instead of ld.
As far as I can tell, this has something to do with wanting to pass the MACHDEP options to the linker aswell... and since some of them are compiler options, I guess g++ will invoke the linker, and forward only the relevant options (while not complaining that compile options were given to ld)?
Something like that?
Anyway, what I'm wondering is, which options are required for each step?
The options given to both the compiler and linker (ie, g++ used to link) are:
-g -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
I presume -DGEKKO -mcpu=750 -meabi -mhard-float are only needed while compiling, surely they don't need to be supplied while linking?
That leaves me wondering about -g -mrvl, which of these are needed by the compile step, and by the link step?
Obviously I need -g while compiling, do I also need it when linking? And what is -mrvl? I can't find any information about it... I'm suspecting that's the magic option that is wanted by the link step... is it needed during the compile step?
TL;DR: of those options, can you separate into options that should be given while compiling, and which should be given while linking?
As far as I can tell, this has something to do with wanting to pass the MACHDEP options to the linker aswell... and since some of them are compiler options, I guess g++ will invoke the linker, and forward only the relevant options (while not complaining that compile options were given to ld)?
Something like that?
Anyway, what I'm wondering is, which options are required for each step?
The options given to both the compiler and linker (ie, g++ used to link) are:
-g -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float
I presume -DGEKKO -mcpu=750 -meabi -mhard-float are only needed while compiling, surely they don't need to be supplied while linking?
That leaves me wondering about -g -mrvl, which of these are needed by the compile step, and by the link step?
Obviously I need -g while compiling, do I also need it when linking? And what is -mrvl? I can't find any information about it... I'm suspecting that's the magic option that is wanted by the link step... is it needed during the compile step?
TL;DR: of those options, can you separate into options that should be given while compiling, and which should be given while linking?