This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 4/4] libgomp/test: Fix compilation for build sysroot
- From: "Maciej W. Rozycki" <macro at wdc dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libffi-discuss at sourceware dot org, golang-dev at googlegroups dot com
- Date: Mon, 11 Nov 2019 18:13:08 +0000 (GMT)
- Subject: [PATCH 4/4] libgomp/test: Fix compilation for build sysroot
- Ironport-sdr: 4fR8jZxhPfMYarwXQYczHUzmlvxJ9+pE5PYLOauc5xLZ2KdamhcG0xXRW6NE5BKzHl7f4PmaLD VtyP/RswImOOYMIvQ4id6iXYM4KRjHh5M9jTr/7SGW1SVGSNwhzJjIpuvYjbFSz5Xp6eoWO894 JysXYcPuXUq1b09mGbrZirLrWB/RxvNTCxTvlYzlFmISfxfT3HtAUcCfCenrixHUAXWSBp90hw nr5Xt+v68Sxiw7XBQeCTT5MLSqlcNvPVOivUAyTLdwU1azhqH8NduVyIR0HTenxKzPHwKB3Qnr MFs=
- Ironport-sdr: HkKmC5+rCY3bU530/x/R0DqM4v9XtoC2YIT6cV55ympDOrAzS0CbdZFI2fqm57iQDGYl291DXU DGzoqcIeHKSr2nGbbuxSFItUswVfFi2BhmO5kwCGjopGiibEvADHc17QmGmmud8rBNA/PbKhSV vNoCng1GEfpi8UzrnBvxknWyEiYkTmYHIAmePpy62sne4ZHBYQ/6glMOLJ8iiLvsE+MT26L5oZ 9Jj7JwEu5nLK7spPb0bSMDrNqcRE51jUnxEjE/OY/klz5FPzgjEKxvyFWc6deELdIiD6iXEhvJ 67gikGc+L0kbpfU+wKOUSPgJ
- Ironport-sdr: n0Cho0GX44ggLHTxtgq+hfgTJleK4kwUTQSdtJQqVdC3uL5B1uWj2C2PKuVGhshIWvlnk83b2f sGpO9ttxU8fvTcNM4Tynd8E1Zy+DHUHcQVbv+gxf4PKyg6oSSwzlH3zATydC+Voovt2JSb4oKX fmXxOwiVpwl9Ucyt5N8msVHKfXlhD5Gq2QDrd/IZK0LJP82BI29NR9YrY6nVt37gan3ilgspcD dvtii0iDNX9CNBFdI71frL8hRe5ZdjJATeoqSinhRr5QRLC4j8VrpL3RRvAniTxz174/DPNfKs OE8=
- Wdcironportexception: Internal
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.
---
libgomp/testsuite/libgomp-test-support.exp.in | 2 ++
1 file changed, 2 insertions(+)
gcc-test-libgomp-gcc-under-test.diff
Index: gcc/libgomp/testsuite/libgomp-test-support.exp.in
===================================================================
--- gcc.orig/libgomp/testsuite/libgomp-test-support.exp.in
+++ gcc/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@"