patches/uClibc/0.9.32/170-Conditionalize-use-libgcc_eh-when-libubacktrace-is-n.patch
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Wed Dec 14 16:55:22 2011 +0100 (2011-12-14)
branch1.13
changeset 2848 1ff89596dab0
permissions -rw-r--r--
libc/eglibc: fix localedef 2.14 build

The localedef of eglibc 2.14 requires NOT_IN_libc to be defined in order to
compile intl/l10nflist.c.

This is because localedef is built separately from eglibc and uses some parts of
eglibc that don't compile in standalone without this preprocessor definition.

This fixes the following error:

[ALL ] gcc -g -O2 -DNO_SYSCONF -DNO_UNCOMPRESS
-DLOCALE_PATH='"/usr/lib/locale:/usr/share/i18n"'
-DLOCALEDIR='"/usr/lib/locale"' -DLOCALE_ALIAS_PATH='"/usr/share/locale"'
-DCHARMAP_PATH='"/usr/share/i18n/charmaps"'
-DREPERTOIREMAP_PATH='"/usr/share/i18n/repertoiremaps"'
-DLOCSRCDIR='"/usr/share/i18n/locales"' -Iglibc/locale/programs -Iglibc/locale
-I/<snip>/.build/src/eglibc-localedef-2_14/include
-I/<snip>/.build/src/eglibc-localedef-2_14 -I.
-include /<snip>/.build/src/eglibc-localedef-2_14/include/always.h -Wall
-Wno-format -c -o locarchive.o glibc/locale/programs/locarchive.c
[ALL ] glibc/locale/programs/locarchive.c: In function 'enlarge_archive':
[ALL ] glibc/locale/programs/locarchive.c:303:21: warning: variable
'oldlocrectab' set but not used [-Wunused-but-set-variable]
[ALL ] In file included from glibc/locale/programs/locarchive.c:651:0:
[ALL ] glibc/locale/programs/../../intl/l10nflist.c: In function
'_nl_normalize_codeset':
[ERROR] glibc/locale/programs/../../intl/l10nflist.c:342:9: error:
'_nl_C_locobj_ptr' undeclared (first use in this function)
[ALL ] glibc/locale/programs/../../intl/l10nflist.c:342:9: note: each
undeclared identifier is reported only once for each function it appears in
[ALL ] glibc/locale/programs/locarchive.c: In function
'add_locales_to_archive':
[ALL ] glibc/locale/programs/locarchive.c:1450:7: warning: passing argument
1 of '__xpg_basename' discards 'const' qualifier from pointer target type
[enabled by default]
[ALL ] /usr/include/libgen.h:35:14: note: expected 'char *' but argument is
of type 'const char *'
[ERROR] make[1]: *** [locarchive.o] Error 1

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
(transplanted from 4cd9134739b594451794cf61a6e1b137422cdafd)
yann@2669
     1
From the uClibc ML archives:
yann@2669
     2
    http://lists.uclibc.org/pipermail/uclibc/2011-June/045411.html
yann@2669
     3
yann@2669
     4
>From 364a3a9c576d604bed146efe0b8b33d2b81d4c64 Mon Sep 17 00:00:00 2001
yann@2669
     5
From: Jason Woodward <jason.woodward@timesys.com>
yann@2669
     6
Date: Sat, 11 Jun 2011 01:08:48 -0400
yann@2669
     7
Subject: [PATCH 1/3] Conditionalize use libgcc_eh when libubacktrace is not enabled
yann@2669
     8
yann@2669
     9
Signed-off-by: Jason Woodward <jason.woodward@timesys.com>
yann@2669
    10
---
yann@2669
    11
 libubacktrace/Makefile.in |    2 +-
yann@2669
    12
 1 files changed, 1 insertions(+), 1 deletions(-)
yann@2669
    13
yann@2669
    14
diff --git a/libubacktrace/Makefile.in b/libubacktrace/Makefile.in
yann@2669
    15
index f75f68b..880a8af 100644
yann@2669
    16
--- a/libubacktrace/Makefile.in
yann@2669
    17
+++ b/libubacktrace/Makefile.in
yann@2669
    18
@@ -12,7 +12,7 @@ CFLAGS-libubacktrace := -DNOT_IN_libc -DIS_IN_libubacktrace $(SSP_ALL_CFLAGS)
yann@2669
    19
 
yann@2669
    20
 LDFLAGS-libubacktrace.so := $(LDFLAGS) $(top_builddir)lib/libdl-$(VERSION).so
yann@2669
    21
 
yann@2669
    22
-ifeq ($(CONFIG_ARM_EABI),y)
yann@2669
    23
+ifeq ($(UCLIBC_HAS_BACKTRACE)$(CONFIG_ARM_EABI),yy)
yann@2669
    24
 LIBGCC += $(shell $(CC) -print-file-name=libgcc_eh.a)
yann@2669
    25
 endif
yann@2669
    26
 
yann@2669
    27
-- 
yann@2669
    28
1.7.0.4
yann@2669
    29