patches/gcc/4.3.4/120-java-nomulti.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 17 22:43:07 2011 +0200 (2011-07-17)
changeset 2893 a8a65758664f
permissions -rw-r--r--
cc/gcc: do not use the core pass-2 to build the baremetal compiler

In case we build a baremetal compiler, use the standard passes:
- core_cc is used to build the C library;
- as such, it is meant to run on build, not host;
- the final compiler is meant to run on host;

As the current final compiler step can not build a baremetal compiler,
call the core backend from the final step.

NB: Currently, newlib is built during the start_files pass, so we have
to have a core compiler by then... Once we can build the baremetal
compiler from the final cc step, then we can move the newlib build to
the proper step, and then get rid of the core pass-1 static compiler...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     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