From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 41A5E138350 for ; Sun, 26 Jan 2020 22:47:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7FCB3E080E; Sun, 26 Jan 2020 22:47:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3C60DE080E for ; Sun, 26 Jan 2020 22:47:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4CC1334E3F6 for ; Sun, 26 Jan 2020 22:47:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EEA207B for ; Sun, 26 Jan 2020 22:47:11 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1580078827.a2478718a9960f7844eee45e6b140fd071447428.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/, eclass/tests/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/flag-o-matic.eclass eclass/tests/flag-o-matic.sh X-VCS-Directories: eclass/tests/ eclass/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: a2478718a9960f7844eee45e6b140fd071447428 X-VCS-Branch: master Date: Sun, 26 Jan 2020 22:47:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 707bd0b7-4dba-47b8-b30d-9bf5c4014ca1 X-Archives-Hash: da14039f59144c80cf0ee2934a88cfdd commit: a2478718a9960f7844eee45e6b140fd071447428 Author: Sergei Trofimovich gentoo org> AuthorDate: Sun Jan 26 22:42:49 2020 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Sun Jan 26 22:47:07 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2478718 flag-o-matic.eclass: fix probe when CC points to absolute path Signed-off-by: Sergei Trofimovich gentoo.org> eclass/flag-o-matic.eclass | 4 ++-- eclass/tests/flag-o-matic.sh | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 0aec22c83f2..ebfc49bf30b 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -474,8 +474,8 @@ test-flag-PROG() { cmdline_extra+=(-xc) ;; esac - local test_in=${T}/test-flag-${comp}.${lang} - local test_out=${T}/test-flag-${comp}.exe + local test_in=${T}/test-flag.${lang} + local test_out=${T}/test-flag.exe printf "%s\n" "${in_src}" > "${test_in}" || return 1 diff --git a/eclass/tests/flag-o-matic.sh b/eclass/tests/flag-o-matic.sh index 90eaf3a6ffb..229dff52af9 100755 --- a/eclass/tests/flag-o-matic.sh +++ b/eclass/tests/flag-o-matic.sh @@ -139,6 +139,12 @@ out=$(test-flags-CC -O3) [[ $? -eq 0 && ${out} == "-O3" ]] ftend +tbegin "test-flags-CC (valid flags, absolute path)" +absolute_CC=$(type -P $(tc-getCC)) +out=$(CC=${absolute_CC} test-flags-CC -O3) +[[ $? -eq 0 && ${out} == "-O3" ]] +ftend + tbegin "test-flags-CC (invalid flags)" out=$(test-flags-CC -finvalid-flag) [[ $? -ne 0 && -z ${out} ]]