[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patches] Re: eglibc-2.8 fails to link with OPTION_EGLIBC_LOCAL_CODE=n



Josh Boyer wrote:
On Wed, Oct 15, 2008 at 12:47:20PM -0400, Josh Boyer wrote:
Hi All,

While building eglibc for powerpc, I encountered linking error
when using the following option-groups.config:

OPTION_EGLIBC_BSD = n
OPTION_EGLIBC_CXX_TESTS = n
OPTION_EGLIBC_CATGETS = n
OPTION_EGLIBC_LOCALES = n
OPTION_EGLIBC_LOCALE_CODE = n
OPTION_EGLIBC_STREAMS = n

The error is:

/home/jwboyer/src/eglibc-build/libc_pic.os: In function `__dcigettext':
/home/jwboyer/src/eglibc-2.8/libc/intl/dcigettext.c:749: undefined reference to `__libc_setlocale_lock'
/home/jwboyer/src/eglibc-2.8/libc/intl/dcigettext.c:459: undefined reference to `__libc_setlocale_lock'
/home/jwboyer/src/eglibc-2.8/libc/intl/dcigettext.c:635: undefined reference to `__libc_setlocale_lock'
/usr/bin/ld: /home/jwboyer/src/eglibc-build/libc.so: hidden symbol `__libc_setlocale_lock' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[1]: *** [/home/jwboyer/src/eglibc-build/libc.so] Error 1
make[1]: Leaving directory `/home/jwboyer/src/eglibc-2.8/libc'
make: *** [all] Error 2

If I simply set OPTION_EGLIBC_LOCALES_CODE=y, then it appears to
build and link just fine.  I haven't debugged it further yet, but
it would seem the __libc_setlocale_lock code should probably be
protected by an ifdef of some kind.

The following patch allowed the build to complete.  I haven't tested this
beyond building, and I'm not entirely sure this is the proper fix.

Comments welcome.

Josh,

Thank you for the patch. Your patch seems fine, but I want to take a closer look at the issue to make sure that the problem will be fixed completely. I'll get back to you after I run some tests.

--
Maxim