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