From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id 248F73858D1E for ; Mon, 20 Feb 2023 22:18:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 248F73858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x102c.google.com with SMTP id il18-20020a17090b165200b0023127b2d602so2848579pjb.2 for ; Mon, 20 Feb 2023 14:18:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=s1oV60B8rPN+/2tGq4KCnLg30ECdUuNXfQGL42abAUQ=; b=TfyH5rFu6gtZPNvatceNVGDSLpiQOw4Wd/g3OYID84LhW+QBz60oKEetlB05goNxYg 1RAIQUFkn1M/2rhAYauZ4k45CjGR4AtMpadvVuivHgC52VHo8AsTFv9/Vl+08114GBTA e8NvALeh/Q3fH/GYHyrsx0tQ1cn2Ja0Lm2jxZCnKeiywbeUQua+eit8xoK3GSg39ZOwV CGgtEFvv9viQAkd2rhf4dw/D4slYPrQfSKOVHRI5T7sXmvGTdnYl6QcsBEbz6vjQ5/Cb +PlsZW61uWmgdlVVJmtxpFZEoEKSM1G/maMq6vVlIX7OHYGD57DdQf3C8/O9tmR74XYR eUrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s1oV60B8rPN+/2tGq4KCnLg30ECdUuNXfQGL42abAUQ=; b=TyMsewGQ8Fwoclex3ywcFqcTVlxYHhNEwXFJ7K2CRPsdCEWrnIJ9jUFEb30+qQWkPo pPZvhhEY3yNzLa4dFt6/qMFgP0tOtBi26g0ym/HO/cCkfh7R+P9MUEWqtI6miIPfbUOu B6l/rfLpCJkCjvR+IdbC+mR5z2C6EchzFo79SU2FLVe5DqRfKNEc4KWjHzFgQ8dlKyjH 0s0Iy19Z+oLXVGMtLwpP42qDnejfNNelPCgTX62pq52GhC8QYYjFf8ob1uaUefHYt6dV K8tOhQLAgUaUkcvsxU62U8R3uY0/+nxinV9auRK16Hu8gZii/9ycYR9G7Of2wRq3Qy4G KRLg== X-Gm-Message-State: AO0yUKX1JO7mxlahxbKnqvWmOeZagVXHJMJIcMH+UBMimhKbpnxIr1r9 PlWg7RR7z2NLoPhYaHdGKEV2kDXNRWk= X-Google-Smtp-Source: AK7set+14S6Fp/1TvUz7rfm4z/z6T2XXMobckZQSLuOqNwL2VcSSkCrStfxI6vEqAxNLzY1+dKotaA== X-Received: by 2002:a17:902:c411:b0:19a:9833:708 with SMTP id k17-20020a170902c41100b0019a98330708mr4755285plk.64.1676931500078; Mon, 20 Feb 2023 14:18:20 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:c69:786c:79e2:e82e]) by smtp.gmail.com with ESMTPSA id n20-20020a170902d0d400b0019aa8149cb7sm8327041pln.306.2023.02.20.14.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 14:18:19 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 4A8591142769; Tue, 21 Feb 2023 08:48:17 +1030 (ACDT) Date: Tue, 21 Feb 2023 08:48:17 +1030 From: Alan Modra To: =?iso-8859-1?Q?Cl=E9ment?= Chigot Cc: binutils@sourceware.org Subject: Re: [PATCH v2] ld/testsuite: don't output to /dev/null Message-ID: References: <20230220144302.1234792-1-chigot@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230220144302.1234792-1-chigot@adacore.com> X-Spam-Status: No, score=-3034.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Feb 20, 2023 at 03:43:02PM +0100, Clément Chigot wrote: > Mingw doesn't have /dev/null and thus "-o /dev/null" will fail. > Currently, all the options are checked using this "-o /dev/null", > resulting in them being disabled on mingw hosts. > Fix that by outputting to a real file for all targets. > > ld/ChangeLog: > > * testsuite/config/default.exp: Replace "-o /dev/null" by a > file. > --- > ld/testsuite/config/default.exp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp > index 257fd4ba985..1b568b6f8bb 100644 > --- a/ld/testsuite/config/default.exp > +++ b/ld/testsuite/config/default.exp > @@ -383,6 +383,7 @@ proc compiler_supports { flag args } { > append flags " [board_info [target_info name] ldflags]" > } > set fn "cs[pid].c" > + set fno "cs[pid].exe" > set f [open $fn "w"] > if { [llength $args] > 0 } { > puts $f [lindex $args 0] > @@ -391,7 +392,8 @@ proc compiler_supports { flag args } { > } > close $f > set rfn [remote_download host $fn] > - set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o /dev/null"] > + set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o $fno"] > + file delete $fno I think this should be "remote_file host delete $fno", given where you are running the compiler. OK with that fixed. > remote_file host delete $rfn > file delete $fn > return $avail > -- > 2.25.1 -- Alan Modra Australia Development Lab, IBM