This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Make ld testsuite usable outside build directory


Daniel Jacobowitz wrote:

Did you see my mention of [find_gcc]?  Does that work for you?  It will
have the added benefit of using the in-tree compiler when CC is unset
in a combined-tree build.

Yes, that seems to work too. Reading the DejaGNU code for find_gcc does definitely suggest that it is the right thing to use.


I tested an installed compiler, and a just-binutils build directory (with "make check"), and verified that the right CC still got set in both cases. Full disclosure: I did not actually test a combined tree.

This version OK?

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304
Index: config/default.exp
===================================================================
RCS file: /home/cvs/Repository/binutils/ld/testsuite/config/default.exp,v
retrieving revision 1.1.5.1.2.2
diff -c -5 -p -r1.1.5.1.2.2 default.exp
*** config/default.exp	24 Mar 2005 05:36:30 -0000	1.1.5.1.2.2
--- config/default.exp	24 Mar 2005 15:12:37 -0000
*************** if {![file isdirectory tmpdir/ld]} then 
*** 68,81 ****
      catch "exec ln -s ../../ld-new tmpdir/ld/ld" status
  }
  set gcc_ld_flag "-B[pwd]/tmpdir/ld/"
  
  # load the linker path
! load_lib tmpdir/libpath.exp
  
! foreach dir $libpath {
!     set gcc_ld_flag "$gcc_ld_flag -L$dir"
  }
  
  # The mips64-*-linux-gnu compiler defaults to the N32 ABI after
  # installed, but to the O32 ABI in the build tree, because of some
  # specs-file hacks.  Make sure we use an ABI that is compatible with
--- 68,99 ----
      catch "exec ln -s ../../ld-new tmpdir/ld/ld" status
  }
  set gcc_ld_flag "-B[pwd]/tmpdir/ld/"
  
  # load the linker path
! if {[file exists tmpdir/libpath.exp]} {
!     load_lib tmpdir/libpath.exp
  
!     foreach dir $libpath {
! 	set gcc_ld_flag "$gcc_ld_flag -L$dir"
!     }
! }
! 
! # "CC=$(CC_FOR_TARGET)", and other similar parameters.  But, if the
! # user invokes runtest directly (as when testing an installed linker),
! # these flags may not be set.
! if {![info exists CC]} {
!     set CC [find_gcc]
! }
! if {![info exists CFLAGS]} {
!     set CFLAGS "-g -O2"
! }
! if {![info exists CXX]} {
!     set CXX [find_g++]
! }
! if {![info exists CXXFLAGS]} {
!     set CXXFLAGS ""
  }
  
  # The mips64-*-linux-gnu compiler defaults to the N32 ABI after
  # installed, but to the O32 ABI in the build tree, because of some
  # specs-file hacks.  Make sure we use an ABI that is compatible with

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]