Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2001 10:32:02 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        "Groot, Ruben de" <R.deGroot@DTO.TUDelft.NL>
Cc:        "'freebsd-questions@freebsd.org'" <freebsd-questions@freebsd.org>
Subject:   Re: making statically linked binaries
Message-ID:  <20010821103202.A55819@student.uu.se>
In-Reply-To: <117300A106D0D411BAD200805F6516AA04550F@dto0nt10.dto.tudelft.nl>
References:  <117300A106D0D411BAD200805F6516AA04550F@dto0nt10.dto.tudelft.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 21, 2001 at 10:23:39AM +0200, Groot, Ruben de wrote:
> Hi,
> 
> I am building a cvs server on FreeBSD-Stable and would like to run cvs from
> a jail. Since this involves either creating another tree of libraries etc
> within the jail or recompiling the binaries to be statically linked I
> searched Google and the mailing archives for examples, without much succes.
> Now, I have two questions:
> 
> 1) How do I determine what shared libraries a binary depends upon. Is there
> a command for this?

ldd /path/to/binary

> 
> 2) Can someone point me to some examples on how to compile statically linked
> binaries?
> 

Add '-static' to the linker flags.
Ex. 'gcc -static -o binary objfile1.o objfile2.o'

> Thanks in advance
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010821103202.A55819>