why -fno-rtti default

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

why -fno-rtti default

Post by jojojoris »

Why does all psp-makefiles have -fno-rtti as default

I did some tests and it works as it should do.(probably)

Is it because it saves space in the prx?
Is it because it speeds up the prx?
Or has it a more technicaly reason?

EDIT:
Same for -fno-exception...

Code: Select all

int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Because:

Code: Select all

$ cat test.cc
#include <stdio.h>
int main&#40;&#41; &#123;
        printf&#40;"hello, world\n"&#41;;
        return 0;
&#125;
$ psp-g++ -s -o test test.cc -L/usr/local/pspdev/psp/sdk/lib -Wl,--start-group -lc -lpspuser -lpspkernel
$ psp-size test
   text    data     bss     dec     hex filename
  92868    4872   27988  125728   1eb20 test
$ psp-g++ -s -o test test.cc -L/usr/local/pspdev/psp/sdk/lib -Wl,--start-group -lc -lpspuser -lpspkernel -fno-exceptions -fno-rtti
$ psp-size test
   text    data     bss     dec     hex filename
  10758    2100   25708   38566    96a6 test
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

so does the psp support rtti
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

It's more a question of whether your g++ and libstdc++ builds support it, there shouldn't be anything PSP-specific. As long as you build things without -fno-rtti I expect it would work.
Post Reply