patches/binutils/2.19.1a/120-sh-targets.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 1243 5d15872659ec
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@1243
     1
Original patch from: ../crosstool-NG/ct-ng.trunk/patches/binutils/2.19/120-sh-targets.patch
yann@1243
     2
yann@1243
     3
-= BEGIN original header =-
yann@1243
     4
Original patch from Gentoo:
yann@1243
     5
gentoo/src/patchsets/binutils/2.19/12_all_sh-targets.patch
yann@1243
     6
yann@1243
     7
r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
yann@1243
     8
yann@1243
     9
Likewise, binutils has no idea about any of these new targets either, so we
yann@1243
    10
fix that up too.. now we're able to actually build a real toolchain for
yann@1243
    11
sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
yann@1243
    12
inept targets than that one, really. Go look, I promise).
yann@1243
    13
yann@1243
    14
-= END original header =-
yann@1243
    15
yann@1243
    16
diff -durN binutils-2.19.1.orig/configure binutils-2.19.1/configure
yann@1243
    17
--- binutils-2.19.1.orig/configure	2009-03-08 11:57:00.000000000 +0100
yann@1243
    18
+++ binutils-2.19.1/configure	2009-03-08 11:57:00.000000000 +0100
yann@1243
    19
@@ -2281,7 +2281,7 @@
yann@1243
    20
   am33_2.0-*-linux*)
yann@1243
    21
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1243
    22
     ;;
yann@1243
    23
-  sh-*-linux*)
yann@1243
    24
+  sh*-*-linux*)
yann@1243
    25
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1243
    26
     ;;
yann@1243
    27
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
yann@1243
    28
@@ -2606,7 +2606,7 @@
yann@1243
    29
   romp-*-*)
yann@1243
    30
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
yann@1243
    31
     ;;
yann@1243
    32
-  sh-*-* | sh64-*-*)
yann@1243
    33
+  sh*-*-* | sh64-*-*)
yann@1243
    34
     case "${host}" in
yann@1243
    35
       i[3456789]86-*-vsta) ;; # don't add gprof back in
yann@1243
    36
       i[3456789]86-*-go32*) ;; # don't add gprof back in
yann@1243
    37
diff -durN binutils-2.19.1.orig/configure.ac binutils-2.19.1/configure.ac
yann@1243
    38
--- binutils-2.19.1.orig/configure.ac	2009-02-02 12:54:49.000000000 +0100
yann@1243
    39
+++ binutils-2.19.1/configure.ac	2009-03-08 11:57:00.000000000 +0100
yann@1243
    40
@@ -530,7 +530,7 @@
yann@1243
    41
   am33_2.0-*-linux*)
yann@1243
    42
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1243
    43
     ;;
yann@1243
    44
-  sh-*-linux*)
yann@1243
    45
+  sh*-*-linux*)
yann@1243
    46
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
yann@1243
    47
     ;;    
yann@1243
    48
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
yann@1243
    49
@@ -855,7 +855,7 @@
yann@1243
    50
   romp-*-*)
yann@1243
    51
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
yann@1243
    52
     ;;
yann@1243
    53
-  sh-*-* | sh64-*-*)
yann@1243
    54
+  sh*-*-* | sh64-*-*)
yann@1243
    55
     case "${host}" in
yann@1243
    56
       i[[3456789]]86-*-vsta) ;; # don't add gprof back in
yann@1243
    57
       i[[3456789]]86-*-go32*) ;; # don't add gprof back in