patches/glibc/ports-2.12.1/460-alpha-fix-gcc-4.1-warnings.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)
     1 2006-05-30  Falk Hueffner <falk@debian.org>
     2 
     3 	* sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture
     4 	  to ev6 in assembly code.
     5 
     6 {standard input}: Assembler messages:
     7 {standard input}:341: Error: macro requires $at register while noat in effect
     8 {standard input}:374: Error: macro requires $at register while noat in effect
     9 {standard input}:438: Error: macro requires $at register while noat in effect
    10 {standard input}:471: Error: macro requires $at register while noat in effect
    11 make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1
    12 
    13 Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as.
    14 I cannot really think of anything better than
    15 
    16  ports/sysdeps/unix/sysv/linux/alpha/ioperm.c |    8 ++++----
    17  1 file changed, 4 insertions(+), 4 deletions(-)
    18 
    19 diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c
    20 --- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c	2009-05-16 10:36:20.000000000 +0200
    21 +++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c	2009-11-13 00:50:57.000000000 +0100
    22 @@ -178,13 +178,13 @@
    23  static inline void
    24  stb_mb(unsigned char val, unsigned long addr)
    25  {
    26 -  __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
    27 +  __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
    28  }
    29  
    30  static inline void
    31  stw_mb(unsigned short val, unsigned long addr)
    32  {
    33 -  __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
    34 +  __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
    35  }
    36  
    37  static inline void
    38 @@ -356,7 +356,7 @@
    39    unsigned long int addr = dense_port_to_cpu_addr (port);
    40    unsigned char r;
    41  
    42 -  __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
    43 +  __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
    44    return r;
    45  }
    46  
    47 @@ -366,7 +366,7 @@
    48    unsigned long int addr = dense_port_to_cpu_addr (port);
    49    unsigned short r;
    50  
    51 -  __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
    52 +  __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
    53    return r;
    54  }
    55  
    56 diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c