public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/4][PR 71931] Fix target lib tests --with-build-sysroot
@ 2016-08-24 19:04 Szabolcs Nagy
  2016-08-24 19:06 ` [PATCH 1/4][PR 71931] Fix libatomic tests Szabolcs Nagy
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Szabolcs Nagy @ 2016-08-24 19:04 UTC (permalink / raw)
  Cc: nd, gcc-patches

The dejagnu find_gcc function cannot handle if CC needs extra flags
like --sysroot. So for testing target libraries use the same CC that
was used for building the target libs.

New patch works even if runtest is not invoked from make as discussed
https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01320.html

Szabolcs Nagy (4):
  [PR 71931] Fix libatomic tests
  [PR 71931] Fix libgomp tests
  [PR 71931] Fix libitm tests
  [RFC][PR 71931] Fix libvtv tests

 libatomic/configure                               |    5 +++-
 libatomic/configure.ac                            |    1 +
 libatomic/testsuite/Makefile.am                   |    2 ++
 libatomic/testsuite/Makefile.in                   |   33 ++++++++++++---------
 libatomic/testsuite/lib/libatomic.exp             |    5 ++++
 libatomic/testsuite/libatomic-test-support.exp.in |    1 +
 libgomp/testsuite/lib/libgomp.exp                 |    3 ++
 libgomp/testsuite/libgomp-test-support.exp.in     |    2 ++
 libitm/configure                                  |    7 +++--
 libitm/configure.ac                               |    1 +
 libitm/testsuite/Makefile.am                      |    2 ++
 libitm/testsuite/Makefile.in                      |   33 ++++++++++++---------
 libitm/testsuite/lib/libitm.exp                   |    5 ++++
 libitm/testsuite/libitm-test-support.exp.in       |    1 +
 libvtv/Makefile.am                                |    4 +--
 libvtv/Makefile.in                                |    4 +--
 libvtv/configure                                  |    3 ++
 libvtv/configure.ac                               |    1 +
 libvtv/testsuite/Makefile.am                      |    2 ++
 libvtv/testsuite/Makefile.in                      |   33 ++++++++++++---------
 libvtv/testsuite/lib/libvtv.exp                   |    5 ++++
 libvtv/testsuite/libvtv-test-support.exp.in       |    1 +
 22 files changed, 105 insertions(+), 49 deletions(-)
 create mode 100644 libatomic/testsuite/libatomic-test-support.exp.in
 create mode 100644 libitm/testsuite/libitm-test-support.exp.in
 create mode 100644 libvtv/testsuite/libvtv-test-support.exp.in

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4][PR 71931] Fix libatomic tests
  2016-08-24 19:04 [PATCH 0/4][PR 71931] Fix target lib tests --with-build-sysroot Szabolcs Nagy
@ 2016-08-24 19:06 ` Szabolcs Nagy
  2016-08-24 22:08   ` Joseph Myers
  2016-08-24 19:07 ` [PATCH 2/4][PR 71931] Fix libgomp tests Szabolcs Nagy
  2016-08-24 19:09 ` [PATCH 3/4][PR 71931] Fix libitm tests Szabolcs Nagy
  2 siblings, 1 reply; 11+ messages in thread
From: Szabolcs Nagy @ 2016-08-24 19:06 UTC (permalink / raw)
  Cc: nd, gcc-patches, Jakub Jelinek

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

Pass build time CC make var down to dejagnu so the sysroot
is set correctly when gcc is built with --with-build-sysroot.

libatomic/
2016-08-24  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	PR testsuite/71931
	* configure.ac: Add AC_CONFIG_FILES.
	* configure: Regenerated.
	* testuite/Makefile.am: Add rule for libatomic-test-support.exp.
	* testuite/Makefile.in: Regenerated.
	* testuite/libatomic-test-support.exp.in: New.
	* testuite/lib/libatomic.exp (libatomic_init): Use BUILD_CC.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libatomic.diff --]
[-- Type: text/x-patch; name=libatomic.diff, Size: 6977 bytes --]

diff --git a/libatomic/configure b/libatomic/configure
index 8526abf..d185e9d 100755
--- a/libatomic/configure
+++ b/libatomic/configure
@@ -9083,7 +9083,7 @@ _LT_EOF
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
@@ -15264,6 +15264,8 @@ fi
 
 ac_config_files="$ac_config_files Makefile testsuite/Makefile"
 
+ac_config_files="$ac_config_files testsuite/libatomic-test-support.exp"
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -16312,6 +16314,7 @@ do
     "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
+    "testsuite/libatomic-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libatomic-test-support.exp" ;;
 
   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
diff --git a/libatomic/configure.ac b/libatomic/configure.ac
index cf40ea1..7ed2bcc 100644
--- a/libatomic/configure.ac
+++ b/libatomic/configure.ac
@@ -261,4 +261,5 @@ else
 fi
 
 AC_CONFIG_FILES(Makefile testsuite/Makefile)
+AC_CONFIG_FILES(testsuite/libatomic-test-support.exp)
 AC_OUTPUT
diff --git a/libatomic/testsuite/Makefile.am b/libatomic/testsuite/Makefile.am
index 561b7e2..6c5e5fc 100644
--- a/libatomic/testsuite/Makefile.am
+++ b/libatomic/testsuite/Makefile.am
@@ -11,3 +11,5 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
 _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
 	     echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
 RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
+
+all-local: libatomic-test-support.exp
diff --git a/libatomic/testsuite/Makefile.in b/libatomic/testsuite/Makefile.in
index 34f83e0..16f28fa 100644
--- a/libatomic/testsuite/Makefile.in
+++ b/libatomic/testsuite/Makefile.in
@@ -52,7 +52,8 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 subdir = testsuite
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(srcdir)/libatomic-test-support.exp.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
@@ -69,7 +70,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/auto-config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = libatomic-test-support.exp
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 am__can_run_installinfo = \
@@ -255,6 +256,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
+libatomic-test-support.exp: $(top_builddir)/config.status $(srcdir)/libatomic-test-support.exp.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -315,7 +318,7 @@ distclean-DEJAGNU:
 check-am: all-am
 	$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
 check: check-am
-all-am: Makefile
+all-am: Makefile all-local
 installdirs:
 install: install-am
 install-exec: install-exec-am
@@ -415,19 +418,21 @@ uninstall-am:
 
 .MAKE: check-am install-am install-strip
 
-.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
-	clean-libtool distclean distclean-DEJAGNU distclean-generic \
-	distclean-libtool dvi dvi-am html html-am info info-am install \
-	install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am
+.PHONY: all all-am all-local check check-DEJAGNU check-am clean \
+	clean-generic clean-libtool distclean distclean-DEJAGNU \
+	distclean-generic distclean-libtool dvi dvi-am html html-am \
+	info info-am install install-am install-data install-data-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am
 
 
+all-local: libatomic-test-support.exp
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/libatomic/testsuite/lib/libatomic.exp b/libatomic/testsuite/lib/libatomic.exp
index cafab54..e374c64 100644
--- a/libatomic/testsuite/lib/libatomic.exp
+++ b/libatomic/testsuite/lib/libatomic.exp
@@ -47,6 +47,8 @@ load_gcc_lib timeout.exp
 load_gcc_lib timeout-dg.exp
 load_gcc_lib fortran-modules.exp
 
+load_file libatomic-test-support.exp
+
 set dg-do-what-default run
 
 #
@@ -74,6 +76,7 @@ proc libatomic_init { args } {
     global ALWAYS_CFLAGS
     global CFLAGS
     global TOOL_EXECUTABLE TOOL_OPTIONS
+    global BUILD_CC
     global GCC_UNDER_TEST
     global TESTING_IN_BUILD_TREE
     global target_triplet
@@ -89,6 +92,8 @@ proc libatomic_init { args } {
     if ![info exists GCC_UNDER_TEST] then {
 	if [info exists TOOL_EXECUTABLE] {
 	    set GCC_UNDER_TEST $TOOL_EXECUTABLE
+	} elseif [info exists BUILD_CC] {
+	    set GCC_UNDER_TEST $BUILD_CC
 	} else {
 	    set GCC_UNDER_TEST "[find_gcc]"
 	}
diff --git a/libatomic/testsuite/libatomic-test-support.exp.in b/libatomic/testsuite/libatomic-test-support.exp.in
new file mode 100644
index 0000000..972f8d5
--- /dev/null
+++ b/libatomic/testsuite/libatomic-test-support.exp.in
@@ -0,0 +1 @@
+set BUILD_CC "@CC@"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/4][PR 71931] Fix libgomp tests
  2016-08-24 19:04 [PATCH 0/4][PR 71931] Fix target lib tests --with-build-sysroot Szabolcs Nagy
  2016-08-24 19:06 ` [PATCH 1/4][PR 71931] Fix libatomic tests Szabolcs Nagy
