patches/gcc/3.3.3/pr12010.patch
changeset 330 447b203edc2e
parent 329 419d959441ed
child 331 0c05f9ea3254
     1.1 --- a/patches/gcc/3.3.3/pr12010.patch	Tue Aug 14 19:32:22 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,81 +0,0 @@
     1.4 -Adjusted for gcc-3.3-20040119
     1.5 -
     1.6 -See http://gcc.gnu.org/PR12010
     1.7 -
     1.8 -Without this patch, one gets both compile and link time errors in
     1.9 -'make check' when configured for cross-compiling.
    1.10 -
    1.11 -In particular, 'make check' on a cross-compiler fails with
    1.12 -
    1.13 -/testsuite_flags: /testsuite_flags: No such file or directory
    1.14 -    while executing
    1.15 -"exec sh ${odir_v3}/testsuite_flags --build-includes"
    1.16 -    (procedure "g++_include_flags" line 21)
    1.17 -    invoked from within
    1.18 -"g++_include_flags [get_multilibs] "
    1.19 -    (procedure "g++_init" line 63)
    1.20 -    invoked from within
    1.21 -"${tool}_init $test_file_name"
    1.22 -    (procedure "runtest" line 19)
    1.23 -...
    1.24 -make[1]: [check-g++] Error 1 (ignored)
    1.25 -
    1.26 ---- gcc-3.3-20040119/gcc/testsuite/lib/g++.exp.orig	2004-01-25 17:56:24.000000000 -0800
    1.27 -+++ gcc-3.3-20040119/gcc/testsuite/lib/g++.exp	2004-01-25 18:29:44.000000000 -0800
    1.28 -@@ -72,6 +72,8 @@ proc g++_version { } {
    1.29 - #
    1.30 - proc g++_include_flags { paths } {
    1.31 -     global srcdir
    1.32 -+    global objdir
    1.33 -+    global target_triplet
    1.34 -     global HAVE_LIBSTDCXX_V3
    1.35 -     global TESTING_IN_BUILD_TREE
    1.36 - 
    1.37 -@@ -90,6 +92,20 @@ proc g++_include_flags { paths } {
    1.38 - 
    1.39 -     if { ${HAVE_LIBSTDCXX_V3} } {
    1.40 -       set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
    1.41 -+      if { $odir_v3 == "" } {
    1.42 -+          verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
    1.43 -+          # first assume no multilibs
    1.44 -+          set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
    1.45 -+      }
    1.46 -+      if { $odir_v3 == "" } {
    1.47 -+          verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
    1.48 -+          # assume multilib only one level deep
    1.49 -+          set multisub [file tail $gccpath]
    1.50 -+          set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
    1.51 -+      }
    1.52 -+      if { $odir_v3 == "" } {
    1.53 -+           error "Can't find libstdc++-v3"
    1.54 -+      }
    1.55 -       append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
    1.56 -     } else {
    1.57 -       set odir_v2 [lookfor_file ${gccpath} libstdc++]
    1.58 -
    1.59 ---- gcc-3.3-20040119/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old	Sun Jul 13 10:42:01 2003
    1.60 -+++ gcc-3.3-20040119/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp	Sun Jul 13 11:39:54 2003
    1.61 -@@ -48,8 +48,23 @@
    1.62 -     global ld_library_path
    1.63 -     global original_ld_library_path
    1.64 -     global tool_root_dir
    1.65 -+    global target_triplet
    1.66 - 
    1.67 -     set blddir [lookfor_file [get_multilibs] libstdc++-v3]
    1.68 -+    if { $blddir == "" } {
    1.69 -+        set multilibs [get_multilibs]
    1.70 -+        # FIXME: assume multilib only one level deep
    1.71 -+        set multisub [file tail $multilibs]
    1.72 -+        verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
    1.73 -+        set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
    1.74 -+    }
    1.75 -+    if { $blddir == "" } {
    1.76 -+        verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
    1.77 -+        set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
    1.78 -+    }
    1.79 -+    if { $blddir == "" } {
    1.80 -+         error "Can't find libstdc++-v3"
    1.81 -+    }
    1.82 - 
    1.83 -     # By default, we assume we want to run program images.
    1.84 -     global dg-do-what-default