patches/gcc/4.3.5/120-java-nomulti.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 1461 35b30f8fb307
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 Original patch from: ../4.3.2/120-java-nomulti.patch
     2 
     3 -= BEGIN original header =-
     4 Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/03_all_gcc43-java-nomulti.patch
     5 -= END original header =-
     6 
     7 diff -durN gcc-4.3.3.orig/libjava/configure gcc-4.3.3/libjava/configure
     8 --- gcc-4.3.3.orig/libjava/configure	2009-01-24 11:32:29.000000000 +0100
     9 +++ gcc-4.3.3/libjava/configure	2009-01-27 22:19:14.000000000 +0100
    10 @@ -1018,6 +1018,8 @@
    11    --enable-gconf-peer     compile GConf native peers for util.preferences
    12    --enable-java-maintainer-mode
    13                            allow rebuilding of .class and .h files
    14 +  --enable-libjava-multilib
    15 +                          build libjava as multilib
    16    --disable-dependency-tracking  speeds up one-time build
    17    --enable-dependency-tracking   do not reject slow dependency extractors
    18    --enable-maintainer-mode  enable make rules and dependencies not useful
    19 @@ -1850,6 +1852,16 @@
    20  fi
    21  
    22  
    23 +# Check whether --enable-libjava-multilib was given.
    24 +if test "${enable_libjava_multilib+set}" = set; then
    25 +  enableval=$enable_libjava_multilib;
    26 +fi
    27 +
    28 +if test "$enable_libjava_multilib" = no; then
    29 +  multilib=no
    30 +  ac_configure_args="$ac_configure_args --disable-multilib"
    31 +fi
    32 +
    33  # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
    34  
    35  
    36 diff -durN gcc-4.3.3.orig/libjava/configure.ac gcc-4.3.3/libjava/configure.ac
    37 --- gcc-4.3.3.orig/libjava/configure.ac	2008-07-02 23:23:43.000000000 +0200
    38 +++ gcc-4.3.3/libjava/configure.ac	2009-01-27 22:19:14.000000000 +0100
    39 @@ -82,6 +82,13 @@
    40  	[allow rebuilding of .class and .h files]))
    41  AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
    42  
    43 +AC_ARG_ENABLE(libjava-multilib,
    44 +	AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
    45 +if test "$enable_libjava_multilib" = no; then
    46 +  multilib=no
    47 +  ac_configure_args="$ac_configure_args --disable-multilib"
    48 +fi
    49 +
    50  # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
    51  GCC_NO_EXECUTABLES
    52