@ 2016-08-24 19:07 ` Szabolcs Nagy
  2016-08-24 19:09 ` [PATCH 3/4][PR 71931] Fix libitm tests Szabolcs Nagy
  2 siblings, 0 replies; 11+ messages in thread
From: Szabolcs Nagy @ 2016-08-24 19:07 UTC (permalink / raw)
  Cc: nd, gcc-patches, Jakub Jelinek

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

Pass build time CC make var down to dejagnu so the sysroot
is set correctly when gcc is built with --with-build-sysroot.

Existing libgomp-test-support.exp.in machinery is used.

libgomp/
2016-08-23  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	PR testsuite/71931
	* testuite/libgomp-test-support.exp.in: Add BUILD_CC.
	* testuite/lib/libgomp.exp (libgomp_init): Use BUILD_CC.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libgomp.diff --]
[-- Type: text/x-patch; name=libgomp.diff, Size: 1174 bytes --]

diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index 1cb4991..398ba1f 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -85,6 +85,7 @@ proc libgomp_init { args } {
     global ALWAYS_CFLAGS
     global CFLAGS
     global TOOL_EXECUTABLE TOOL_OPTIONS
+    global BUILD_CC
     global GCC_UNDER_TEST
     global TESTING_IN_BUILD_TREE
     global target_triplet
@@ -107,6 +108,8 @@ proc libgomp_init { args } {
     if ![info exists GCC_UNDER_TEST] then {
 	if [info exists TOOL_EXECUTABLE] {
 	    set GCC_UNDER_TEST $TOOL_EXECUTABLE
+	} elseif [info exists BUILD_CC] {
+	    set GCC_UNDER_TEST $BUILD_CC
 	} else {
 	    set GCC_UNDER_TEST "[find_gcc]"
 	}
diff --git a/libgomp/testsuite/libgomp-test-support.exp.in b/libgomp/testsuite/libgomp-test-support.exp.in
index 5a724fb..b3cb4c7 100644
--- a/libgomp/testsuite/libgomp-test-support.exp.in
+++ b/libgomp/testsuite/libgomp-test-support.exp.in
@@ -1,3 +1,5 @@
+set BUILD_CC "@CC@"
+
 set cuda_driver_include "@CUDA_DRIVER_INCLUDE@"
 set cuda_driver_lib "@CUDA_DRIVER_LIB@"
 set hsa_runtime_lib "@HSA_RUNTIME_LIB@"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/4][PR 71931] Fix libitm tests
  2016-08-24 19:04 [PATCH 0/4][PR 71931] Fix target lib tests --with-build-sysroot Szabolcs Nagy
  2016-08-24 19:06 ` [PATCH 1/4][PR 71931] Fix libatomic tests Szabolcs Nagy
  2016-08-24 19:07 ` [PATCH 2/4][PR 71931] Fix libgomp tests Szabolcs Nagy
@ 2016-08-24 19:09 ` Szabolcs Nagy
  2016-09-06  9:12   ` Torvald Riegel
  2 siblings, 1 reply; 11+ messages in thread
From: Szabolcs Nagy @ 2016-08-24 19:09 UTC (permalink / raw)
  Cc: nd, gcc-patches, Torvald Riegel

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

Pass build time CC make var down to dejagnu so the sysroot
is set correctly when gcc is built with --with-build-sysroot.

libitm/
2016-08-24  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	PR testsuite/71931
	* configure.ac: Add AC_CONFIG_FILES.
	* configure: Regenerated.
	* testuite/Makefile.am: Add rule for libitm-test-support.exp.
	* testuite/Makefile.in: Regenerated.
	* testuite/libitm-test-support.exp.in: New.
	* testuite/lib/libitm.exp (libitm_init): Use BUILD_CC.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libitm.diff --]
[-- Type: text/x-patch; name=libitm.diff, Size: 7856 bytes --]

diff --git a/libitm/configure b/libitm/configure
index 55332bb..09fd041 100644
--- a/libitm/configure
+++ b/libitm/configure
@@ -9762,7 +9762,7 @@ _LT_EOF
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
@@ -14248,7 +14248,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
       export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     else
-      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
@@ -17638,6 +17638,8 @@ fi
 
 ac_config_files="$ac_config_files Makefile testsuite/Makefile libitm.spec"
 
+ac_config_files="$ac_config_files testsuite/libitm-test-support.exp"
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -18799,6 +18801,7 @@ do
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
     "libitm.spec") CONFIG_FILES="$CONFIG_FILES libitm.spec" ;;
