I'm using a bcm6358 where only 6MB of RAM is left when the kernel started. The current vendor distribution (Openwrt) use -Os by default and maximise the use of shared libraries over static ones. I use crossdev to generate the toolchain and using µClibc Of course, this include shared libraries from gcc (libgcc libfortran libstdc++...). However, it seems the generation of shared libraries is disable in toolchain.eclass for some reason. While -Os seems to be a safe alternative as -O2, toolchain.eclass and patches make sure user libraries are compiled with -O2. So, after running crossdev I saw gcc's libraries where only available as static only, but shared memory is really important on the real hardware (since those part of code are expected to be loaded in every piece of software).
That's not a problem if the compiler itself is build with -O2 since it would make it faster. I'm more concerned by shared libraries for programs compiled by gcc (libgcc libfortan...). So the main problem is that they can't be shared. Making them shared would save lot of more memory than compiling them with -Os.
please post the full build logs as attachments to show what you're talking about. include the full command you actually ran w/crossdev.
(In reply to SpanKY from comment #2) > please post the full build logs as attachments to show what you're talking > about. include the full command you actually ran w/crossdev. Logs won't tell many things since gcc stage compile successfully. There's no need for logs just look at /usr/portage/eclass/toolchain.eclass at the line 917 : *-uclibc*) if ! echo '#include <features.h>' | \ $(tc-getCPP ${CTARGET}) -E -dD - 2>/dev/null | \ grep -q __HAVE_SHARED__ then #291870 confgcc+=( --disable-shared ) That part disable the shared version of gcc libraries. The next one disable -Os: 1339 gcc_do_filter_flags() { 1340 strip-flags 1341 replace-flags -O? -O2
(In reply to lcellier from comment #3) your vague reports aren't useful. please post the logs requested.