From patchwork Mon Nov 11 18:12:13 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: 1193050 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-512975-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="XoPfjuF+"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="nOIowJWe"; 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 47Bf9R1mrgz9sP4 for ; Tue, 12 Nov 2019 05:12:27 +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=jIqhXiqzvVwdc8Lb zoAmUBtjsuS7qMf0RvbdBo8GDzfZG4/zHV4wMeYV9IMHDCi6ItIq1B9E/LVNwMuT pLNgQYFdyPyA1YLxlTn6Qgxpa9hfyKI1ciYPCDo9UraPqq1fExfLmyl1C8NctBGc tFsKKdyz1WnqvdgLe9IyLfiCC6w= 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=XFZBQWCbJuW1lbcARyLiMp X9Zog=; b=XoPfjuF+pZGIAsm+Y3SVfOMjW1Zdnp+EvjuDf5OjNS2laLR4lIEGpG vJ6CY/PsLo4yZW4/wvL9Yqsd5RGIEwIMHTeqpg+KOqJPXKMdn2GnrWohEVZU5DND Mf0wBcZn0N1deJTd+MGg6dzuS/2hSOF8WzWKn2aDeaxL5qbqIYfwU= Received: (qmail 75879 invoked by alias); 11 Nov 2019 18:12:19 -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 75866 invoked by uid 89); 11 Nov 2019 18:12:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS autolearn=unavailable version=3.3.1 spammy=CC, $CC, $cc X-HELO: esa6.hgst.iphmx.com Received: from esa6.hgst.iphmx.com (HELO esa6.hgst.iphmx.com) (216.71.154.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Nov 2019 18:12:18 +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=1573495939; x=1605031939; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=nnxSKfDyLPNMEyss1wKNw+UIM/BWyrJMRq6oKTrLhRY=; b=nOIowJWeSL7LM8eInjF30JN01BwGX5eKhcztOaNIlphd8FlkThZitUgH UdderKe77i6f+ydzx+abFR4Ja9lVPZgKIBLuJzA3Owa5FnIUiJ6tSANq+ zN3manDvv7pWYpMsOgLvPhAtUv5ZzJTnRUB4BneMV6sIRDBajnLfDVzfg hSZCbTNDjM9uucBBbRkrNlXwO77Ho0D9HNrmgeWsqn7X5k4Vopmpn3k3E j4bgOCai0t4w+ALUnSnScr5ssaImg+w0Vd2GdDf2gk7ng4xkEA+z/soJq gUb7ZEPiN2kUCJw/Ep0TClvn/sifi8+h0SmwsX3js9B2ufxT7kGb18Prp A==; IronPort-SDR: YmLvaipNORIZVpbfg70FcdN7lNlSkhOB4z99Uws08wexqQaLo4z5KmMPEHFG0pNKfZRfPowEuK SgPX95z6Psg05v3CrjK1mQyGipG5labqeW/Pw60OJlFlhgk68NIlHSCOTj9w1KA1sWBGp16Z/8 OzLfHRYLEu9WvnP6kFkUkCAcjW0Wyj42KcMnfnMM9QY1ZdwXFigTXICj2iakVz2f7ZEOj8C2Wm n3yMwJege+0MOIVvABkvSCv457Id34OzquaJ8NalBR5iCM7DdZxdaBVEiiHdT205k1Z4lGsrdy FsA= 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:12:17 +0800 IronPort-SDR: +pV7JDVuG8gFbxzQWogw3s/+YFTcbzo8ZEQNZqV7uM0KynUws2UUs0zYwfOBGsYu8Eb+o7ryJO khkFqVgL+0mbA6fPZWKxwlqYNfbD5PjyUcgiGwIcyIu5lu87x9PwyWfQjL9JAQvgSFzOIW1Gl1 /mz14V/+m/yGHZzS6eRlJeWB4zMbtmDQJYZBOFiH0DeN6oJl6NgiGNzGLiM32YbWLHz+8q+cl4 cjREWCq3SO1HKLL4oow6lckJJeZQRRCkA0ZvuNvRUmA3LjTORM9owdbf56R8W39sQpygfiO8la uATxiuWSReRST8aQShWcduAv 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:07:20 -0800 IronPort-SDR: TyxVRSjnue5oAk7/OKkortQKMYIkfbfVEaOlBnpZJBSMYEcheJZ7U2tTfdc4/dFveIlyKiaR4V +kKhb/zSTxxN2hlwxp8YITndJFecB8qyH+WcVlLGKA/Dg6KMu76B6jgzoimrUZFq2oC/9Cg0rr JwLyN4j2MpUFwP2vLYjCC4KMJFiBYqQE9Y3Xgkof4S7l+t7xBxQYWHdZZkFqgqex8Uau35de6A h06MzljeMKi1+iDL+gAuE7coKhUwgQIvaBz/T1DaSFxXlahbByx/fnJOa7gG5rox3QnC+5d8PE 750= 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:12:17 -0800 Date: Mon, 11 Nov 2019 18:12:13 +0000 (GMT) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org cc: libffi-discuss@sourceware.org, golang-dev@googlegroups.com Subject: [PATCH 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 providing a DejaGNU configuration file defining the compiler to use, via the GCC_UNDER_TEST TCL variable, set 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 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/ * configure.ac: Add testsuite/libatomic-test-support.exp to output files. * configure: Regenerate. * testsuite/libatomic-test-support.exp.in: New file. * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): New variable. * testsuite/Makefile.in: Regenerate. --- libatomic/configure | 3 +++ libatomic/configure.ac | 1 + libatomic/testsuite/Makefile.am | 2 ++ libatomic/testsuite/Makefile.in | 5 ++++- libatomic/testsuite/libatomic-test-support.exp.in | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) gcc-test-libatomic-gcc-under-test.diff Index: gcc/libatomic/configure =================================================================== --- gcc.orig/libatomic/configure +++ gcc/libatomic/configure @@ -15701,6 +15701,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 @@ -16772,6 +16774,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 Index: gcc/libatomic/configure.ac =================================================================== --- gcc.orig/libatomic/configure.ac +++ gcc/libatomic/configure.ac @@ -279,4 +279,5 @@ else fi AC_CONFIG_FILES(Makefile testsuite/Makefile) +AC_CONFIG_FILES(testsuite/libatomic-test-support.exp) AC_OUTPUT Index: gcc/libatomic/testsuite/Makefile.am =================================================================== --- gcc.orig/libatomic/testsuite/Makefile.am +++ gcc/libatomic/testsuite/Makefile.am @@ -11,3 +11,5 @@ 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) + +EXTRA_DEJAGNU_SITE_CONFIG = libatomic-test-support.exp Index: gcc/libatomic/testsuite/Makefile.in =================================================================== --- gcc.orig/libatomic/testsuite/Makefile.in +++ gcc/libatomic/testsuite/Makefile.in @@ -108,7 +108,7 @@ am__configure_deps = $(am__aclocal_m4_de DIST_COMMON = $(srcdir)/Makefile.am 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 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -277,6 +277,7 @@ _RUNTEST = $(shell if test -f $(top_srcd echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) RUNTEST = $(_RUNTEST) $(AM_RUNTESTFLAGS) +EXTRA_DEJAGNU_SITE_CONFIG = libatomic-test-support.exp all: all-am .SUFFIXES: @@ -309,6 +310,8 @@ $(top_srcdir)/configure: @MAINTAINER_MOD $(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 Index: gcc/libatomic/testsuite/libatomic-test-support.exp.in =================================================================== --- /dev/null +++ gcc/libatomic/testsuite/libatomic-test-support.exp.in @@ -0,0 +1 @@ +set GCC_UNDER_TEST {@CC@} From patchwork Mon Nov 11 18:12:29 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: 1193051 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-512976-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="StMoeT6X"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="eI6cEiAk"; 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 47Bf9q3xDgz9sP4 for ; Tue, 12 Nov 2019 05:12:47 +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=odoN+zpMwBwG4F8C CYppTJXVoZFju9UmziTdec3vlaagwMwXZSg69/wKSvXODGRKBbimMwVp3K2pTn/o NKVtNnT428omSPIH0wlDNxLONhx9F78AAP84sS3gNhBJBo805es8L0kXIieyv/vr 1x5LaEwf1GTYzIU+ft/why/iTTY= 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=8bCrHfDW7Q4KdxXEqV+p9Q 9w50o=; b=StMoeT6XQH+t4UpwUW7QSLVij8IoOhqpgboFLZQdcE8hfPSkqN3c95 SVGLJMUCeUcxgMwrZrb4kPdFlJzHpUDB2xvTDDUg+9AwcXT7tPqv72VkyMNGrkad GDHfSjJQnBoMfg8ivcBEiEKeGH+uR4I8lCDesOQs/8BDBGworsD/0= Received: (qmail 77764 invoked by alias); 11 Nov 2019 18:12:36 -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 77743 invoked by uid 89); 11 Nov 2019 18:12:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS autolearn=ham version=3.3.1 spammy=mkdir, 2787, lappend 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; Mon, 11 Nov 2019 18:12:34 +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=1573495953; x=1605031953; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=lS/jwIFluHnv/updrnbMUtzZrddcBrlbYjPfioCeJWg=; b=eI6cEiAk8WnBcxOTo54vsu7Kp1KouGvBrjfRCtxPkslB2cdPtq5tIztT rj21D/bHvstNHZPZhVHBKIBWl0XGf/2vUW3FAUzZE8RTp1mxn3EYpDyh2 FSQmkYwTz7/HROWhQ8E2yfKrDKjTihOxKCkaDM1hks2nnuVN+3Nrn+y6R 3yfAylKFfMgqScfVglmSa77PSlGIN8pQ/3omwpbme5HeihYOMmLcaWpPa WpIahdy1TE2PdpM89DRGIMzKDUtlngHeLjVimocHURwbDQTZRVTo1GrVE IGkGcLEUpoLZlcWRK3KPtu+TRr7Q5QmPSZ1DeEUxjv8xXlWbk/lkTyrog A==; IronPort-SDR: oW4xxlQaYdtlTKGGDtpHTs3ir5Z9B+UfmAE+ArHXFa0JZbvbfDd2JItlz/TSwe3Qmf1mW5mJz/ UDkmDiNv6LzLm58+ou3UDAEThwW1ONUPRgiZX2EMWsV/ZOzdSL1cmzGq0U9jIVuvATQwm235ta MaBGzIOnegYc94AwFsvLR2+OmTm9c3qoJT7S2bLdAlijwwv8/ZDwhYfQ/w8g/ff/lFSePO1rjz IYBI4ia5RJg/OtbMY8xfRfvMeSFcqbW9KCWnzYXyFWSerriZqnQQp7b7+TLKdwivrBQcxyB0H8 tvY= 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:12:32 +0800 IronPort-SDR: +44F6ekGqNRkTLlNCMid3N1FemK5kAOrIbcmPGPr82xdtdvnytzJO8vG7rkG6H6VtT0q7vTcPk fBtmjggw3Dt254J622wmIGOAK9g2A2iky0HdOLn451gsuuRPaMMoUuAyiZuND1uIcbAgKh/Mqu FyZQYOz6uO6vu3KUFWtEkIYyt2yiuiu3GQ24ySMZCKcPyT5RPy3JRQOSjzqjiND/+/3UEWs1In s1SPZ81kRCoVzFojstxomuw/kIVKciX7QiDGgUYUS1zPaQrQGHC6H531faEt5iLZ8IQbGHT5AQ Fr3Y4jr+Wko0PYAuCO6OBite 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:07:36 -0800 IronPort-SDR: xv7+Mgy5ZZT3xAjV8I+T3NCeYIIXrUdmmBTIez0h8LLZQFRr6snl6GZo7GYylS5Vr5dHfRThJO dYAPZHWLmDzfHQjw2coSa8B0pDwRVzLJTjAXEXtRIeLftYI0VIDpkqN6PXXVw7K7bxNkd+1724 3rUqsScog7Dnlpe7eEDgKcQtSR84wL/GEY4913WsiD/yH7AyX8zizH+impYnTfpva0WOusTwzG +Y6OcpnLhYNr/Iitjovi0gxkLcn6i8diN04x4aLWybP+uHA7UbWIdEHRvcaYPDu9lexxc5jbX+ jvw= 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:12:31 -0800 Date: Mon, 11 Nov 2019 18:12:29 +0000 (GMT) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org cc: libffi-discuss@sourceware.org, golang-dev@googlegroups.com Subject: [PATCH 2/4] libffi/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 libffi 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 inability to actually choose any compiler at all in a cross-compilation configuration. Address this problem by providing a DejaGNU configuration file defining the compiler to use, via the GCC_UNDER_TEST TCL variable, set 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: FAIL: libffi.call/closure_fn0.c -W -Wall -Wno-psabi -O0 (test for excess errors) Excess errors: default_target_compile: No compiler to compile with UNRESOLVED: libffi.call/closure_fn0.c -W -Wall -Wno-psabi -O0 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: === libffi Summary === # of unexpected failures 708 # of unresolved testcases 708 # of unsupported tests 30 to: === libffi Summary === # of expected passes 1934 # of unsupported tests 28 Also respect the TOOL_EXECUTABLE TCL variable for a standalone run via `runtest' and remove an unused TOOL_OPTIONS TCL variable instance. libffi/ * configure.ac: Add testsuite/libffi-test-support.exp to output files. * configure: Regenerate. * testsuite/libffi-test-support.exp.in: New file. * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): New variable. * testsuite/Makefile.in: Regenerate. * testsuite/lib/libffi.exp (libffi-init): Handle GCC_UNDER_TEST. (libffi_target_compile): Likewise. --- libffi/configure | 3 ++- libffi/configure.ac | 2 +- libffi/testsuite/Makefile.am | 2 ++ libffi/testsuite/Makefile.in | 5 ++++- libffi/testsuite/lib/libffi.exp | 16 ++++++++++++++-- libffi/testsuite/libffi-test-support.exp.in | 1 + 6 files changed, 24 insertions(+), 5 deletions(-) gcc-test-libffi-gcc-under-test.diff Index: gcc/libffi/configure =================================================================== --- gcc.orig/libffi/configure +++ gcc/libffi/configure @@ -16635,7 +16635,7 @@ ac_config_commands="$ac_config_commands ac_config_links="$ac_config_links include/ffitarget.h:src/$TARGETDIR/ffitarget.h" -ac_config_files="$ac_config_files include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc" +ac_config_files="$ac_config_files include/Makefile include/ffi.h Makefile testsuite/Makefile testsuite/libffi-test-support.exp man/Makefile libffi.pc" cat >confcache <<\_ACEOF @@ -17802,6 +17802,7 @@ do "include/ffi.h") CONFIG_FILES="$CONFIG_FILES include/ffi.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; + "testsuite/libffi-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libffi-test-support.exp" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "libffi.pc") CONFIG_FILES="$CONFIG_FILES libffi.pc" ;; Index: gcc/libffi/configure.ac =================================================================== --- gcc.orig/libffi/configure.ac +++ gcc/libffi/configure.ac @@ -368,6 +368,6 @@ test -d src/$TARGETDIR || mkdir src/$TAR AC_CONFIG_LINKS(include/ffitarget.h:src/$TARGETDIR/ffitarget.h) -AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc) +AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile testsuite/libffi-test-support.exp man/Makefile libffi.pc) AC_OUTPUT Index: gcc/libffi/testsuite/Makefile.am =================================================================== --- gcc.orig/libffi/testsuite/Makefile.am +++ gcc/libffi/testsuite/Makefile.am @@ -11,6 +11,8 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja echo $(top_srcdir)/../dejagnu/runtest ; \ else echo runtest; fi` +EXTRA_DEJAGNU_SITE_CONFIG = libffi-test-support.exp + AM_RUNTESTFLAGS = CLEANFILES = *.exe core* *.log *.sum Index: gcc/libffi/testsuite/Makefile.in =================================================================== --- gcc.orig/libffi/testsuite/Makefile.in +++ gcc/libffi/testsuite/Makefile.in @@ -105,7 +105,7 @@ am__configure_deps = $(am__aclocal_m4_de DIST_COMMON = $(srcdir)/Makefile.am mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = $(top_builddir)/fficonfig.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = libffi-test-support.exp CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -278,6 +278,7 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja echo $(top_srcdir)/../dejagnu/runtest ; \ else echo runtest; fi` +EXTRA_DEJAGNU_SITE_CONFIG = libffi-test-support.exp CLEANFILES = *.exe core* *.log *.sum EXTRA_DIST = config/default.exp libffi.call/cls_19byte.c \ libffi.call/cls_align_longdouble_split.c \ @@ -389,6 +390,8 @@ $(top_srcdir)/configure: @MAINTAINER_MOD $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +libffi-test-support.exp: $(top_builddir)/config.status $(srcdir)/libffi-test-support.exp.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo Index: gcc/libffi/testsuite/lib/libffi.exp =================================================================== --- gcc.orig/libffi/testsuite/lib/libffi.exp +++ gcc/libffi/testsuite/lib/libffi.exp @@ -99,7 +99,8 @@ proc libffi-init { args } { global blddirffi global objdir global blddircxx - global TOOL_OPTIONS + global TOOL_EXECUTABLE + global GCC_UNDER_TEST global tool global libffi_include global libffi_link_flags @@ -123,7 +124,15 @@ proc libffi-init { args } { set ld_library_path "." append ld_library_path ":${gccdir}" - set compiler "${gccdir}/xgcc" + if ![info exists GCC_UNDER_TEST] then { + if [info exists TOOL_EXECUTABLE] { + set GCC_UNDER_TEST $TOOL_EXECUTABLE + } else { + set GCC_UNDER_TEST "[find_gcc]" + } + } + + set compiler [lindex $GCC_UNDER_TEST 0] if { [is_remote host] == 0 && [which $compiler] != 0 } { foreach i "[exec $compiler --print-multi-lib]" { set mldir "" @@ -175,11 +184,14 @@ proc libffi_target_compile { source dest global srcdir global blddirffi global TOOL_OPTIONS + global GCC_UNDER_TEST global libffi_link_flags global libffi_include global target_triplet + lappend options "compiler=$GCC_UNDER_TEST" + if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } { lappend options "libs=${gluefile}" lappend options "ldflags=$wrap_flags" Index: gcc/libffi/testsuite/libffi-test-support.exp.in =================================================================== --- /dev/null +++ gcc/libffi/testsuite/libffi-test-support.exp.in @@ -0,0 +1 @@ +set GCC_UNDER_TEST {@CC@} From patchwork Mon Nov 11 18:12:44 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: 1193052 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-512977-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="WRpLf5FG"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="EteiHPQU"; 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 47BfB93YBcz9sP3 for ; Tue, 12 Nov 2019 05:13:05 +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=vRnPiUGuaR/UdWXJvpieKU/o/O8HVqp+PaKezvlMzdKDxD0XKp JXAJXS7ka7hf0BTjHinWMqwK4P6jHpiJcIWdzR0Bv8M7+kSnnpl4IRtkMUrijMll vQ64MQG10Vk5EvtGtKFVa6HYb/YjLTu238Mti9vGks4pjgN0tcYPf8XjE= 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=+RVaREfZCjfUGn5ecAlqxZveZ30=; b=WRpLf5FG0w0S/2LWWX4O 20nWW2AH8F7ur+NuZAbrsXEbkmGf4856VTMEIrvxJfIGwLYPsNQYiWUd1cuYqHZ3 Qu2rDZo1U67rwUj0+p04C13yz/3XzbSi/46H/7i726QStwuuC5pv9gCofreMqBOn ez/afPgZj8IU8PdyGWyTJH8= Received: (qmail 79618 invoked by alias); 11 Nov 2019 18:12:54 -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 79603 invoked by uid 89); 11 Nov 2019 18:12:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_SHORT autolearn=ham version=3.3.1 spammy= X-HELO: esa2.hgst.iphmx.com Received: from esa2.hgst.iphmx.com (HELO esa2.hgst.iphmx.com) (68.232.143.124) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Nov 2019 18:12:52 +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=1573495980; x=1605031980; h=date:from:to:cc:subject:message-id:mime-version; bh=AEUr/ZNTCuy1XfLYIiw5QJxmrMw8RTbQvg7YgqLEC90=; b=EteiHPQUrqxqYyRkkhqGq1IJ56SYtPU8ugqgcuf4FFrEom6sIalVTjQ1 29hN1ne9oHDu0dH+c6O9q2Dh4s5eXns+tOCiL53uoEGsYQBP8bxQfEQDk bVw0Mgkqb2TpaQE0zBuUIM4hGCKJgKwtKxnqDtL3t3x9RF/J1y7vUFSVz Q+lYtIfkthP69/lJzp/VWx5iFi2xH9OXvjDw918Gp07w7KzpMigxeL63+ lwHKFWFgtzyF3Th42dS3fnjKmjAqJGfkGOk0vZ8I1LnDV0tcprhXu+S15 zcnbtbk1yUV/OzNR0eXQImRUHdd2Diw6nVEzX7nf+FRNzURGZPj6Hqz+W g==; IronPort-SDR: tUPopbhcW2JTkAFACeqN0IfcQVEQ8JMSJf+YSl341bcQi+B52T9A87u5Fk8oMvmIfZaOjE5FJL AROKaTIJAKVrldz5i78DvCHi4WsgNpDTnE5l8w/ZCsj1sw15qAWWTTzf835t7Dp0AQaimLylfI zeq3FpVsuUw8kB7axo5pYOM+lxtbdV1fXr32eloMWCzV09+kE14qpRD1lbPQO6cihDTfyoKtpF u5Ie7V59LvgRVBXr3Vc7UFb3Qy/eErLWAQTtDFli7pdKHlC6vPUmFlBjzRolor9y9Y3L0G2knW L9s= X-URL-LookUp-ScanningError: 1 Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 12 Nov 2019 02:12:52 +0800 IronPort-SDR: gGE29lImBkWx8pN4/Ks39QiRQRf+++rNTJxTUt2mUXmT6vTRqebvOuJao+HawVorCam24lakNM 3PptFImbrFCLsEA2ug5/TDOrjRqOfkPsHoirl6RoghJcy0QQ31sTnYuWc2WtQKjUEN3WBpB74a L4wv9c3UV0wqHL3IH0p5/m8wmpaYX+t03hZZVxb1AB7RWaP4bF5+uxOf3SuI5SPdIBOt95xrQQ ETwmobwBUQysdZ4wkCA+NLleojg0hbOvKx8+wX3ZfgiLFKpawnFnvYHNGhr0tMqrmYaS4CB3nM xkUdj+1H4GmIR2pPZ9WN3e+Q 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:07:50 -0800 IronPort-SDR: an78HJeoZSKsbD5WTBfDq28ab9a1zUKYSx5m0k+9KAx/XUKjxDgISiRa6oEvf/23jfuzejY/9u lSnRAPatvzD0EaSPosz2fwmM8RYcmr44RxD9vGQ9HkU3MwVQQorGSFpo7DIYJGMrMTn/0twXLp i7YByhiIDCf19ZTYCJh1rEGNyCXYrzl6YwDhxqi5482DxJtS99q28QkrWFZymsH97dezphJAtt UmAl8fHHl1CHS0YwM7SeJMl2sPgQdIIPOfuiwiHUVHxM0xStT4N4ujZp2xx91EhK93jbe1Lai8 YsE= 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:12:46 -0800 Date: Mon, 11 Nov 2019 18:12:44 +0000 (GMT) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org cc: libffi-discuss@sourceware.org, golang-dev@googlegroups.com Subject: [PATCH 3/4] libgo/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 libgo 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 providing a DejaGNU configuration file defining the compiler to use, via the GOC_UNDER_TEST TCL variable, set from $GOC 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 -lc collect2: error: ld returned 1 exit status compiler exited with status 1 No summary comparison, because the libgo testsuite does not provide one in this configuration for some reason, however this change improves 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 0 PASSes and 159 FAILs to 133 PASSes and 26 FAILs. libgo/ * configure.ac: Add testsuite/libgo-test-support.exp to output files. * configure: Regenerate. * testsuite/libgo-test-support.exp.in: New file. * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): New variable. * testsuite/Makefile.in: Regenerate. * testsuite/lib/libgo.exp: Don't override GOC_UNDER_TEST previously set. --- libgo/configure | 3 ++- libgo/configure.ac | 2 +- libgo/testsuite/Makefile.am | 2 ++ libgo/testsuite/Makefile.in | 5 ++++- libgo/testsuite/lib/libgo.exp | 13 ++++++++----- libgo/testsuite/libgo-test-support.exp.in | 1 + 6 files changed, 18 insertions(+), 8 deletions(-) gcc-test-libgo-gcc-under-test.diff Index: gcc/libgo/configure =================================================================== --- gcc.orig/libgo/configure +++ gcc/libgo/configure @@ -15850,7 +15850,7 @@ else multilib_arg= fi -ac_config_files="$ac_config_files Makefile testsuite/Makefile" +ac_config_files="$ac_config_files Makefile testsuite/Makefile testsuite/libgo-test-support.exp" ac_config_commands="$ac_config_commands default" @@ -17031,6 +17031,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; + "testsuite/libgo-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libgo-test-support.exp" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; Index: gcc/libgo/configure.ac =================================================================== --- gcc.orig/libgo/configure.ac +++ gcc/libgo/configure.ac @@ -877,7 +877,7 @@ else multilib_arg= fi -AC_CONFIG_FILES(Makefile testsuite/Makefile) +AC_CONFIG_FILES(Makefile testsuite/Makefile testsuite/libgo-test-support.exp) AC_CONFIG_COMMANDS([default], [if test -n "$CONFIG_FILES"; then Index: gcc/libgo/testsuite/Makefile.am =================================================================== --- gcc.orig/libgo/testsuite/Makefile.am +++ gcc/libgo/testsuite/Makefile.am @@ -11,6 +11,8 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja echo $(top_srcdir)/../dejagnu/runtest ; \ else echo runtest; fi` +EXTRA_DEJAGNU_SITE_CONFIG = libgo-test-support.exp + # When running the tests we set GCC_EXEC_PREFIX to the install tree so that # files that have already been installed there will be found. The -B option # overrides it, so use of GCC_EXEC_PREFIX will not result in using GCC files Index: gcc/libgo/testsuite/Makefile.in =================================================================== --- gcc.orig/libgo/testsuite/Makefile.in +++ gcc/libgo/testsuite/Makefile.in @@ -106,7 +106,7 @@ am__configure_deps = $(am__aclocal_m4_de DIST_COMMON = $(srcdir)/Makefile.am mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = libgo-test-support.exp CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -299,6 +299,7 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja echo $(top_srcdir)/../dejagnu/runtest ; \ else echo runtest; fi` +EXTRA_DEJAGNU_SITE_CONFIG = libgo-test-support.exp # When running the tests we set GCC_EXEC_PREFIX to the install tree so that # files that have already been installed there will be found. The -B option @@ -338,6 +339,8 @@ $(top_srcdir)/configure: @MAINTAINER_MOD $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +libgo-test-support.exp: $(top_builddir)/config.status $(srcdir)/libgo-test-support.exp.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo Index: gcc/libgo/testsuite/lib/libgo.exp =================================================================== --- gcc.orig/libgo/testsuite/lib/libgo.exp +++ gcc/libgo/testsuite/lib/libgo.exp @@ -14,13 +14,16 @@ # along with GCC; see the file COPYING3. If not see # . -set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] -if {$gccdir != ""} { - set gccdir [file dirname $gccdir] -} -set GOC_UNDER_TEST "$gccdir/gccgo -B$gccdir/" set TESTING_IN_BUILD_TREE 1 +if ![info exists GOC_UNDER_TEST] then { + set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] + if {$gccdir != ""} { + set gccdir [file dirname $gccdir] + } + set GOC_UNDER_TEST "$gccdir/gccgo -B$gccdir/" +} + if [info exists GOTEST_TMPDIR] { set tmpdir $GOTEST_TMPDIR } Index: gcc/libgo/testsuite/libgo-test-support.exp.in =================================================================== --- /dev/null +++ gcc/libgo/testsuite/libgo-test-support.exp.in @@ -0,0 +1 @@ +set GOC_UNDER_TEST {@GOC@} 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@"