+    "testsuite/libitm-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libitm-test-support.exp" ;;
 
   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
diff --git a/libitm/configure.ac b/libitm/configure.ac
index 3875aa0..70ce8dc 100644
--- a/libitm/configure.ac
+++ b/libitm/configure.ac
@@ -287,4 +287,5 @@ AM_CONDITIONAL([ARCH_X86_AVX], [test "$libitm_cv_as_avx" = yes])
 AM_CONDITIONAL([ARCH_FUTEX], [test $enable_linux_futex = yes])
 
 AC_CONFIG_FILES(Makefile testsuite/Makefile libitm.spec)
+AC_CONFIG_FILES(testsuite/libitm-test-support.exp)
 AC_OUTPUT
diff --git a/libitm/testsuite/Makefile.am b/libitm/testsuite/Makefile.am
index 561b7e2..688d48f 100644
--- a/libitm/testsuite/Makefile.am
+++ b/libitm/testsuite/Makefile.am
@@ -11,3 +11,5 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
 _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
 	     echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
 RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
+
+all-local: libitm-test-support.exp
diff --git a/libitm/testsuite/Makefile.in b/libitm/testsuite/Makefile.in
index 4d79781..8b7bc8e 100644
--- a/libitm/testsuite/Makefile.in
+++ b/libitm/testsuite/Makefile.in
@@ -52,7 +52,8 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 subdir = testsuite
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(srcdir)/libitm-test-support.exp.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/asmcfi.m4 \
@@ -74,7 +75,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = libitm-test-support.exp
 CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 am__can_run_installinfo = \
