Re: glibtool question
Re: glibtool question
- Subject: Re: glibtool question
- From: "Peter O'Gorman" <email@hidden>
- Date: Mon, 28 Nov 2005 23:30:07 +0900
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
plumber Idraulico wrote:
|> plumber Idraulico wrote:
|> |> glibtool: compile: unable to infer tagged configuration
|> |> glibtool: compile: specify a tag with `--tag'
|> | when i do the same with --enable-shared=no --enable-static=yes
|> | it works well and the lib archive is built correctly
|> |
|> | does anybody have a solution? ( not re-glibtoolize all the open-
|> source
|> | world :) )
|>
|> Is this the glibtool in /usr/bin ? And the automake in /usr/bin? If not,
|> which versions of the tools are you asking about?
|
|
| all version :
| the answer is : libtool it's not made for this
| i would have like to simplify my work
I just committed changes to gnu libtool to allow the -isysroot flag through
to gcc unmolested. However I did do some work on older libtool-1.5.x
versions to get it working with fat builds. All of the testing of these
older builds was done using a fat toolchain and fat libraries in / though so
they don't actually work with the tools shipping to developers now. sigh.
If you put the flags into the CC or CXX compiler env var then it may work.
CC="cc -arch ppc -arch i386 -isysroot=/path"
CXX="c++ -arch ppc -arch i386 -isysroot=/path"
CPP="cc -E"
CXXCPP="g++ -E"
Note that you need an automake newer than Apple ships. Latest is 1.9.6, I
think 1.8.2 or so started adding the --tag argument for glibtool.
| 1 - is there an importance that stored objects have been built with the
| pic or non-pic option ?
Are you talking about the pic option to gnu libtool? If so the pic option
only adds -fno-common and since you are building a single_module library
that flag is not strictly required. If you were building a multi_module
library and the code had common symbols then the link would fail on the
"non-pic" objects. If you try with real non-pic objects, then link will
probably fail:
imac:~/foo peter$ cat foo.c
#include <stdio.h>
int foo() {printf("Hello\n"); return 1;}
imac:~/foo peter$ cc -mdynamic-no-pic -c -o foo_m.o foo.c
imac:~/foo peter$ cc -fno-pic -c -o foo_nopic.o foo.c
imac:~/foo peter$ cc -c -o foo_pic.o foo.c
imac:~/foo peter$ cc -dynamiclib -o libfoo_m.dylib foo_m.o
ld: foo_m.o has local relocation entries in non-writable section (__TEXT,__text)
/usr/bin/libtool: internal link edit command failed
imac:~/foo peter$ cc -dynamiclib -o libfoo_nopic.dylib foo_nopic.o
ld: foo_nopic.o has external relocation entries in non-writable section
(__TEXT,__text) for symbols:
_printf$LDBL128
ld: foo_nopic.o has local relocation entries in non-writable section
(__TEXT,__text)
/usr/bin/libtool: internal link edit command failed
imac:~/foo peter$ cc -dynamiclib -o libfoo_pic.dylib foo_pic.o
imac:~/foo peter$
|
| 2 - is it normal that the lib archive has a bigger size than the shared
| archive ( +15% ) ?
If you create a really small library with just one or two objects and almost
no code then the static archive will be smaller :)
Peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
iQCVAwUBQ4sUb7iDAg3OZTLPAQIR2QP8CgeRHFfCFmlo2Bn11VmWaNs0kIDtyH/2
bsWeB55QhtzXzvvPGPss82GCa7WUYaR35hHlx07aX+WNvQeerlJ3ztDpepUDBFgD
ChUrhBKHhB/j90OiB9WjPli4ivmdmf1T5ZpAprY5AOhfIcsKm0IFGVugSTyLB1ic
Z/5lGPfkQJk=
=dyXG
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden