From patchwork Thu Feb 13 23:36:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 1237809 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-519517-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.a=rsa-sha1 header.s=default header.b=QDxnq3Al; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=T0VNDv4c; 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 48JXwK0XgNz9s29 for ; Fri, 14 Feb 2020 10:36:48 +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:in-reply-to:message-id:references :mime-version:content-type; q=dns; s=default; b=wZ39RV6kmkOUT5Oe IqzckBhb0Wmx4B/qvMx2Jn8pjWwD32nlvFniKEH06N8lNdyLSJebq3lYm8ig3ikT OVcrskMoELfq1V5PDm4vjBbcAd74pai0J8Jdw49s0v4BpgEg0Hb/hV1VlH4IRcBi HWne13lzOgs+aLehOZG4MeA8Zb4= 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:in-reply-to:message-id:references :mime-version:content-type; s=default; bh=LvXpAoIU8Xq25p9eURGJcD 6Th/M=; b=QDxnq3AlVnoRYLMaRUTzJNx9kFVaF8vRdH8g8CeIILFtKaLKYZr/oS F2D6W3YD+TLkkvedgt5cFFBZXRvAvZnBDFqFc5nSsx4Q87QxIVLnpRJf8QbWGKk7 pRULySU/0qG81adiMWH/hanIF8A9ap3Yzau5rCqTKKDQN4egfaKkY= Received: (qmail 116095 invoked by alias); 13 Feb 2020 23:36:40 -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 116021 invoked by uid 89); 13 Feb 2020 23:36:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS autolearn=ham version=3.3.1 spammy=UD:orig, am_runtestflags, AM_RUNTESTFLAGS X-HELO: esa1.hgst.iphmx.com Received: from esa1.hgst.iphmx.com (HELO esa1.hgst.iphmx.com) (68.232.141.245) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Feb 2020 23:36:38 +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=1581636997; x=1613172997; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=X+/KvDbKhv6oc7SL5IDAioIWtvROjQsVMxQoQwoZeRY=; b=T0VNDv4ca9RO7a9RG/iriFfumIxKevhSTmtfe2bz5FG5r7JMVfiH9jiR +s3WCsRs6rCnmu915jbIohafd5xBMLiCvr5/tUZ1dnAaiimNayZb/obiC GSJ1SMNlUjjNMqSXN996MlUjwoH97Sb4HijEqtGyekavk8O58wkzKdmw3 8LyL1Qosy/63Wun9A3+r76Q+u9EkYRR0BXt2bLHNDrHEdkTVZHjaSV378 NBotPiQ6HO8/fTsHuIKgcNW0dMrQrUUMqClpQItfWOtr7QZJWc5HBAN5P v70L3XW593Dq9SBcWioEu1tOcEOnya6beYIBearesrPNcgXs/5RH+re9v w==; IronPort-SDR: OMKExGoFYBinjRfIogthiOflygphuUMUchRLxupELs0j1a8I85Mk4GC9yNyQdPVZS+Z6sfOery ivTNezcWho152hcU09ELGVqSwCGxKYlpwQ9yHUMQFsidoJrQnDFid3SyWqQEYa0AwDVLljwqSH PUr6sNJHSKXV7YgunD5uOu8U/ZnwfsHVP4HycnASaI5Q8AdhK2GbEnazYbhGKoOB8rWiKm0mj5 hXFCvo2hq0719lT1wVnv1AFS43p5XD/tL7iMdA0BQQow+DsddAnF6aOz0WKhfhmzPWT8bHcF0n rcM= Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 14 Feb 2020 07:36:36 +0800 IronPort-SDR: 0fMSa7sdrqIUXOX/VoiuGkH15gsLGkGRoXOem2EHN8gEaZHTtTL+83rdXBXkBkmYod0cy5CFcc Ve1uuFrL2LriQRLVoj9zvskCpBorhAws+SKJIRUE1QCq18MGnueCKzpEg8p+M0drqA1Ssr387B td/6VWq/3XK6Fkn5dEBEMKZs+6WZO9R5t8zmEFRSVnvSLoGd1Hi0Y7B5fzFWpdHQY+HM46gSNZ vfNHsyhTm3ES7htjygWFH/PVOxxgxPCBMUnH4LK6LLrCOzdI5Hk79BRVDF0daikO1jbgk77JRb 0i724lLvmUejs0EbvlMymaD0 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2020 15:29:23 -0800 IronPort-SDR: YcCe0/55LOVp2P+DIaiwuSc2HJg/FF0tCQup0zGwqXjraTQhqPl/LcGr1vLwK+lsVf2tuYmsZa stJflir7ZjytB3r+zX9GQ1Gd7MVpvCoWKy/ULi5tmdGH3kxpKaWM3Fd1tPESCD+Zi5QGJBxjC4 PiyiVz9JWyTbg6D3KCnCsy7oqlqzUX5wjqU7MUmDxmgfX8xjbqHgu9BCroNP1/jK5+BQm/OC6c ZuwdI8nYoCoQU6w+c3256ir0SXLqjO3o+q9XCPZXNVc3BpYTgLMDIZao7zMKdqqGAl5tF7Ic3o 7NU= 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; 13 Feb 2020 15:36:34 -0800 Date: Thu, 13 Feb 2020 23:36:32 +0000 (GMT) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org cc: Julian Brown , Tobias Burnus , Jeff Law , Thomas Schwinge , Mike Stump , Chung-Lin Tang , Ian Lance Taylor Subject: [PATCH v2 1/4] libatomic/test: Fix compilation for build sysroot In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Fix a problem with the libatomic 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 passing the `--tool_exec' option to `runtest' via $(AM_RUNTESTFLAGS) with $(CC) as the argument, 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 collect2: error: ld returned 1 exit status compiler exited with status 1 FAIL: libatomic.c/atomic-compare-exchange-1.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 UNRESOLVED: libatomic.c/atomic-compare-exchange-1.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: === libatomic Summary === # of unexpected failures 27 # of unresolved testcases 27 to: === libatomic Summary === # of expected passes 54 libatomic/ * testsuite/Makefile.am (AM_RUNTESTFLAGS): New variable. * testsuite/Makefile.in: Regenerate. --- Changes from v1: - Remove testsuite/libatomic-test-support.exp.in and the associated changes. - Pass $(CC) via `--tool_exec' in $(AM_RUNTESTFLAGS). --- libatomic/testsuite/Makefile.am | 1 + libatomic/testsuite/Makefile.in | 1 + 2 files changed, 2 insertions(+) patches/gcc-test-libatomic-runtestflags-tool-exec.diff Index: gcc/libatomic/testsuite/Makefile.am =================================================================== --- gcc.orig/libatomic/testsuite/Makefile.am +++ gcc/libatomic/testsuite/Makefile.am @@ -11,3 +11,4 @@ EXPECT = $(shell if test -f $(top_buildd _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \ echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) RUNTEST = $(_RUNTEST) $(AM_RUNTESTFLAGS) +AM_RUNTESTFLAGS = --tool_exec "$(CC)" Index: gcc/libatomic/testsuite/Makefile.in =================================================================== --- gcc.orig/libatomic/testsuite/Makefile.in +++ gcc/libatomic/testsuite/Makefile.in @@ -278,6 +278,7 @@ _RUNTEST = $(shell if test -f $(top_srcd echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) RUNTEST = $(_RUNTEST) $(AM_RUNTESTFLAGS) +AM_RUNTESTFLAGS = --tool_exec "$(CC)" all: all-am .SUFFIXES: