OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: Bebe on March 16, 2004, 01:40:48 pm
-
Hi all,
I\'m having an issue with cross compiling for the Z and I\'m beating my head against the wall trying to figure it out. When I compile a simple hello world program in C++ using stl, I get a binary that is over 3MB, even when compiling in release mode with optimizations turned on. When I remove all references to stl and compiled the program again, and binary still turns out to be 3MB. Any thoughts??
Bebe
-
Check to make sure you are performing dynamic linking.
-
Check to make sure you are performing dynamic linking.
Thanks for the reply.
I compiled using \"-Wl,-Bdynamic\", but the binary is still 3MB.
Bebe
PS, I\'m using zgcc 3.3.1
-
Have you stripped it? (you say release mode, but I don\'t know whether that has actually stripped it, though I\'d assume it has from the name).
Si
-
Have you stripped it? (you say release mode, but I don\'t know whether that has actually stripped it, though I\'d assume it has from the name).
Si
Thanks for replying lardman,
At first, I compiled my program like this:
g++ -Wall -g -o hello hello.cpp
Then like so,
g++ -Wall -02 -o hello hello.cpp
Then like this,
g++ -o hello hello.cpp
Finally, I did this
g++ -Wl,-Bdynamic -o hello hello.cpp
And I did this to both code that had stl and code that had non-stl references. All of this resulted in a 3MB file.
The interesting this is that when I used zgcc 3.3.2 to compile, I got a file that was much smaller. My guess is that some of the libs that came with the version of zgcc 3.3.1 were in debug mode. Oh well, 3.3.2 it is