@@ -265,6 +266,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
+libitm-test-support.exp: $(top_builddir)/config.status $(srcdir)/libitm-test-support.exp.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -325,7 +328,7 @@ distclean-DEJAGNU:
 check-am: all-am
 	$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
 check: check-am
-all-am: Makefile
+all-am: Makefile all-local
 installdirs:
 install: install-am
 install-exec: install-exec-am
@@ -425,19 +428,21 @@ uninstall-am:
 
 .MAKE: check-am install-am install-strip
 
-.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
-	clean-libtool distclean distclean-DEJAGNU distclean-generic \
-	distclean-libtool dvi dvi-am html html-am info info-am install \
-	install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am install-man \
-	install-pdf install-pdf-am install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am
+.PHONY: all all-am all-local check check-DEJAGNU check-am clean \
+	clean-generic clean-libtool distclean distclean-DEJAGNU \
+	distclean-generic distclean-libtool dvi dvi-am html html-am \
+	info info-am install install-am install-data install-data-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am uninstall uninstall-am
 
 
+all-local: libitm-test-support.exp
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp
index 0416296..a896e02 100644
--- a/libitm/testsuite/lib/libitm.exp
+++ b/libitm/testsuite/lib/libitm.exp
@@ -47,6 +47,8 @@ load_gcc_lib timeout-dg.exp
 load_gcc_lib torture-options.exp
 load_gcc_lib fortran-modules.exp
 
+load_file libitm-test-support.exp
+
 set dg-do-what-default run
 
 #
