[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: static lib with libtool 1.5
From: |
Patrick Welche |
Subject: |
Re: static lib with libtool 1.5 |
Date: |
Thu, 11 Aug 2005 14:09:29 +0100 |
User-agent: |
Mutt/1.5.9i |
On Wed, Jul 20, 2005 at 02:23:06PM +0200, Jeremie LE HEN wrote:
> IMO, the user is confused while reading this. Furthermore, the
> first statement is wrong in regard to the example on the NetBSD box
> (burger) :
> burger$ libtool compile gcc -g -O -c foo.c
> mkdir .libs
> gcc -g -O -c foo.c -fPIC -DPIC -o .libs/foo.o
> gcc -g -O -c foo.c -o foo.o >/dev/null 2>&1
> burger$
>
> Note that in this cas, the .lo control file is indeed created
> silently as stated in the second sentence I pointed out. The PIC
> library is stored in .libs/foo.o, not in foo.lo as the first
> statement let understand.
Just to check, I just tried this:
quartz% uname -s
NetBSD
quartz% libtool compile gcc -g -O -c foo.c
libtool: compile: gcc -g -O -c foo.c -fPIC -DPIC -o .libs/foo.o
libtool: compile: gcc -g -O -c foo.c -o foo.o >/dev/null 2>&1
quartz% ls -laR
total 16
drwxr-xr-x 3 prlw1 wheel 512 Aug 11 14:02 .
drwxrwxrwt 5 root wheel 512 Aug 11 14:02 ..
drwxr-xr-x 2 prlw1 wheel 512 Aug 11 14:02 .libs
-rw-r--r-- 1 prlw1 wheel 53 Aug 11 14:02 foo.c
-rw-r--r-- 1 prlw1 wheel 290 Aug 11 14:02 foo.lo
-rw-r--r-- 1 prlw1 wheel 2116 Aug 11 14:02 foo.o
./.libs:
total 10
drwxr-xr-x 2 prlw1 wheel 512 Aug 11 14:02 .
drwxr-xr-x 3 prlw1 wheel 512 Aug 11 14:02 ..
-rw-r--r-- 1 prlw1 wheel 2116 Aug 11 14:02 foo.o
quartz% file foo.lo foo.o .libs/foo.o
foo.lo: ASCII English text
foo.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not
stripped
.libs/foo.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not
stripped
quartz% libtool --version
ltmain.sh (GNU libtool 1.1984 2005/07/11 12:11:25) 2.1a
...
quartz% diff -s foo.o .libs/foo.o
Files foo.o and .libs/foo.o are identical
So your comment is correct. I just wonder why there are two foo.o files.
Cheers,
Patrick
- Re: static lib with libtool 1.5,
Patrick Welche <=