PATCH: Use g++, not xgcc, building things

Mark Mitchell mark@codesourcery.com
Mon Jan 24 13:04:00 GMT 2000


Since no one objected when I posted this patch with a RFC, I've
checked it in.  This makes the libraries and testsuite for g++ use
`g++', not `xgcc', to build things.  That makes sure that stuff in
g++spec.c happens during build/test, which is important.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2000-01-24  Mark Mitchell  <mark@codesourcery.com>

	* Makefile.in (CXX_FOR_TARGET): Use g++, not xgcc, to invoke
	the C++ compiler.

2000-01-24  Mark Mitchell  <mark@codesourcery.com>

	* lib/g++.exp (g++init): Use g++, not xgcc, to invoke the C++
	compiler.
	(tool_option_proc): Fix typo.
	
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.42
diff -c -p -r1.42 Makefile.in
*** Makefile.in	2000/01/12 11:01:26	1.42
--- Makefile.in	2000/01/24 18:09:16
*************** CHILL_FOR_TARGET = ` \
*** 247,261 ****
    fi`
  
  CXX_FOR_TARGET = ` \
!   if [ -f $$r/gcc/xgcc ] ; then \
      if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
        if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
!         echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$(build_tooldir)/bin/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
        else \
!         echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
        fi; \
      else \
!       echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \
      fi; \
    else \
      if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
--- 247,261 ----
    fi`
  
  CXX_FOR_TARGET = ` \
!   if [ -f $$r/gcc/g++ ] ; then \
      if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
        if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
!         echo $$r/gcc/g++ -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -B$(build_tooldir)/bin/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
        else \
!         echo $$r/gcc/g++ -B$$r/gcc/ -B$(build_tooldir)/bin/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
        fi; \
      else \
!       echo $$r/gcc/g++ -B$$r/gcc/ -B$(build_tooldir)/bin/; \
      fi; \
    else \
      if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
Index: gcc/testsuite/lib/g++.exp
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/lib/g++.exp,v
retrieving revision 1.5
diff -c -p -r1.5 g++.exp
*** g++.exp	1999/02/27 10:37:09	1.5
--- g++.exp	2000/01/24 18:09:24
***************
*** 1,4 ****
! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
*************** proc g++_init { args } {
*** 85,91 ****
  	    if [is_remote host] {
  		set GXX_UNDER_TEST [transform c++]
  	    } else {
! 		set GXX_UNDER_TEST [findfile $base_dir/../xgcc "$base_dir/../xgcc -B$base_dir/../" [findfile $base_dir/xgcc "$base_dir/xgcc -B$base_dir/" [transform c++]]]
  	    }
  	}
      }
--- 85,91 ----
  	    if [is_remote host] {
  		set GXX_UNDER_TEST [transform c++]
  	    } else {
! 		set GXX_UNDER_TEST [findfile $base_dir/../g++ "$base_dir/../g++ -B$base_dir/../" [findfile $base_dir/g++ "$base_dir/g++ -B$base_dir/" [transform c++]]]
  	    }
  	}
      }
*************** proc g++_init { args } {
*** 97,103 ****
  
      if ![is_remote host] {
  	if { [which $GXX_UNDER_TEST] == 0 } then {
! 	    perror "GXX_UNDER_TEST does not exist"
  	    exit 1
  	}
      }
--- 97,103 ----
  
      if ![is_remote host] {
  	if { [which $GXX_UNDER_TEST] == 0 } then {
! 	    perror "GXX_UNDER_TEST ($GXX_UNDER_TEST) does not exist"
  	    exit 1
  	}
      }
*************** proc ${tool}_option_help { } {
*** 221,227 ****
  }
  
  proc ${tool}_option_proc { option } {
!     if[regexp "^--additional_options," $option] {
  	global gpp_compile_options
  	regsub "--additional_options," $option "" option
  	foreach x [split $option ","] {
--- 221,227 ----
  }
  
  proc ${tool}_option_proc { option } {
!     if [regexp "^--additional_options," $option] {
  	global gpp_compile_options
  	regsub "--additional_options," $option "" option
  	foreach x [split $option ","] {


More information about the Gcc-patches mailing list