From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc33.google.com (mail-oo1-xc33.google.com [IPv6:2607:f8b0:4864:20::c33]) by sourceware.org (Postfix) with ESMTPS id B9ADA3858D1E for ; Mon, 5 Feb 2024 16:07:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9ADA3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B9ADA3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707149272; cv=none; b=D00ZLDhLnP6Taan8KdOIHHCJcBVqk1cT8dnZKzzQHY5IGrZiBsMB8IwQW8DRbvd9jC7Azn3Uhq1babQh82H3p/1TU8CZm1XpXM9hI4lDjP2frrIpSJUH7gCiFQfjWm8LxiJO6bSRXI1e+BvazltdvmKW6fnniX5f15bJPLpjERI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707149272; c=relaxed/simple; bh=l5Zm+eQbfUr8FdpMESLj8c9RxQP1I+hF8TB/kmFO1IQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=a6NLKKrv6+b9HIdpMAyRqhL/Ug19hHbfpwHekTEnJbLVIS0Bo1eGTQbaomj7bQz54FvE/aZUK0fnxGpEBEa9RwR7PLHOjCelsobrOw6vIrHApwEfoEvUhjyd7wmW5MB0nx5Y7v40azd7fupllBpNuls0fZS5tkI1C8vtxTvKy3M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-59a8b9b327aso1896408eaf.2 for ; Mon, 05 Feb 2024 08:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707149268; x=1707754068; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=PYKDNQVwg1eiMsgvwpbzF/BfriMnJ+gmiI99VvVTykg=; b=izeH9Q7NssBECqyKDT2ut+Y9hC9znfd8JXRhZGG/7Y2iarh9bUx6oAqR9CS/vWCloL tKaOKCsaWcqPurIZVAcYnYTP5mKReJJ2jiuZbH4bgHETbm8vaXUyeKh9DSzzd1qNSjF8 77d4tVeaihwD4149fESce+G+kFlvkwCt8PkWVKN4lJzgKQqHLeOCMWpKA/1m5qxAN89D zn/Hnw806QBPtfgQO8OsjuUKFVhs62bkJEdbs6kkJ4vFCpKbc9yi9w8xX9kpUr28WUFl S3QbmO9+FaD45slHOXgUXV1RD5ZyusLFPAm7Uzd/ts60i+feSVpLybSoTLIzKpeiyx85 42yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707149268; x=1707754068; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PYKDNQVwg1eiMsgvwpbzF/BfriMnJ+gmiI99VvVTykg=; b=iLysNpTyae9qKZlYNL/SX9n5r0OZVcGJOKCEYjzrNZX2QC64V4b4daA5Z3LcfC89WC L8D6fu8d9VuadJDvHEgori1XhQ4ogRm9FEq8iA6zUTWNF6/BRlZE07CrzWrHYF9YfyKO hgtL7+dUU1CAmgVRlto/Sxe5LzM2MZ/ahsaG6q6AilijSHeuWrBEHaMGOV++UOHeq9/R ZDUbcdM7glx+ZoC7FXZL1GQBmG+niYTl79aEoX5sAN9UUrY8CvpeCvopD1bPG0ShxZTW M9bOnw9cAy5jJlcU/i7O4RI4kF3XuyZEYupb/SqLNmI6zEuY2srvvjDfTB/Jttox3Y0v mGXQ== X-Gm-Message-State: AOJu0YyQm9G7kZM+3JB4upkvI4oN2nObPL80iOojrD4nFsJTuY4B8UFJ aTCkJQGz1UQoDb3zvjUANm6QdHHjCAUTtyt5b/AMHIvbYkpnTllM X-Google-Smtp-Source: AGHT+IHtApHnVzB/qZVTm/lfEYfv/Uh0r7Mw6nlatLaNXmV+5dTwulxK5C7osbgBHcuUp+TfXQqwVg== X-Received: by 2002:a4a:9c8b:0:b0:593:f906:614f with SMTP id z11-20020a4a9c8b000000b00593f906614fmr139545ooj.4.1707149266001; Mon, 05 Feb 2024 08:07:46 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWEEs4UrsBLuEwbYyQZdfSRxLToaD6G8e6EpurpvejMZhU1b1gMw8cBpUxMV1L76I0L2rO+2rFcSYHO2Sybvf9NwuJRmDZrD+HSX2VBJyp+rGO6J/5N3nIGK/jbhWkuTzQ3sYGIfdvL3+t2mFPtl8cKJVpS3oE= Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id o12-20020a4a384c000000b005990bd1e1dcsm19053oof.17.2024.02.05.08.07.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Feb 2024 08:07:45 -0800 (PST) Message-ID: <538ab469-5d7f-4eb2-8399-b8565e39b5f1@gmail.com> Date: Mon, 5 Feb 2024 09:07:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] contrib: Fill in HOST{CC,CFLAGS,CXX,CXXFLAGS} in test_installed Content-Language: en-US To: Jakub Jelinek , Alexandre Oliva , Rainer Orth , Mike Stump Cc: gcc-patches@gcc.gnu.org References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: 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 > > * 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