This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: Add libstdc++/ to library search path when constructing CXX_FOR_TARGET


Hi Jim,

: Actually, we need to add the -L option to every line in CXX_FOR_TARGET
: that uses g++ from the build tree.  Not just the non-newlib case.  This
: was just a quick hack to get Syd going.  I mentioned that the patch was
: incomplete, but he apparently didn't pass that along.

Ah, thanks - I have attached a modified patch below.  I assume that
this version is what you had in mind ?

Shall I check this version in ?

Cheers
	Nick


2000-07-05  Jim Wilson  <wilson@cygnus.com>

	* Makefile.in (CXX_FOR_TARGET): Add libstdc++ to the library
	search path for a g++ extracted from the build tree.  This
	will allow link tests run by configure scripts in
	subdirectories to succeed.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.47
diff -p -r1.47 Makefile.in
*** Makefile.in	2000/05/18 04:15:51	1.47
--- Makefile.in	2000/07/06 00:01:43
*************** CXX_FOR_TARGET = ` \
*** 258,275 ****
      if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
        case "$(target_canonical)" in \
          i[3456]86-*-cygwin*) \
!           echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/cygwin/include -idirafter $$s/winsup/w32api/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
            ;; \
          *) \
            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; \
  	  ;; \
        esac \
      else \
!       echo $$r/gcc/g++ -B$$r/gcc/ -B$(build_tooldir)/bin/; \
      fi; \
    else \
      if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
--- 258,275 ----
      if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
        case "$(target_canonical)" in \
          i[3456]86-*-cygwin*) \
!           echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/cygwin/include -idirafter $$s/winsup/w32api/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc -L$$r/$(TARGET_SUBDIR)/libstdc++; \
            ;; \
          *) \
            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 -L$$r/$(TARGET_SUBDIR)/libstdc++; \
            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 -L$$r/$(TARGET_SUBDIR)/libstdc++; \
            fi; \
  	  ;; \
        esac \
      else \
!       echo $$r/gcc/g++ -B$$r/gcc/ -B$(build_tooldir)/bin/ -L$$r/$(TARGET_SUBDIR)/libstdc++; \
      fi; \
    else \
      if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \


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