* [LTP] [PATCH] build.sh: support compiler with path prefix
@ 2021-01-11 1:23 Li Zhijian
2021-01-11 1:39 ` yangx.jy
2021-01-11 8:22 ` Petr Vorel
0 siblings, 2 replies; 4+ messages in thread
From: Li Zhijian @ 2021-01-11 1:23 UTC (permalink / raw)
To: 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 <lizhijian@cn.fujitsu.com>
---
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()
--
2.30.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH] build.sh: support compiler with path prefix
2021-01-11 1:23 [LTP] [PATCH] build.sh: support compiler with path prefix Li Zhijian
@ 2021-01-11 1:39 ` yangx.jy
2021-01-11 3:03 ` Li Zhijian
2021-01-11 8:22 ` Petr Vorel
1 sibling, 1 reply; 4+ messages in thread
From: yangx.jy @ 2021-01-11 1:39 UTC (permalink / raw)
To: ltp
On 2021/1/11 9:23, Li Zhijian wrote:
> 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<lizhijian@cn.fujitsu.com>
> ---
> 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}-"
Hi Petr,
CROSS_COMPILE seems unneeeded, right?
Other than that it looks good to me.
Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Best Regards,
Xiao Yang
> }
>
> build()
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH] build.sh: support compiler with path prefix
2021-01-11 1:39 ` yangx.jy
@ 2021-01-11 3:03 ` Li Zhijian
0 siblings, 0 replies; 4+ messages in thread
From: Li Zhijian @ 2021-01-11 3:03 UTC (permalink / raw)
To: ltp
On 1/11/21 9:39 AM, yangx.jy wrote:
> On 2021/1/11 9:23, Li Zhijian wrote:
>> 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<lizhijian@cn.fujitsu.com>
>> ---
>> ? 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}-"
> Hi Petr,
>
> CROSS_COMPILE seems unneeeded, right?
Indeed,? CROSS_COMPILE was no longer used since
400ac9bbe20: build: Remove {config.h,config.mk,features.mk,}.default
Thanks
> Other than that it looks good to me.
> Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
>
> Best Regards,
> Xiao Yang
>> ? }
>>
>> ? build()
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH] build.sh: support compiler with path prefix
2021-01-11 1:23 [LTP] [PATCH] build.sh: support compiler with path prefix Li Zhijian
2021-01-11 1:39 ` yangx.jy
@ 2021-01-11 8:22 ` Petr Vorel
1 sibling, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2021-01-11 8:22 UTC (permalink / raw)
To: ltp
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}-"
...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-11 8:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 1:23 [LTP] [PATCH] build.sh: support compiler with path prefix Li Zhijian
2021-01-11 1:39 ` yangx.jy
2021-01-11 3:03 ` Li Zhijian
2021-01-11 8:22 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.