patches/ltrace/0.5.2/100-allow-cross-compile.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
parent 1262 e3574ccecb6d
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)
     1 diff -durN ltrace-0.5.2.orig/Makefile.in ltrace-0.5.2/Makefile.in
     2 --- ltrace-0.5.2.orig/Makefile.in	2009-05-21 19:14:54.000000000 +0200
     3 +++ ltrace-0.5.2/Makefile.in	2009-06-27 15:30:34.000000000 +0200
     4 @@ -2,8 +2,14 @@
     5  # ltrace's Makefile.in
     6  #
     7  
     8 -#OS		:= $(shell uname -s)
     9  OS		:= @HOST_OS@
    10 +ARCH		:= $(shell echo "@HOST_ARCH@" |sed -e s/i.86/i386/      \
    11 +						   -e s/sun4u/sparc64/  \
    12 +						   -e s/arm.*/arm/      \
    13 +						   -e s/sa110/arm/      \
    14 +						   -e s/ppc64/ppc/      \
    15 +						   -e s/s390x/s390/)
    16 +export ARCH
    17  
    18  TOPDIR		= $(shell pwd)
    19  
    20 diff -durN ltrace-0.5.2.orig/configure ltrace-0.5.2/configure
    21 --- ltrace-0.5.2.orig/configure	2009-05-21 19:14:57.000000000 +0200
    22 +++ ltrace-0.5.2/configure	2009-06-27 15:30:34.000000000 +0200
    23 @@ -660,6 +660,7 @@
    24  host_cpu
    25  host_vendor
    26  host_os
    27 +HOST_ARCH
    28  HOST_OS
    29  CC
    30  CFLAGS
    31 @@ -1823,6 +1824,7 @@
    32  case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
    33  
    34  
    35 +HOST_ARCH="$host_cpu"
    36  case "$host_os" in
    37    linux-gnu*) host_os=linux-gnu
    38  esac
    39 @@ -5406,6 +5408,7 @@
    40  host_cpu!$host_cpu$ac_delim
    41  host_vendor!$host_vendor$ac_delim
    42  host_os!$host_os$ac_delim
    43 +HOST_ARCH!$HOST_ARCH$ac_delim
    44  HOST_OS!$HOST_OS$ac_delim
    45  CC!$CC$ac_delim
    46  CFLAGS!$CFLAGS$ac_delim
    47 @@ -5426,7 +5429,7 @@
    48  LTLIBOBJS!$LTLIBOBJS$ac_delim
    49  _ACEOF
    50  
    51 -  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
    52 +  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then
    53      break
    54    elif $ac_last_try; then
    55      { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
    56 diff -durN ltrace-0.5.2.orig/configure.ac ltrace-0.5.2/configure.ac
    57 --- ltrace-0.5.2.orig/configure.ac	2009-05-21 19:14:54.000000000 +0200
    58 +++ ltrace-0.5.2/configure.ac	2009-06-27 15:30:34.000000000 +0200
    59 @@ -11,6 +11,8 @@
    60  esac
    61  HOST_OS="$host_os"
    62  AC_SUBST(HOST_OS)
    63 +HOST_ARCH="$host_cpu"
    64 +AC_SUBST(HOST_ARCH)
    65  
    66  dnl Checks for programs.
    67  AC_PROG_CC
    68 diff -durN ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile ltrace-0.5.2/sysdeps/linux-gnu/Makefile
    69 --- ltrace-0.5.2.orig/sysdeps/linux-gnu/Makefile	2009-05-21 19:14:54.000000000 +0200
    70 +++ ltrace-0.5.2/sysdeps/linux-gnu/Makefile	2009-06-27 15:30:34.000000000 +0200
    71 @@ -1,6 +1,3 @@
    72 -ARCH		:=	$(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
    73 -			-e s/arm.*/arm/ -e s/sa110/arm/ -e s/ppc64/ppc/ -e s/s390x/s390/)
    74 -
    75  CPPFLAGS	+=	-I$(TOPDIR)/sysdeps/linux-gnu/$(ARCH)
    76  
    77  OBJ		=	events.o trace.o proc.o breakpoint.o