From patchwork Mon Jan 11 01:23:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Zhijian X-Patchwork-Id: 1424381 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cn.fujitsu.com Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DDbbF2vPSz9sWj for ; Mon, 11 Jan 2021 12:24:19 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 0038B3C602E for ; Mon, 11 Jan 2021 02:24:08 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) by picard.linux.it (Postfix) with ESMTP id C724B3C2648 for ; Mon, 11 Jan 2021 02:24:06 +0100 (CET) Received: from heian.cn.fujitsu.com (mail.cn.fujitsu.com [183.91.158.132]) by in-2.smtp.seeweb.it (Postfix) with ESMTP id B0C07600810 for ; Mon, 11 Jan 2021 02:24:05 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.79,337,1602518400"; d="scan'208";a="103345997" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 11 Jan 2021 09:23:54 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id CFDA44CE5CE7; Mon, 11 Jan 2021 09:23:47 +0800 (CST) Received: from G08CNEXCHPEKD05.g08.fujitsu.local (10.167.33.203) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 11 Jan 2021 09:23:48 +0800 Received: from FNSTPC.g08.fujitsu.local (10.167.226.45) by G08CNEXCHPEKD05.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 11 Jan 2021 09:23:48 +0800 From: Li Zhijian To: Date: Mon, 11 Jan 2021 09:23:38 +0800 Message-ID: <20210111012338.5482-1-lizhijian@cn.fujitsu.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-yoursite-MailScanner-ID: CFDA44CE5CE7.AD31E X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: lizhijian@cn.fujitsu.com X-Spam-Status: No, score=0.4 required=7.0 tests=KHOP_HELO_FCRDNS, SPF_HELO_NONE, SPF_NONE autolearn=disabled version=3.4.4 X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH] build.sh: support compiler with path prefix X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Previously, specify a compiler with path prefix will lead to a error like below: ltp$ ./build.sh -t cross -c /opt/gcc-4.9.3-64-gnu/bin/mips64el-linux-gcc ... It was created by ltp configure LTP_VERSION, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure --with-open-posix-testsuite --with-realtime-testsuite --prefix=/home/lizj/ltp-install --host=/opt/gcc-4.9.3-64-gnu/bin/mips64el-linux CROSS_COMPILE=/opt/gcc-4.9.3-64-gnu/bin/mips64el-linux- ... #define VERSION "LTP_VERSION" configure: exit 1 Signed-off-by: Li Zhijian Reviewed-by: Xiao Yang --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 452cc6f4c..a662c9cb4 100755 --- a/build.sh +++ b/build.sh @@ -64,7 +64,7 @@ build_cross() fi echo "===== cross-compile ${host} ${1}-tree build into $PREFIX =====" - build $1 $2 "--host=$host" CROSS_COMPILE="${host}-" + build $1 $2 "--host=$(basename $host)" CROSS_COMPILE="${host}-" } build()