@@ -74,6 +76,7 @@ proc libitm_init { args } {
     global ALWAYS_CFLAGS
     global CFLAGS
     global TOOL_EXECUTABLE TOOL_OPTIONS
+    global BUILD_CC
     global GCC_UNDER_TEST
     global TESTING_IN_BUILD_TREE
     global target_triplet
@@ -89,6 +92,8 @@ proc libitm_init { args } {
     if ![info exists GCC_UNDER_TEST] then {
 	if [info exists TOOL_EXECUTABLE] {
 	    set GCC_UNDER_TEST $TOOL_EXECUTABLE
+	} elseif [info exists BUILD_CC] {
+	    set GCC_UNDER_TEST $BUILD_CC
 	} else {
 	    set GCC_UNDER_TEST "[find_gcc]"
 	}
diff --git a/libitm/testsuite/libitm-test-support.exp.in b/libitm/testsuite/libitm-test-support.exp.in
new file mode 100644
index 0000000..972f8d5
--- /dev/null
+++ b/libitm/testsuite/libitm-test-support.exp.in
@@ -0,0 +1 @@
+set BUILD_CC "@CC@"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4][PR 71931] Fix libatomic tests
  2016-08-24 19:06 ` [PATCH 1/4][PR 71931] Fix libatomic tests Szabolcs Nagy
@ 2016-08-24 22:08   ` Joseph Myers
  2016-08-25  8:45     ` Szabolcs Nagy
  0 siblings, 1 reply; 11+ messages in thread
From: Joseph Myers @ 2016-08-24 22:08 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: nd, gcc-patches, Jakub Jelinek

On Wed, 24 Aug 2016, Szabolcs Nagy wrote:

> diff --git a/libatomic/testsuite/lib/libatomic.exp b/libatomic/testsuite/lib/libatomic.exp
> index cafab54..e374c64 100644
> --- a/libatomic/testsuite/lib/libatomic.exp
> +++ b/libatomic/testsuite/lib/libatomic.exp
> @@ -47,6 +47,8 @@ load_gcc_lib timeout.exp
>  load_gcc_lib timeout-dg.exp
>  load_gcc_lib fortran-modules.exp
>  
> +load_file libatomic-test-support.exp

This approach looks like it would break installed testing.  Such 
information from the build tree should only be loaded when 
TESTING_IN_BUILD_TREE is defined.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4][PR 71931] Fix libatomic tests
  2016-08-24 22:08   ` Joseph Myers
@ 2016-08-25  8:45     ` Szabolcs Nagy
  2016-08-25 23:04       ` Joseph Myers
  0 siblings, 1 reply; 11+ messages in thread
From: Szabolcs Nagy @ 2016-08-25  8:45 UTC (permalink / raw)
  To: Joseph Myers; +Cc: nd, gcc-patches, Jakub Jelinek

On 24/08/16 23:08, Joseph Myers wrote:
> On Wed, 24 Aug 2016, Szabolcs Nagy wrote:
> 
>> diff --git a/libatomic/testsuite/lib/libatomic.exp b/libatomic/testsuite/lib/libatomic.exp
>> index cafab54..e374c64 100644
>> --- a/libatomic/testsuite/lib/libatomic.exp
>> +++ b/libatomic/testsuite/lib/libatomic.exp
>> @@ -47,6 +47,8 @@ load_gcc_lib timeout.exp
>>  load_gcc_lib timeout-dg.exp
>>  load_gcc_lib fortran-modules.exp
>>  
>> +load_file libatomic-test-support.exp
> 
> This approach looks like it would break installed testing.  Such 
> information from the build tree should only be loaded when 
> TESTING_IN_BUILD_TREE is defined.
> 

i followed the solution in libgomp for passing
offloading parameters.

it seems TESTING_IN_BUILD_TREE is not set in
target lib site.exp so that should be wired
up somehow.

i'm not sure how installed testing works, if
it does not use the build tree site.exp, then
i can try to add BUILD_CC to site.exp.
(there is an EXTRA_DEJAGNU_SITE_CONFIG hook)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4][PR 71931] Fix libatomic tests
  2016-08-25  8:45     ` Szabolcs Nagy
@ 2016-08-25 23:04       ` Joseph Myers
  0 siblings, 0 replies; 11+ messages in thread
From: Joseph Myers @ 2016-08-25 23:04 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: nd, gcc-patches, Jakub Jelinek

On Thu, 25 Aug 2016, Szabolcs Nagy wrote:

> i'm not sure how installed testing works, if
> it does not use the build tree site.exp, then
> i can try to add BUILD_CC to site.exp.
> (there is an EXTRA_DEJAGNU_SITE_CONFIG hook)

It does not use the build tree site.exp.  You generate site.exp in some 
unspecified way (contrib/test_installed is bitrotten) and then use runtest 
to run the testsuite.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4][PR 71931] Fix libitm tests
  2016-08-24 19:09 ` [PATCH 3/4][PR 71931] Fix libitm tests Szabolcs Nagy
@ 2016-09-06  9:12   ` Torvald Riegel
  2016-09-06 18:06     ` Mike Stump
  0 siblings, 1 reply; 11+ messages in thread
From: Torvald Riegel @ 2016-09-06  9:12 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: nd, gcc-patches

On Wed, 2016-08-24 at 20:08 +0100, Szabolcs Nagy wrote:
> Pass build time CC make var down to dejagnu so the sysroot
> is set correctly when gcc is built with --with-build-sysroot.
> 
> libitm/
> 2016-08-24  Szabolcs Nagy  <szabolcs.nagy@arm.com>
> 
> 	PR testsuite/71931
> 	* configure.ac: Add AC_CONFIG_FILES.
> 	* configure: Regenerated.
> 	* testuite/Makefile.am: Add rule for libitm-test-support.exp.
> 	* testuite/Makefile.in: Regenerated.
> 	* testuite/libitm-test-support.exp.in: New.
> 	* testuite/lib/libitm.exp (libitm_init): Use BUILD_CC.
> 

I don't know enough about the build system to really review this.  If a
similar patch has been ACKed and applied for libatomic (71931 states
that both are affected), then I guess this is OK?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4][PR 71931] Fix libitm tests
  2016-09-06  9:12   ` Torvald Riegel
