LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-24-2004, 12:22 PM   #1
jago25_98
Member
 
Registered: Jun 2001
Posts: 302

Rep: Reputation: 30
Monolithic / static compiling


How can I compile any program so that all it's dependancies are included in the final static binary?

For example, how could I compile ssh so that it runs from just one command and has no dependant libraries.

I ask this because I'm using space tight systems with few commands and therefore code sharing more hassel than it's worth.

TIA!
 
Old 03-24-2004, 12:37 PM   #2
aluser
Member
 
Registered: Mar 2004
Location: Massachusetts
Distribution: Debian
Posts: 557

Rep: Reputation: 43
I *think* you should be able to do it by using "make LDFLAGS=-static" instead of your normal "make" command.

Also have a look at "./configure -h" to see if there is actually a configure option for building staticly.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is the Linux kernel a monolithic one? LinuxSeeker Linux - General 4 10-27-2004 07:58 PM
building a monolithic kernel corbis_demon Linux - Newbie 1 07-14-2004 12:35 PM
compiling with shared and static libraries jinksys Programming 1 11-22-2003 04:54 AM
monolithic kernel, avoiding lkms? m00 Linux - Security 3 11-11-2003 02:08 AM
true way on compiling kernel and static iptables klog2_k Linux - Software 0 07-15-2003 10:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration