This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Dan,I have removed target_triplet definition in libstdc++.exp and forgot a newline after last if statement in same file
I applied the patch you posted for PR12010. It did not work for me for two reasons.
1. My builddir is in parallel to libstdc++ dir in the source tree. I have to change the order of searching. It will search for a libstdc++ in builddir before srcdir otherwise it was hitting srcdir/libstdc++ and failing if the objdir is created inside the GCC source tree.
2. I use tranform name as a result my target_triplet is different from target_alias and target libraries like libstdc++ are created under folder named after target_alias and not target_triplet.
I have refreshed your patch and now I can run g++ testsuite on arm-linux cross compiler. I wonder if it looks OK to you
Thanks
Khem
------------------------------------------------------------------------
Index: gcc-3.4.4/gcc/testsuite/lib/g++.exp =================================================================== --- gcc-3.4.4.orig/gcc/testsuite/lib/g++.exp 2005-05-02 23:32:40.000000000 +0000 +++ gcc-3.4.4/gcc/testsuite/lib/g++.exp 2005-09-10 12:11:03.000000000 +0000 @@ -72,6 +72,8 @@ proc g++_version { } { # proc g++_include_flags { paths } { global srcdir + global objdir + global target_alias global HAVE_LIBSTDCXX_V3 global TESTING_IN_BUILD_TREE
@@ -83,7 +85,24 @@ proc g++_include_flags { paths } {
set gccpath ${paths}
- set odir [lookfor_file ${gccpath} libstdc++-v3]
+ # first assume no multilibs
+ verbose "g++_include_flags: trying in build directory $objdir"
+ set odir [lookfor_file ${objdir} "$target_alias/libstdc++-v3"]
+
+ if { $odir == "" } {
+ verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, trying multilib"
+ # assume multilib only one level deep
+ set multisub [file tail $gccpath]
+ set odir [lookfor_file ${objdir} "$target_alias/$multisub/libstdc++-v3"]
+ }
+ if { $odir == "" } {
+ verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, now looking in gccpath directory $gccpath"
+ set odir [lookfor_file ${gccpath} libstdc++-v3]
+ }
+ if { $odir == "" } {
+ error "Can't find libstdc++-v3"
+ }
+
if { ${odir} != "" } {
append flags [exec sh ${odir}/scripts/testsuite_flags --build-includes] }
Index: gcc-3.4.4/libstdc++-v3/testsuite/lib/libstdc++.exp
===================================================================
--- gcc-3.4.4.orig/libstdc++-v3/testsuite/lib/libstdc++.exp 2005-05-05 04:09:22.000000000 +0000
+++ gcc-3.4.4/libstdc++-v3/testsuite/lib/libstdc++.exp 2005-09-10 12:13:17.000000000 +0000
@@ -83,10 +83,23 @@ proc libstdc++_init { testfile } {
global includes
global gluefile wrap_flags
global ld_library_path
- global target_triplet
+ global target_alias
set blddir [lookfor_file [get_multilibs] libstdc++-v3] - set flags_file "${blddir}/scripts/testsuite_flags" + if { $blddir == "" } { + set multilibs [get_multilibs] + # FIXME: assume multilib only one level deep + set multisub [file tail $multilibs] + verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir" + set blddir [lookfor_file ${objdir} "$target_alias/$multisub/libstdc++-v3"] + } + if { $blddir == "" } { + verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs" + set blddir [lookfor_file ${objdir} "$target_alias/libstdc++-v3"] + } + if { $blddir == "" } { + error "Can't find libstdc++-v3" + } set flags_file "${blddir}/scripts/testsuite_flags" v3track flags_file 2
# If a test doesn't have special options, use DEFAULT_CXXFLAGS.
------------------------------------------------------------------------
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index: gcc-3.4.4/gcc/testsuite/lib/g++.exp =================================================================== --- gcc-3.4.4.orig/gcc/testsuite/lib/g++.exp 2005-05-02 23:32:40.000000000 +0000 +++ gcc-3.4.4/gcc/testsuite/lib/g++.exp 2005-09-10 12:11:03.000000000 +0000 @@ -72,6 +72,8 @@ proc g++_version { } { # proc g++_include_flags { paths } { global srcdir + global objdir + global target_alias global HAVE_LIBSTDCXX_V3 global TESTING_IN_BUILD_TREE @@ -83,7 +85,24 @@ proc g++_include_flags { paths } { set gccpath ${paths} - set odir [lookfor_file ${gccpath} libstdc++-v3] + # first assume no multilibs + verbose "g++_include_flags: trying in build directory $objdir" + set odir [lookfor_file ${objdir} "$target_alias/libstdc++-v3"] + + if { $odir == "" } { + verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, trying multilib" + # assume multilib only one level deep + set multisub [file tail $gccpath] + set odir [lookfor_file ${objdir} "$target_alias/$multisub/libstdc++-v3"] + } + if { $odir == "" } { + verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, now looking in gccpath directory $gccpath" + set odir [lookfor_file ${gccpath} libstdc++-v3] + } + if { $odir == "" } { + error "Can't find libstdc++-v3" + } + if { ${odir} != "" } { append flags [exec sh ${odir}/scripts/testsuite_flags --build-includes] } Index: gcc-3.4.4/libstdc++-v3/testsuite/lib/libstdc++.exp =================================================================== --- gcc-3.4.4.orig/libstdc++-v3/testsuite/lib/libstdc++.exp 2005-05-05 04:09:22.000000000 +0000 +++ gcc-3.4.4/libstdc++-v3/testsuite/lib/libstdc++.exp 2005-09-13 00:42:54.000000000 +0000 @@ -83,12 +83,26 @@ proc libstdc++_init { testfile } { global includes global gluefile wrap_flags global ld_library_path + global target_alias global target_triplet set blddir [lookfor_file [get_multilibs] libstdc++-v3] + if { $blddir == "" } { + set multilibs [get_multilibs] + # FIXME: assume multilib only one level deep + set multisub [file tail $multilibs] + verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir" + set blddir [lookfor_file ${objdir} "$target_alias/$multisub/libstdc++-v3"] + } + if { $blddir == "" } { + verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs" + set blddir [lookfor_file ${objdir} "$target_alias/libstdc++-v3"] + } + if { $blddir == "" } { + error "Can't find libstdc++-v3" + } set flags_file "${blddir}/scripts/testsuite_flags" v3track flags_file 2 - # If a test doesn't have special options, use DEFAULT_CXXFLAGS. # Use this variable if the behavior # 1) only applies to libstdc++ testing
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |