From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Mon, 11 Jan 2021 09:22:25 +0100 Subject: [LTP] [PATCH] build.sh: support compiler with path prefix In-Reply-To: <20210111012338.5482-1-lizhijian@cn.fujitsu.com> References: <20210111012338.5482-1-lizhijian@cn.fujitsu.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi Li, > 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- Thanks for your fix. Although I expected use basename and set PATH, e.g.: CROSS_COMPILE=mips64el-linux- PATH="/opt/gcc-4.9.3-64-gnu/bin/:$PATH" it's obviously good to support full path for $CROSS_COMPILE Kind regards, Petr ... > - build $1 $2 "--host=$host" CROSS_COMPILE="${host}-" > + build $1 $2 "--host=$(basename $host)" CROSS_COMPILE="${host}-" ...