This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Linux applications using RVDS

Note: This was originally posted on 28th July 2010 at http://forums.arm.com

hi

I  cross compiled some linux code using RVDS .

i used the instructions given in the following document

Building linux Applications using RVCT 4.0 and GNU tools

i used the latest CODE sourcery tool chain for this..


The compilation went through and it created a dynamically linked excuetable which uses shared libs.

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.

Kindly help

Regards
Sundar
Parents
  • Note: This was originally posted on 17th August 2010 at http://forums.arm.com

    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.

    The config.xml describes what implicit options (-Idir1, -Ldir2, obj1.o, ...) to use for various different cases -- not all of it will be used every time.  Which parts are used depend on the other command-line options you give along with --arm_linux_config_file=...

    I think you can see the actual armcc/armlink command lines by adding '-v'.  Can you post the command line that does your linking and the output when you add '-v' to it?  If that doesn't show the armcc/armlink command lines try adding '-Wrvct,--show_cmdline' which is how you can pass a raw RVCT option through --translate_gcc (but it's not a good idea for options that need to be handled by the translation).

    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:
    Using 'armcc --translate_gcc --arm_linux_config_file=... -static ...' should behave like 'gcc -static ...'.
Reply
  • Note: This was originally posted on 17th August 2010 at http://forums.arm.com

    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.

    The config.xml describes what implicit options (-Idir1, -Ldir2, obj1.o, ...) to use for various different cases -- not all of it will be used every time.  Which parts are used depend on the other command-line options you give along with --arm_linux_config_file=...

    I think you can see the actual armcc/armlink command lines by adding '-v'.  Can you post the command line that does your linking and the output when you add '-v' to it?  If that doesn't show the armcc/armlink command lines try adding '-Wrvct,--show_cmdline' which is how you can pass a raw RVCT option through --translate_gcc (but it's not a good idea for options that need to be handled by the translation).

    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:
    Using 'armcc --translate_gcc --arm_linux_config_file=... -static ...' should behave like 'gcc -static ...'.
Children
No data