Skip to contentSkip to conversation

gcc -static

DISCUSSION patel nirav 3 participants 3 messages Mar 13, 2007

lore
Share & tools
lore
#0 lore raw

Hello all,
Can any body tell me what is the use of " - static" option for gcc compilation ?

Nirav J Patel
M.Tech(CSE),
Nirma University,
Ahmedabad-382481.
9925138959

---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 2 lines · patel nirav

Hello all, Can any body tell me what is the use of " - static" option for gcc compilation ?

man gcc:

- -static
On systems that support dynamic linking, this prevents linking with the shared libraries. On other systems, this option has no effect.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFF9uDGMiyRSD9s+zURAlvnAJ41AjtlgyJFabQ98Nm0Ry1alNy1LgCfU9LY 5Yjt3BobB15FxEn5hXs+MAs=
=KS0W
-----END PGP SIGNATURE-----

#2 lore raw
In reply to patel nirav

"-static" option tells gcc to generate an executable that will run by itself. All the runtime libraries (eg. glibc) are linked into the application code to form one big executable.

-Ameet

Quoted 20 lines · patel nirav

Hello all,
Can any body tell me what is the use of " - static" option for gcc compilation ?

Nirav J Patel
M.Tech(CSE),
Nirma University,
Ahmedabad-382481.
9925138959

------------------------------------------------------------------------
Bored stiff? <http://us.rd.yahoo.com/evt=49935/*http://games.yahoo.com> Loosen up...
Download and play hundreds of games for free <http://us.rd.yahoo.com/evt=49935/*http://games.yahoo.com> on Yahoo! Games.
------------------------------------------------------------------------

_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded