[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
linking binary with a few static libs on AIX
From: |
Eric Haszlakiewicz |
Subject: |
linking binary with a few static libs on AIX |
Date: |
Tue, 25 Nov 2003 17:28:03 -0600 |
I'm using libtool-1.5 to try to build stuff on AIX. I'm running into a
problem with
the -static option to link mode:
I'm trying to build bzip2. It builds a libbz2 and a bzip2 binary.
Before installing, it
tries to test the bzip2 binary. Normally, this would work, but the
-static flag isn't
handling the library correctly. I get a compile line that looks
something like this:
/path/to/gcc <flags> -o bzip2 -lbz2 <more flags>
Since libbz2 is a dynamic library, it gets linked dynamically, even
through the libtool
line looks like this:
libtool --mode=link <cflags, ldflags, etc...> -static -o bzip2 bzip2.o
libbz2.la
If I type in the final compile line by hand and add -bstatic, then it
works:
/path/to/gcc <flags> -o bzip2 -Wl,-bstatic -lbz2 -Wl,-bshared <more
flags>
That results in libbz2 being linked in statically, but libc still being
dynamic.
Is there an easy way to get libtool to do this automatically?
eric
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- linking binary with a few static libs on AIX,
Eric Haszlakiewicz <=