From patchwork Mon Nov 11 18:13:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 1193053 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-512978-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="FPhH8cAe"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="oMMVZRSs"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47BfBX4JqKz9sP3 for ; Tue, 12 Nov 2019 05:13:24 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=FTuL6YUfw9pnoBDhWaa1hsbTW2YeDXTlHd1FMcjbcqhpFIcATC VcTRmOvOfyp6egL6oPkZmd10Tar8Kl+f0QeiB7VA5okNvkCm2YAGYxKou2l+XDOI oEP9eRZCkzsfoQ79cGqXbaOOB1njAd5KwYynEmO0V5j0tve52Pii0fnIk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=4ps4tJe8AZ3nJUinK2JkMLrB6aU=; b=FPhH8cAeZDOU/3J21mJv UUAFsq9H0RHJCd++54tPJACDk4l8gbQlC1LFrC1Hql6eNqvq8ldC/mvtwD5AhK2d Nflf6RReIyJruQ9/RRCYVyeDcCvHNdn0Zz9dANUmdhn73tK87TEXTZ+hqV7F5bDX 0LZjI3jtH+MFmwhp4KbaV/c= Received: (qmail 81772 invoked by alias); 11 Nov 2019 18:13:15 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 81716 invoked by uid 89); 11 Nov 2019 18:13:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3 autolearn=unavailable version=3.3.1 spammy=sk:cuda_d, 6834, latomic, sk:cuda_dr X-HELO: esa5.hgst.iphmx.com Received: from esa5.hgst.iphmx.com (HELO esa5.hgst.iphmx.com) (216.71.153.144) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Nov 2019 18:13:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1573495994; x=1605031994; h=date:from:to:cc:subject:message-id:mime-version; bh=18Ow5rSkUL2bTh6r0d6VXctOm6hFkW4eLavIq0Ntab4=; b=oMMVZRSsIzb7IIJPHNfAxfb4jhDZIQd3iPEa/PNwn30EHttB2bHzyLq2 xnEeUXnrtssaQ7JkoFBMsvUuUoRbwC8ZCiYo5y2oiaK3rlxoYk1EoiJWt gFEitLLTJAK4H+fty7kJDq7uQsGcWQFFxQwO7BNh2Ie1nuBrwuK/G+WGU YYpKKYhzPjMhsx7t8d83bNIPPOpltCzMHAHe8ko1gBdO/p/+di6D1IBE5 auxgQIPnjy0sV2Yg7ps3U+srTt7TBRNA2pJ3N8PUEJJ0B0YB3vjW/9wnf hrvkZwvy0Fjtw68u23yIMu6afbHAm+bBUcINcVgnTUch5y9D1dYUT52hM Q==; IronPort-SDR: 4fR8jZxhPfMYarwXQYczHUzmlvxJ9+pE5PYLOauc5xLZ2KdamhcG0xXRW6NE5BKzHl7f4PmaLD VtyP/RswImOOYMIvQ4id6iXYM4KRjHh5M9jTr/7SGW1SVGSNwhzJjIpuvYjbFSz5Xp6eoWO894 JysXYcPuXUq1b09mGbrZirLrWB/RxvNTCxTvlYzlFmISfxfT3HtAUcCfCenrixHUAXWSBp90hw nr5Xt+v68Sxiw7XBQeCTT5MLSqlcNvPVOivUAyTLdwU1azhqH8NduVyIR0HTenxKzPHwKB3Qnr MFs= Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 12 Nov 2019 02:13:12 +0800 IronPort-SDR: HkKmC5+rCY3bU530/x/R0DqM4v9XtoC2YIT6cV55ympDOrAzS0CbdZFI2fqm57iQDGYl291DXU DGzoqcIeHKSr2nGbbuxSFItUswVfFi2BhmO5kwCGjopGiibEvADHc17QmGmmud8rBNA/PbKhSV vNoCng1GEfpi8UzrnBvxknWyEiYkTmYHIAmePpy62sne4ZHBYQ/6glMOLJ8iiLvsE+MT26L5oZ 9Jj7JwEu5nLK7spPb0bSMDrNqcRE51jUnxEjE/OY/klz5FPzgjEKxvyFWc6deELdIiD6iXEhvJ 67gikGc+L0kbpfU+wKOUSPgJ Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2019 10:08:14 -0800 IronPort-SDR: n0Cho0GX44ggLHTxtgq+hfgTJleK4kwUTQSdtJQqVdC3uL5B1uWj2C2PKuVGhshIWvlnk83b2f sGpO9ttxU8fvTcNM4Tynd8E1Zy+DHUHcQVbv+gxf4PKyg6oSSwzlH3zATydC+Voovt2JSb4oKX fmXxOwiVpwl9Ucyt5N8msVHKfXlhD5Gq2QDrd/IZK0LJP82BI29NR9YrY6nVt37gan3ilgspcD dvtii0iDNX9CNBFdI71frL8hRe5ZdjJATeoqSinhRr5QRLC4j8VrpL3RRvAniTxz174/DPNfKs OE8= WDCIronportException: Internal Received: from unknown (HELO redsun52) ([10.149.66.28]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2019 10:13:10 -0800 Date: Mon, 11 Nov 2019 18:13:08 +0000 (GMT) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org cc: libffi-discuss@sourceware.org, golang-dev@googlegroups.com Subject: [PATCH 4/4] libgomp/test: Fix compilation for build sysroot Message-ID: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 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@"