optimize for size for the epiphany
Posted: Tue May 20, 2014 9:37 am
Hi,
I am trying to get pHash running on the epiphany, I managed to find some flags for gcc to remove what is not needed but I am still having a hard time making it fit into the 32K on a core.
Since I use only two function of pHash I extracted them out into my pHash.cpp so the size is pretty small, he problem comes from its dependencency CImg which is one freaking huge file, by using the various optimization flags I found (see the Makefile below) I reduced the size grealty but there is still a lot remaining (gcc says I exceed the internal ram by 192824 bytes xD).
I tried to remove large chunks of CImg I wasn't using but it just confirmed the optimization already removed them since the final size did not change by even a byte after removing hundreds of lines.
From there I am not sure where to go, is there a way to know what exactly is using space in the resulting object files ?
If at least I can find what is taking so much space I can track down what is using it.
Here is the Makefile I am currently using: https://gist.github.com/schmurfy/3f6f7c ... e-makefile
What is really weird is that I somehow managed to make it fit but only once, as soon as I recompiled it gcc started complaining again it was too big for the internal ram
I am trying to get pHash running on the epiphany, I managed to find some flags for gcc to remove what is not needed but I am still having a hard time making it fit into the 32K on a core.
Since I use only two function of pHash I extracted them out into my pHash.cpp so the size is pretty small, he problem comes from its dependencency CImg which is one freaking huge file, by using the various optimization flags I found (see the Makefile below) I reduced the size grealty but there is still a lot remaining (gcc says I exceed the internal ram by 192824 bytes xD).
I tried to remove large chunks of CImg I wasn't using but it just confirmed the optimization already removed them since the final size did not change by even a byte after removing hundreds of lines.
From there I am not sure where to go, is there a way to know what exactly is using space in the resulting object files ?
If at least I can find what is taking so much space I can track down what is using it.
Here is the Makefile I am currently using: https://gist.github.com/schmurfy/3f6f7c ... e-makefile
What is really weird is that I somehow managed to make it fit but only once, as soon as I recompiled it gcc started complaining again it was too big for the internal ram