build.sh: support compiler with path prefix
PATCH 1/1 build.sh: support compiler with path prefix
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
--- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
build.sh +1 -1
@@ -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()
Signature · 1 line
2.30.0
PATCH 1/1 build.sh: support compiler with path prefix
Quoted 23 lines · Li Zhijian
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 configureLTP_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<[email protected]>--- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)build.sh +0
-0
build.sh build_cross() · line 67
Quoted 5 lines
build.sh +1
-1@@ -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.
Best Regards,
Xiao Yang
Quoted 3 lines
build.sh +0
-0} build()
PATCH 1/1 build.sh: support compiler with path prefix
Quoted 26 lines · yangx.jy
Quoted 25 lines · Li Zhijian
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 configureLTP_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<[email protected]>---
?build.sh| 2 +-
? 1 file changed, 1 insertion(+), 1 deletion(-)build.sh +0
-0@@ -64,7 +64,7 @@ build_cross()????? fi
Quoted 6 lines
Quoted 3 lines
????? 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_COMPILEseems unneeeded, right?
Indeed,? CROSS_COMPILE was no longer used since 400ac9bbe20: build: Remove {config.h,config.mk,features.mk,}.default
Thanks
Quoted 9 lines
Other than that it looks good to me.
Reviewed-by Xiao Yang <[email protected]>Best Regards,
Xiao YangQuoted 3 lines
? }
?
build()
PATCH 1/1 build.sh: support compiler with path prefix
In reply to Li ZhijianHi Li,
Quoted 8 lines
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 configureLTP_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
...
Quoted 2 lines
build.sh +1
-1- build $1 $2 "--host=$host" CROSS_COMPILE="${host}-" + build $1 $2 "--host=$(basename $host)" CROSS_COMPILE="${host}-"
...