@ 2016-09-06 18:06     ` Mike Stump
  2016-09-06 18:49       ` Szabolcs Nagy
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Stump @ 2016-09-06 18:06 UTC (permalink / raw)
  To: Torvald Riegel; +Cc: Szabolcs Nagy, nd, gcc-patches

On Sep 6, 2016, at 2:11 AM, Torvald Riegel <triegel@redhat.com> wrote:
> 
> On Wed, 2016-08-24 at 20:08 +0100, Szabolcs Nagy wrote:
>> Pass build time CC make var down to dejagnu so the sysroot
>> is set correctly when gcc is built with --with-build-sysroot.
>> 
>> libitm/
>> 2016-08-24  Szabolcs Nagy  <szabolcs.nagy@arm.com>
>> 
>> 	PR testsuite/71931
>> 	* configure.ac: Add AC_CONFIG_FILES.
>> 	* configure: Regenerated.
>> 	* testuite/Makefile.am: Add rule for libitm-test-support.exp.
>> 	* testuite/Makefile.in: Regenerated.
>> 	* testuite/libitm-test-support.exp.in: New.
>> 	* testuite/lib/libitm.exp (libitm_init): Use BUILD_CC.
>> 
> 
> I don't know enough about the build system to really review this.  If a
> similar patch has been ACKed and applied for libatomic (71931 states
> that both are affected), then I guess this is OK?

I was hoping that someone else might review it, but i can see why no one else can or wants to.

Sorry for the feet dragging, Ok.  If libatomic has the same problem, and a similar solutions works there, Ok to fix it as well.

