We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
My aim is to create a static excuetable which does not depend on any shared obj . (basically something like gcc --static ) but i am not able to find such a option with armcc.
Using 'armcc --translate_gcc --arm_linux_config_file=... --static ...' should behave like 'gcc --static ...'. What command-line options are you using?
it automatically detects the libraries and it creates the config.xml .. and the config files has options like --fpic --shared which actually tells the comliler to produce a dynamically linked executable.
Using 'armcc --translate_gcc --arm_linux_config_file=... -static ...' should behave like 'gcc -static ...'.
By the way, I notice that I made a mistake in an earlier post: the GNU spelling of the option is '-static' (single '-', not '--'), so I should have said:
Thanks, it worked for me. [...]
I have one last question regarding the translate_gcc option with armcc and compiling of linux application using RVDS in generalDoes it affect the performance which RVDS promises to give over gcc ? i mean For compiling linux applications we use all gcc libraries ( code sourcery libraries, use gcc options ). The effect of this on RVDS performance over gcc.?
Glad to hear it; you're welcome.That really depends on how much time your application spends in the libraries and how much in the armcc-built code. Profiling with something like DS-5 Streamline or oprofile is probably the right place to start. If you find out you're spending a lot of time in the libraries (for example memcpy) it might be worth trying to use those functions from the RVDS libraries -- but it can be messy or impossible if the library functions are OS-dependant (file i/o, signals, sockets, ...).
Now i am stuck in another issue. I was able to build a static binary as mentioned . but now The binaries which i built are all seg faulting in the target. A statically linked binary segfaulting in the target baffles me .
I have another question. Like you said the options in the config file are implicit options provided to the compiler. But now when i compile i give the path to the config file ( xml file) and there are some options in it which was automatically configured. You said it depends on the options which you give inthe comand line depending on which it will be decided that whether the options are to be taken or not. now armcc by default produces a static binary until u give the option --shared. Problem is my config file has this option called --shared which is why it produces a dynamic lib. how can i tell the compiler not to take this option ? \If this works i need not work around using translate_gcc