aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@wdc.com>2019-12-22 00:41:36 +0000
committerMaciej W. Rozycki <macro@gcc.gnu.org>2019-12-22 00:41:36 +0000
commitc8e759b4215ba4b376c9d468aeffe163b3d520f0 (patch)
tree0bc204c0c55e511407e9aacc6cfd3a9e9aa34e0f /libgomp
parent20ff65f8c5657fe59b19534034aadcdb578ea50f (diff)
downloadgcc-c8e759b4215ba4b376c9d468aeffe163b3d520f0.zip
gcc-c8e759b4215ba4b376c9d468aeffe163b3d520f0.tar.gz
gcc-c8e759b4215ba4b376c9d468aeffe163b3d520f0.tar.bz2
libgomp/test: Fix compilation for build sysroot
Fix a problem with the libgomp testsuite using a method to determine the compiler to use resulting in the tool being different from one the library has been built with, and causing a catastrophic failure from the lack of a suitable `--sysroot=' option where the `--with-build-sysroot=' configuration option has been used to build the compiler resulting in the inability to link executables. Address this problem by defining the compiler to use, via the GCC_UNDER_TEST TCL variable, set in the DejaGNU configuration file from $CC by autoconf, which will have all the required options set for the target compiler to build executables in the environment configured, removing failures like: .../bin/riscv64-linux-gnu-ld: cannot find crt1.o: No such file or directory .../bin/riscv64-linux-gnu-ld: cannot find -lm .../bin/riscv64-linux-gnu-ld: cannot find -lpthread .../bin/riscv64-linux-gnu-ld: cannot find -lc .../bin/riscv64-linux-gnu-ld: cannot find -latomic collect2: error: ld returned 1 exit status compiler exited with status 1 FAIL: libgomp.c/../libgomp.c-c++-common/atomic-18.c (test for excess errors) Excess errors: .../bin/riscv64-linux-gnu-ld: cannot find crt1.o: No such file or directory .../bin/riscv64-linux-gnu-ld: cannot find -lm .../bin/riscv64-linux-gnu-ld: cannot find -lpthread .../bin/riscv64-linux-gnu-ld: cannot find -lc .../bin/riscv64-linux-gnu-ld: cannot find -latomic UNRESOLVED: libgomp.c/../libgomp.c-c++-common/atomic-18.c compilation failed to produce executable and bringing overall test results for the `riscv64-linux-gnu' target (here with the `x86_64-linux-gnu' host and RISC-V QEMU in the Linux user emulation mode as the target board) from: === libgomp Summary === # of expected passes 44 # of unexpected failures 3274 # of unresolved testcases 3241 # of unsupported tests 548 to: === libgomp Summary === # of expected passes 6834 # of unexpected failures 4 # of expected failures 4 # of unsupported tests 518 libgomp/ * testsuite/libgomp-test-support.exp.in (GCC_UNDER_TEST): New variable. From-SVN: r279708
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp-test-support.exp.in2
2 files changed, 7 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 7bc7d41..c557aa4 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-22 Maciej W. Rozycki <macro@wdc.com>
+
+ * testsuite/libgomp-test-support.exp.in (GCC_UNDER_TEST): New
+ variable.
+
2019-12-21 Thomas Schwinge <thomas@codesourcery.com>
* target.c (gomp_map_vars_internal): Restore 'omp declare target
diff --git a/libgomp/testsuite/libgomp-test-support.exp.in b/libgomp/testsuite/libgomp-test-support.exp.in
index 98fb442..6ec10c7 100644
--- a/libgomp/testsuite/libgomp-test-support.exp.in
+++ b/libgomp/testsuite/libgomp-test-support.exp.in
@@ -1,3 +1,5 @@
+set GCC_UNDER_TEST {@CC@}
+
set cuda_driver_include "@CUDA_DRIVER_INCLUDE@"
set cuda_driver_lib "@CUDA_DRIVER_LIB@"
set hsa_runtime_lib "@HSA_RUNTIME_LIB@"