If someone wants to do a little work to make fortran libstdc++ and the other two use the same mechanism, that would be nice.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4][PR 71931] Fix libitm tests
  2016-09-06 18:06     ` Mike Stump
@ 2016-09-06 18:49       ` Szabolcs Nagy
  2016-09-06 20:26         ` Mike Stump
  0 siblings, 1 reply; 11+ messages in thread
From: Szabolcs Nagy @ 2016-09-06 18:49 UTC (permalink / raw)
  To: Mike Stump, Torvald Riegel; +Cc: nd, gcc-patches

On 06/09/16 18:34, Mike Stump wrote:
> On Sep 6, 2016, at 2:11 AM, Torvald Riegel <triegel@redhat.com> wrote:
>>
>> On Wed, 2016-08-24 at 20:08 +0100, Szabolcs Nagy wrote:
>>> Pass build time CC make var down to dejagnu so the sysroot
>>> is set correctly when gcc is built with --with-build-sysroot.
>>>
>>> libitm/
>>> 2016-08-24  Szabolcs Nagy  <szabolcs.nagy@arm.com>
>>>
>>> 	PR testsuite/71931
>>> 	* configure.ac: Add AC_CONFIG_FILES.
>>> 	* configure: Regenerated.
>>> 	* testuite/Makefile.am: Add rule for libitm-test-support.exp.
>>> 	* testuite/Makefile.in: Regenerated.
>>> 	* testuite/libitm-test-support.exp.in: New.
>>> 	* testuite/lib/libitm.exp (libitm_init): Use BUILD_CC.
>>>
>>
>> I don't know enough about the build system to really review this.  If a
>> similar patch has been ACKed and applied for libatomic (71931 states
>> that both are affected), then I guess this is OK?
> 
> I was hoping that someone else might review it, but i can see why no one else can or wants to.
> 
> Sorry for the feet dragging, Ok.  If libatomic has the same problem, and a similar solutions works there, Ok to fix it as well.
> 

the libatomic changes were not accepted:
https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01771.html

i'll try a bit different approach
(using automake's EXTRA_DEJAGNU_SITE_CONFIG so the
CC setting is only done in the in-tree site.exp)

> If someone wants to do a little work to make fortran libstdc++ and the other two use the same mechanism, that would be nice.
> 

libstdc++ does something more complicated.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4][PR 71931] Fix libitm tests
  2016-09-06 18:49       ` Szabolcs Nagy
@ 2016-09-06 20:26         ` Mike Stump
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Stump @ 2016-09-06 20:26 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: Torvald Riegel, nd, gcc-patches

On Sep 6, 2016, at 11:13 AM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> 
> On 06/09/16 18:34, Mike Stump wrote:
>> On Sep 6, 2016, at 2:11 AM, Torvald Riegel <triegel@redhat.com> wrote:
>>> 
>>> On Wed, 2016-08-24 at 20:08 +0100, Szabolcs Nagy wrote:
>>>> Pass build time CC make var down to dejagnu so the sysroot
>>>> is set correctly when gcc is built with --with-build-sysroot.
>>>> 
>>>> libitm/
>>>> 2016-08-24  Szabolcs Nagy  <szabolcs.nagy@arm.com>
>>>> 
>>>> 	PR testsuite/71931
>>>> 	* configure.ac: Add AC_CONFIG_FILES.
>>>> 	* configure: Regenerated.
>>>> 	* testuite/Makefile.am: Add rule for libitm-test-support.exp.
>>>> 	* testuite/Makefile.in: Regenerated.
>>>> 	* testuite/libitm-test-support.exp.in: New.
>>>> 	* testuite/lib/libitm.exp (libitm_init): Use BUILD_CC.
>>>> 
>>> 
>>> I don't know enough about the build system to really review this.  If a
>>> similar patch has been ACKed and applied for libatomic (71931 states
>>> that both are affected), then I guess this is OK?
>> 
>> I was hoping that someone else might review it, but i can see why no one else can or wants to.
>> 
>> Sorry for the feet dragging, Ok.  If libatomic has the same problem, and a similar solutions works there, Ok to fix it as well.
>> 
> 
> the libatomic changes were not accepted:
> https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01771.html
> 
> i'll try a bit different approach
> (using automake's EXTRA_DEJAGNU_SITE_CONFIG so the
> CC setting is only done in the in-tree site.exp)

Oh, yeah.  Sorry, I did see that but didn't mean to ignore the concern raised.  Please do work out install v non-install testing before it goes in.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-09-06 19:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-24 19:04 [PATCH 0/4][PR 71931] Fix target lib tests --with-build-sysroot Szabolcs Nagy
2016-08-24 19:06 ` [PATCH 1/4][PR 71931] Fix libatomic tests Szabolcs Nagy
2016-08-24 22:08   ` Joseph Myers
2016-08-25  8:45     ` Szabolcs Nagy
2016-08-25 23:04       ` Joseph Myers
2016-08-24 19:07 ` [PATCH 2/4][PR 71931] Fix libgomp tests Szabolcs Nagy
2016-08-24 19:09 ` [PATCH 3/4][PR 71931] Fix libitm tests Szabolcs Nagy
2016-09-06  9:12   ` Torvald Riegel
2016-09-06 18:06     ` Mike Stump
2016-09-06 18:49       ` Szabolcs Nagy
2016-09-06 20:26         ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).