patches/gcc/4.4.2/230-superh-default-multilib.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Oct 08 23:37:12 2010 +0200 (2010-10-08)
branch1.8
changeset 2150 f97a8ad2b172
parent 1544 2228ea3f6b79
permissions -rw-r--r--
cc/gcc: fix C++ headers location

In case we build the C++ compiler, we have to tell gcc where to put the C++
headers, or else it will try to # put it in prefix/tuple/include, which we
make a symlink to sysroot/usr/include during the build, and that we delete
(the symlink!) after the build, but gcc will not look in sysroot/usr/inlcude
for C++ headers by default.

Implements a fix suggested by: Bryan Hundven <bryanhundven@gmail.com>

Reported-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from a0924619112015bdaa81a0a2313d21ef38607bc2)
yann@1393
     1
diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
yann@1393
     2
--- gcc-4.4.0.orig/gcc/config.gcc	2009-04-17 13:58:41.000000000 +0200
yann@1393
     3
+++ gcc-4.4.0/gcc/config.gcc	2009-05-27 21:38:31.000000000 +0200
yann@1393
     4
@@ -2121,7 +2121,7 @@
yann@1393
     5
 	if test x${sh_multilibs} = x ; then
yann@1393
     6
 		case ${target} in
yann@1393
     7
 		sh64-superh-linux* | \
yann@1393
     8
-		sh[1234]*)	sh_multilibs=${sh_cpu_target} ;;
yann@1393
     9
+		sh[1234]*)	sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;;
yann@1393
    10
 		sh64* | sh5*)	sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
yann@1393
    11
 		sh-superh-*)	sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
yann@1393
    12
 		sh*-*-linux*)	sh_multilibs=m1,m3e,m4 ;;