This is the mail archive of the 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]

Allow LD testsuite to use in-tree g++

Hi Guys,

  Back in 2012 the gcc project changed the name of the in-tree built C++
  compiler from g++ to xg++:

  Unfortunately the linker testsuite's makefile still looks for an
  executable called g++ when computing CXX_FOR_TARGET.  So I am checking
  in the patch below to fix this.

  This may be a waste of time as I am not sure if a 'built but not
  installed G++ compiler' will actually be able to find the header files
  and libraries that it needs.  But if that turns out to be true then
  the CXX_FOR_TARGET macro needs to be properly rewritten.

2016-02-18  Nick Clifton  <>

	* (CXX_FOR_TARGET): Check for the presence of an
	in-tree xg++ executable after checking for the presence of an
	in-tree g++ executable.
	* Regenerate.

diff --git a/ld/ b/ld/
index 8bfd318..818af5a 100644
--- a/ld/
+++ b/ld/
@@ -122,6 +122,12 @@ CXX_FOR_TARGET = ` \
     else \
       echo $$r/../gcc/g++ -B$$r/../gcc/; \
     fi; \
+  elif [ -f $$r/../gcc/xg++ ] ; then \
+    if [ -f $$r/../newlib/Makefile ] ; then \
+      echo $$r/../gcc/xg++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
+    else \
+      echo $$r/../gcc/xg++ -B$$r/../gcc/; \
+    fi; \
   else \
     if [ "@host@" = "@target@" ] ; then \
       echo $(CXX); \

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