[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add initializer for _nl_domain_bindings
From: |
Klee Dienes |
Subject: |
Re: [PATCH] Add initializer for _nl_domain_bindings |
Date: |
Tue, 29 Oct 2002 17:59:47 -0500 |
On Tuesday, October 29, 2002, at 07:33 AM, Bruno Haible wrote:
Thanks for the explanation. So it seems that -fno-common should be
used when compiling libintl (and probably also other shared
libraries). It would help me if you could test that by adding
-fno-common to the compiler command lines that contain -fPIC or -fpic.
If your test is successful, I'll patch gettext's copy of libtool
accordingly.
I believe that is correct, and my practical experience is that it works
for libintl.
Unfortunately, the GDB Makefile setup is rather different from the
current gettext build setup. I suspect the best course of action for
me is to make sure the proper changes get folded into libtool (I
suspect many have already), and propagated down into gettext / gdb /
etc. as appropriate (the GDB Makefile setup is currently a bastardized
Cygnus/Automake hybrid, and is using some pretty out-of-date versions
of several libraries).
_nl_domain_bindings isn't being used as a common symbol, it's
referenced with an extern in the only other file that uses it.
So the "ld: common symbols not allowed with MH_DYLIB output format"
doesn't actually appear for libintl?
If you compile without -fno-common, the compiler generates a common
symbol for it, which prints that message if/when you try to link
libintl as a shared library. If you compile with -fno-common, or
compile libintl as a static library, you get no message.
The
problem is apparently the FSF GDB source tree doesn't support building
intl/ with libtool --- it's just building it as a static library, and
then linking it in at the end.
Is it linking it into a shared library, or into gdb itself? In the
latter case there should be no problem, right?
Correct --- the problem only arises when building as a shared library.