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]
Other format: [Raw text]

site.exp: set tool_root_dir


Runtest assumes that all testsuites are in either $TOP/tool or
$TOP/tool/testsuite, and uses that assumption to determine what $TOP
is so it can set tool_root_dir.  Since we put testsuites in
$TOP/gcc/testsuite/$TOOL, runtest no longer sets tool_root_dir
properly (it gets set to $TOP/gcc/testsuite).  This patch sets it
explicitly in site.exp.  Ok to apply?  This primarily effects
xstormy16 when it uses an in-tree sid, which you just can't find
without a properly set tool_root_dir.

Looks like libstdc++ will need a suitable patch, too.

	* Makefile.in: Set tool_root_dir.

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 146472)
+++ Makefile.in	(working copy)
@@ -4253,12 +4253,15 @@ site.exp: ./config.status Makefile
 	-@mv site.exp site.bak
 	@echo "## these variables are automatically generated by make ##" > ./tmp0
 	@echo "# Do not edit here. If you wish to override these values" >> ./tmp0
 	@echo "# add them to the last section" >> ./tmp0
 	@echo "set rootme \"`${PWD_COMMAND}`\"" >> ./tmp0
 	@echo "set srcdir \"`cd ${srcdir}; ${PWD_COMMAND}`\"" >> ./tmp0
+# Since we moved testsuites into subdirs of $(objdir)/testsuite,
+# runtest can't find the build top, so we must specify it.
+	@echo "set tool_root_dir \"`cd ${objdir}/..; ${PWD_COMMAND}`\"" >> ./tmp0
 	@echo "set host_triplet $(host)" >> ./tmp0
 	@echo "set build_triplet $(build)" >> ./tmp0
 	@echo "set target_triplet $(target)" >> ./tmp0
 	@echo "set target_alias $(target_noncanonical)" >> ./tmp0
 	@echo "set libiconv \"$(LIBICONV)\"" >> ./tmp0
 # CFLAGS is set even though it's empty to show we reserve the right to set it.


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