patches/gcc/4.4.4/300-uclibc-conf.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Sep 12 23:51:25 2010 +0200 (2010-09-12)
changeset 2123 ff2181adbd28
child 2148 ada9128c98b8
permissions -rw-r--r--
cc/gcc: disable complibs if not selected

Force gcc to not link with some companion libraries when
there are not needed (because selected-out).

There is no option to tell gcc *not* to build the Graphite and/or
LTO stuff. They *will* be built if gcc finds the suitable companion
libraries. If we do not provide them, but the host has them, then
gcc *will* find them, and link with them.

Consider the following:
- host has suitable PPL and CLooG (eg. Debian Squeeze)
- user wants to build gcc>=4.4
- user de-selects GRAPHITE
- gcc will find the hosts PPL and CLooG, and will use them
- the user moves the toolchain to an older host that does
not have them (eg. Debian Lenny)
- the toolchain fails, when it was properly setup not to

So, explicitly tell gcc *not* to use unneeded companion libs.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 diff -durN gcc-4.4.0.orig/contrib/regression/objs-gcc.sh gcc-4.4.0/contrib/regression/objs-gcc.sh
     2 
     3 diff -durN gcc-4.4.4.orig/contrib/regression/objs-gcc.sh gcc-4.4.4/contrib/regression/objs-gcc.sh
     4 --- gcc-4.4.4.orig/contrib/regression/objs-gcc.sh	2009-04-10 01:23:07.000000000 +0200
     5 +++ gcc-4.4.4/contrib/regression/objs-gcc.sh	2010-05-16 19:36:36.000000000 +0200
     6 @@ -106,6 +106,10 @@
     7   then
     8    make all-gdb all-dejagnu all-ld || exit 1
     9    make install-gdb install-dejagnu install-ld || exit 1
    10 +elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
    11 + then
    12 +  make all-gdb all-dejagnu all-ld || exit 1
    13 +  make install-gdb install-dejagnu install-ld || exit 1
    14  elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
    15    make bootstrap || exit 1
    16    make install || exit 1
    17 diff -durN gcc-4.4.4.orig/libjava/classpath/ltconfig gcc-4.4.4/libjava/classpath/ltconfig
    18 --- gcc-4.4.4.orig/libjava/classpath/ltconfig	2007-06-04 01:18:43.000000000 +0200
    19 +++ gcc-4.4.4/libjava/classpath/ltconfig	2010-05-16 19:36:36.000000000 +0200
    20 @@ -603,7 +603,7 @@
    21  
    22  # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
    23  case $host_os in
    24 -linux-gnu*) ;;
    25 +linux-gnu*|linux-uclibc*) ;;
    26  linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
    27  esac
    28  
    29 @@ -1251,7 +1251,7 @@
    30    ;;
    31  
    32  # This must be Linux ELF.
    33 -linux-gnu*)
    34 +linux*)
    35    version_type=linux
    36    need_lib_prefix=no
    37    need_version=no