patches/gcc/4.4.0/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 diff -durN gcc-4.4.0.orig/libjava/configure gcc-4.4.0/libjava/configure
     2 --- gcc-4.4.0.orig/libjava/configure	2009-04-21 11:08:08.000000000 +0200
     3 +++ gcc-4.4.0/libjava/configure	2009-05-27 21:38:03.000000000 +0200
     4 @@ -1021,6 +1021,8 @@
     5                            default=yes
     6    --enable-java-maintainer-mode
     7                            allow rebuilding of .class and .h files
     8 +  --enable-libjava-multilib
     9 +                          build libjava as multilib
    10    --disable-dependency-tracking  speeds up one-time build
    11    --enable-dependency-tracking   do not reject slow dependency extractors
    12    --enable-maintainer-mode  enable make rules and dependencies not useful
    13 @@ -1973,6 +1975,16 @@
    14  fi
    15  
    16  
    17 +# Check whether --enable-libjava-multilib was given.
    18 +if test "${enable_libjava_multilib+set}" = set; then
    19 +  enableval=$enable_libjava_multilib;
    20 +fi
    21 +
    22 +if test "$enable_libjava_multilib" = no; then
    23 +  multilib=no
    24 +  ac_configure_args="$ac_configure_args --disable-multilib"
    25 +fi
    26 +
    27  # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
    28  
    29  
    30 diff -durN gcc-4.4.0.orig/libjava/configure.ac gcc-4.4.0/libjava/configure.ac
    31 --- gcc-4.4.0.orig/libjava/configure.ac	2009-04-09 23:54:28.000000000 +0200
    32 +++ gcc-4.4.0/libjava/configure.ac	2009-05-27 21:38:03.000000000 +0200
    33 @@ -139,6 +139,13 @@
    34  	[allow rebuilding of .class and .h files]))
    35  AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
    36  
    37 +AC_ARG_ENABLE(libjava-multilib,
    38 +	AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
    39 +if test "$enable_libjava_multilib" = no; then
    40 +  multilib=no
    41 +  ac_configure_args="$ac_configure_args --disable-multilib"
    42 +fi
    43 +
    44  # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
    45  GCC_NO_EXECUTABLES
    46