From patchwork Tue Sep 3 06:10:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Edlinger X-Patchwork-Id: 1156829 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-508191-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=hotmail.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="UC2q+W8Z"; 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 46MxQZ1rLyz9s7T for ; Tue, 3 Sep 2019 16:10:44 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type:mime-version; q=dns; s= default; b=dBGw03cm1FIWKa9C9veme6I9RkzV8+edm4LNeSBYefSwAH5ARLrA4 XHLusoXW3z8QdhWdY4SEBDtlApM0McVYNVh5O63atL8e+asCUkV5OFbrGcphZb+/ trcps0pEi70bglE3XR05qRETHHOpgqG/6vTTXkGWaF0oShpkQi57L0= 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:from :to:subject:date:message-id:content-type:mime-version; s= default; bh=I2AvRngO7bkYJLKSeYF5OzcqHPA=; b=UC2q+W8ZVsFiVX3R+x8r 72oAsZjAYux3aaUDH9YS+EdIFAS0Jx8R6isQAvBpVFjpf/rx5KiTXFGA+20FVGlz ibei57akfOQ6Sux/lVys4AIhzzIoP9+pOCH4o37A5WD9v+5wkRWRRW9QWMKb1YF9 bB1jdInKZNstCc1ZTD8hV4Y= Received: (qmail 33690 invoked by alias); 3 Sep 2019 06:10: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 33277 invoked by uid 89); 3 Sep 2019 06:10:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy=1706, 17025, RUNTESTFLAGS, runtestflags X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-oln040092066087.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (40.92.66.87) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Sep 2019 06:10:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BRe/nFQ2YMtN1Dfjd7rayb2/S5vlG95eYheOcDlmrDs5iFFPAJyzEZxM3/XcBN1BnRO5xMY1Ojvmed5FMExRUFMdq+l0kPk135/wPscTSe8XzPQ182tvJPqGreGsMgsrIQym4eVqOmDQgRt3jokTcia51dPAUMM5bWrtf7dWMvZGtSRvF0qrG2QreH2ngpjKq5efRC7p3qijiwEFPCBgp2mVmCQqo1plz7Wy+ldbUks8gCNgVvtRG3ucf3oEGaCwIR8V6iAFbwfHz2+BBL3f4xQw9wUqqnJRP/RDH+9qCK2VRKGE6H1Wm1m+Qss7Qd2y/pLPmYdw3rD+oZg3bdHYxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r8k+B9L8r7GUQRmS/kE+rwwD1WmOJUgXsOKqiXvLNGA=; b=X4TH1VAf4qOhlCs/e9g0wGQ4yli36+3s+12kYfVLoeT5pXxx+o/dWDtsCVq5CO2inHLGAcOnnQtRjpVgTOMbmuRjg1MWHG92DvCUZ+85Mv7FNWDnDZu9SBoh7n1hsjAEk7Yb900GtLu+PjXT2O637K0alpx2H8GSR9QbxARApyNBcPdI7MNUYPHthM4in2uYlZkIO5V3509I9++OhMALvaymGaZcdUDIiflRSIIMNJFWDG4bSnub4lcTv1kgq+AstXEhffULIw21BZNW1W+3ioKcDfSMEGiZjDecpxXNtsbjhl49AhMfmpqK0iiVzuvJ7GXzzQCiqdhsUksPCRV7UA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from HE1EUR01FT047.eop-EUR01.prod.protection.outlook.com (10.152.0.53) by HE1EUR01HT140.eop-EUR01.prod.protection.outlook.com (10.152.1.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2220.16; Tue, 3 Sep 2019 06:10:31 +0000 Received: from AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM (10.152.0.52) by HE1EUR01FT047.mail.protection.outlook.com (10.152.1.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2220.16 via Frontend Transport; Tue, 3 Sep 2019 06:10:31 +0000 Received: from AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM ([fe80::2c65:b468:fdc0:d924]) by AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM ([fe80::2c65:b468:fdc0:d924%6]) with mapi id 15.20.2220.021; Tue, 3 Sep 2019 06:10:31 +0000 From: Bernd Edlinger To: "gcc-patches@gcc.gnu.org" , Iain Buclaw Subject: [PATCH] [LIBPHOBOS] Fix multi-lib RUNTESTFLAGS handling Date: Tue, 3 Sep 2019 06:10:31 +0000 Message-ID: x-microsoft-original-message-id: <05b10951-72ae-f701-1266-f80781ed229a@hotmail.de> x-ms-exchange-transport-forked: True MIME-Version: 1.0 Hi, I've noticed that testing libphobos fails for multi-lib configs: $ make check-target-libphobos RUNTESTFLAGS="--target_board=unix\{-m32,\}" fails for every 32bit execution, because the host libgcc_s.so is used which is not the correct version: spawn [open ...] ./test_aa.exe: /lib/i386-linux-gnu/libgcc_s.so.1: version `GCC_7.0.0' not found (required by ./test_aa.exe) FAIL: libphobos.aa/test_aa.d execution test This can be fixed by adding a few lines from libstdc++/testsuite/lib/libstdc++.exp to libphobos/testsuite/lib/libphobos.exp, see attached patch. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2019-09-02 Bernd Edlinger * testsuite/lib/libphobos.exp (libphobos_init): Add multi-lib libgcc dirs to the ld_library_path var. Index: libphobos/testsuite/lib/libphobos.exp =================================================================== --- libphobos/testsuite/lib/libphobos.exp (revision 275320) +++ libphobos/testsuite/lib/libphobos.exp (working copy) @@ -170,6 +170,25 @@ proc libphobos_init { args } { append ld_library_path ":${blddir}/src/.libs" } + # Compute what needs to be added to the existing LD_LIBRARY_PATH. + if {$gccdir != ""} { + set compiler ${gccdir}/gdc + + if { [is_remote host] == 0 && [which $compiler] != 0 } { + foreach i "[exec $compiler --print-multi-lib]" { + set mldir "" + regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir + set mldir [string trimright $mldir "\;@"] + if { "$mldir" == "." } { + continue + } + if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } { + append ld_library_path ":${gccdir}/${mldir}" + } + } + } + } + set_ld_library_path_env_vars libphobos_maybe_build_wrapper "${objdir}/testglue.o"