patches/gcc/4.4.2/120-java-nomulti.patch
author Anthony Foiani <anthony.foiani@gmail.com>
Thu May 19 23:09:43 2011 +0200 (2011-05-19)
branch1.11
changeset 2465 5f98b7a90fbc
parent 1544 2228ea3f6b79
permissions -rw-r--r--
complibs/ppl: fix 0.11-0.11.2 to compile with --disable-shared

PPL 0.11 (through 0.11.2) had a small bug where it still tried to build
and test its Java interface even when shared libraries are disabled.
Since that's exactly what ct-ng does, it explodes.

This is the patch from the PPL authors (see final link below).

More information can be found in these messages/threads:

Anthony's initial report and analysis with Yann:
http://www.cygwin.com/ml/crossgcc/2011-05/msg00046.html

Ron Flory hit the same problem:
http://www.cygwin.com/ml/crossgcc/2011-05/msg00054.html

Anthony's report to the ppl-devel list:
http://www.cs.unipr.it/pipermail/ppl-devel/2011-May/017450.html

Roberto's reply with a link to the fix in the PPL git repo:
http://www.cs.unipr.it/pipermail/ppl-devel/2011-May/017455.html

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
(transplanted from 139b85d70b623e51f7585e7c64ecb8c6a6cf4567)
     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