Message ID | ZcDnilo9xkjaDa/u@tucnak |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp884497dyb; Mon, 5 Feb 2024 05:50:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyovnsbuA+Wu0/fFjMayk6LD/OikVbrGaUWbI5aVSWz/B6P8HXI+97uPhFUo8Mf7NEzoKo X-Received: by 2002:a05:622a:1788:b0:42a:2e15:81b6 with SMTP id s8-20020a05622a178800b0042a2e1581b6mr8370226qtk.26.1707141053766; Mon, 05 Feb 2024 05:50:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707141053; cv=pass; d=google.com; s=arc-20160816; b=noOfY87OoshpShO0Fj4TgeUles9LuVpTpQg+6eGayWEGNHLOPpD2cTuQRWkr9fZsOC EQOfDSZloBTt8iY07SO6Z/2wOiUEvWIjppHKJKq8hBI/D/ztJYyakn4zh66scZtZzA9L skoaLdUDxgDLbyLrrmrzyX+/fiOis8JO76XHnH9FRQ7tRDdBthc4HTIioY9Cj1fdhynw Wj4wxxFBwfaAwTJINYENxQZsYyt4Hl0hRN7CHjM2VtMMoxMZnBdzusD+BxO1tf1h/AcX XjVA1RywBeq5Jq+6QBcLg1+P3Fe29vc1vOgyJrFOs5vZ9PTudIc8AARtyeKyAA5l0FVy mz+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=TCJ+05C778WBekCP00beDO36QDrMKYk/8sS5eFDe4BA=; fh=j5y4bjNH70yEMrItahhhczmi4x8efrUujlVScKqJadQ=; b=gSAmUx/Met8F4gz98LHWwpdI2/mmTxzQ5wsbIzamgSMZPaTAaq1NQp/NoVMZk+PQbe 4uxQYn501ambMTbSxRbe3c7RMeyDs6OPMDDXbxXUuH1pQcjN+mRhmguFbG9JwMqpf0Rw dMgHgwpT1Amvod9rinFMXd+jNGNPdv0of06MPnokg4bezW7yVqWs+sJd7LV8TUlCtLQZ NYn7cRD2xl5de5R+4WHZeV+fATrFUlp5sWaz6PKdRpKLb/otXE2oGEwo8vwJDy3nZBCW RTlH0HwQV9TzUQq4MW/4Geq/7++7DJF1hdPhzFdHUZw8b4g/JSEmHR7h0/rSAuvEWMsU Vr1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SiJg1CdN; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCXLKj5l1H2ZE3NdsOQSNSZ9r+giNkPtPIpBGtUPrudofXNbaxkVVDwxWPGBV8c6KPpxkgrqggKh++VEKdzNpuDdUTZuMA== Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id wa7-20020a05620a4d0700b007839273251bsi8433454qkn.322.2024.02.05.05.50.53 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 05:50:53 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SiJg1CdN; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 743E1385840D for <ouuuleilei@gmail.com>; Mon, 5 Feb 2024 13:50:53 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 0A74E3858CDB for <gcc-patches@gcc.gnu.org>; Mon, 5 Feb 2024 13:50:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A74E3858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0A74E3858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707141012; cv=none; b=b41QtNtGYCfy0QYBoDnqHoz3mooXUxS5YjMZFET1CUeI5uWmuj2LTzrBFVCnaFNpNjNubVk0JQ7O08gIbJaQEmt4DLtiQ4AS8AM3sv6UYUgJdb3wc2c0HcyhWf/TvH3hjFQgC+IApAEENfP9KZTAwwjZcfwECgqOYvIolyN8Cms= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707141012; c=relaxed/simple; bh=uRvWBOnwEa/Cjrl1dfCmDYB9OgLrsptFNTPHlnt4sgM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Od+qCrNqvrT+Tg2Un4U1w2HRgVnelcXh+F5eYKfQjTWeuOjrHpwhJyLNawCTrYWAySLz46yRY/8p06I9qkR5lbiK3ug3w4fUH6cME4ObaRp/AbCmjCihUkMvn2xsy+Yy4B4lVl11I2c7WnYLSTKhyA5QKupsovrP6RKepoAUH9g= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707141009; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=TCJ+05C778WBekCP00beDO36QDrMKYk/8sS5eFDe4BA=; b=SiJg1CdNehWnz4GVp5GNHnOvzcr4rPEruih6s9qZcQuuTJmTBvNJAmuBYoBViBbIs+cJ9E 4lbkVhi3ZUZdmueIwqrotDi55XUKU5OITeCVVaRrC06BnOHfZ/71zjGcpH7nmOCF3CGu3x VO/QW4yT6GEV3fIW76799xPZW4Okjn8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-400-BiGlQWTCNNSSh03MuQVbLA-1; Mon, 05 Feb 2024 08:50:08 -0500 X-MC-Unique: BiGlQWTCNNSSh03MuQVbLA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D773B85A58C; Mon, 5 Feb 2024 13:50:07 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97FA01C060B3; Mon, 5 Feb 2024 13:50:07 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 415Do4si328591 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 5 Feb 2024 14:50:04 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 415Do2tk328590; Mon, 5 Feb 2024 14:50:02 +0100 Date: Mon, 5 Feb 2024 14:50:02 +0100 From: Jakub Jelinek <jakub@redhat.com> To: Alexandre Oliva <aoliva@redhat.com>, Rainer Orth <ro@cebitec.uni-bielefeld.de>, Mike Stump <mikestump@comcast.net> Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] contrib: Fill in HOST{CC,CFLAGS,CXX,CXXFLAGS} in test_installed Message-ID: <ZcDnilo9xkjaDa/u@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790067137357852724 X-GMAIL-MSGID: 1790067137357852724 |
Series |
contrib: Fill in HOST{CC,CFLAGS,CXX,CXXFLAGS} in test_installed
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jakub Jelinek
Feb. 5, 2024, 1:50 p.m. UTC
Hi! gcc/Makefile.in since my r0-60234 change fills in HOSTCC and HOSTCFLAGS in site.exp and since r8-671 also HOSTCXX and HOSTCXXFLAGS. If those variables aren't set, we get errors like: /usr/src/gcc/contrib/test_installed --without-g++ --without-gfortran --without-objc struct-layout-1.exp ... ERROR: tcl error sourcing /usr/src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp. ERROR: tcl error code TCL LOOKUP VARNAME HOSTCC ERROR: can't read "HOSTCC": no such variable while executing "remote_exec build "$HOSTCC $HOSTCFLAGS $generator_cmd"" (file "/usr/src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp" line 96) invoked from within "source /usr/src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp" ("uplevel" body line 1) invoked from within "uplevel #0 source /usr/src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp" invoked from within "catch "uplevel #0 source $test_file_name" msg" (similarly in g++ or gfortran) struct-layout-1.exp. One doesn't need to test specially for just struct-layout-1.exp alone, just not using any arg will trigger it as well, just later. The following patch fills it in as cc and c++ with empty flags to compile those, I believe that is what e.g. make uses by default, so it should be a reasonable default. We IMHO shouldn't default to GCC_UNDER_TEST because that might be a cross-compiler etc. Ok for trunk? 2024-02-05 Jakub Jelinek <jakub@redhat.com> * test_installed: Fill in HOSTCC, HOSTCXX, HOSTCFLAGS and HOSTCXXFLAGS. Jakub
Comments
On 2/5/24 06:50, Jakub Jelinek wrote: > Hi! > > gcc/Makefile.in since my r0-60234 change fills in HOSTCC and HOSTCFLAGS > in site.exp and since r8-671 also HOSTCXX and HOSTCXXFLAGS. > If those variables aren't set, we get errors like: > /usr/src/gcc/contrib/test_installed --without-g++ --without-gfortran --without-objc struct-layout-1.exp > ... > ERROR: tcl error sourcing /usr/src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp. > ERROR: tcl error code TCL LOOKUP VARNAME HOSTCC > ERROR: can't read "HOSTCC": no such variable > while executing > "remote_exec build "$HOSTCC $HOSTCFLAGS $generator_cmd"" > (file "/usr/src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp" line 96) > invoked from within > "source /usr/src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp" > ("uplevel" body line 1) > invoked from within > "uplevel #0 source /usr/src/gcc/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp" > invoked from within > "catch "uplevel #0 source $test_file_name" msg" > > (similarly in g++ or gfortran) struct-layout-1.exp. One doesn't need to > test specially for just struct-layout-1.exp alone, just not using any arg > will trigger it as well, just later. > > The following patch fills it in as cc and c++ with empty flags to compile > those, I believe that is what e.g. make uses by default, so it should be a > reasonable default. We IMHO shouldn't default to GCC_UNDER_TEST because > that might be a cross-compiler etc. > > Ok for trunk? > > 2024-02-05 Jakub Jelinek <jakub@redhat.com> > > * test_installed: Fill in HOSTCC, HOSTCXX, HOSTCFLAGS and > HOSTCXXFLAGS. Ugh. test_installed :( Probably a necessary evil, though I suspect few people are using it. So if it works for the scenarios you're testing, then OK by me. jeff
On Feb 5, 2024, Jakub Jelinek <jakub@redhat.com> wrote: > * test_installed: Fill in HOSTCC, HOSTCXX, HOSTCFLAGS and > HOSTCXXFLAGS. LGTM, thanks,
--- contrib/test_installed.jj 2024-01-03 11:51:20.865879222 +0100 +++ contrib/test_installed 2024-02-05 14:36:03.625047250 +0100 @@ -114,6 +114,10 @@ set GCC_UNDER_TEST "${GCC_UNDER_TEST-${p set GXX_UNDER_TEST "${GXX_UNDER_TEST-${prefix}${prefix+/bin/}g++}" set GFORTRAN_UNDER_TEST "${GFORTRAN_UNDER_TEST-${prefix}${prefix+/bin/}gfortran}" set OBJC_UNDER_TEST "${OBJC_UNDER_TEST-${prefix}${prefix+/bin/}gcc}" +set HOSTCC "${HOSTCC-cc}" +set HOSTCXX "${HOSTCXX-c++}" +set HOSTCFLAGS "" +set HOSTCXXFLAGS "" EOF if test x${target} != x; then echo "set target_triplet $target" >> site.exp