All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE
@ 2021-01-11  3:07 Li Zhijian
  2021-01-11  3:07 ` [LTP] [PATCH 2/2] build.sh: support compiler with path prefix Li Zhijian
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Li Zhijian @ 2021-01-11  3:07 UTC (permalink / raw)
  To: ltp

The CROSS_COMPILE was no longer used by ltp since 400ac9bbe20.

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..602ca419e 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=$host"
 }
 
 build()
-- 
2.30.0




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [LTP] [PATCH 2/2] build.sh: support compiler with path prefix
  2021-01-11  3:07 [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE Li Zhijian
@ 2021-01-11  3:07 ` Li Zhijian
  2021-01-11  3:45 ` [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE Xiao Yang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Li Zhijian @ 2021-01-11  3:07 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
...
 #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 602ca419e..1ec6a51d8 100755
--- a/build.sh
+++ b/build.sh
@@ -57,7 +57,7 @@ build_native()
 
 build_cross()
 {
-	local host="${CC%-gcc}"
+	local host=$(basename "${CC%-gcc}")
 	if [ "$host" = "gcc" ]; then
 		echo "Invalid CC variable for cross compilation: $CC (clang not supported)" >&2
 		exit 1
-- 
2.30.0




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE
  2021-01-11  3:07 [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE Li Zhijian
  2021-01-11  3:07 ` [LTP] [PATCH 2/2] build.sh: support compiler with path prefix Li Zhijian
@ 2021-01-11  3:45 ` Xiao Yang
  2021-01-11  8:45 ` Xiao Yang
  2021-01-11 15:28 ` Petr Vorel
  3 siblings, 0 replies; 5+ messages in thread
From: Xiao Yang @ 2021-01-11  3:45 UTC (permalink / raw)
  To: ltp

Hi Li,

Thanks for your work, I pushed the patch set. :-)

Best Regards,
Xiao Yang
On 2021/1/11 11:07, Li Zhijian wrote:
> The CROSS_COMPILE was no longer used by ltp since 400ac9bbe20.
>
> 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..602ca419e 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=$host"
>   }
>
>   build()




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE
  2021-01-11  3:07 [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE Li Zhijian
  2021-01-11  3:07 ` [LTP] [PATCH 2/2] build.sh: support compiler with path prefix Li Zhijian
  2021-01-11  3:45 ` [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE Xiao Yang
@ 2021-01-11  8:45 ` Xiao Yang
  2021-01-11 15:28 ` Petr Vorel
  3 siblings, 0 replies; 5+ messages in thread
From: Xiao Yang @ 2021-01-11  8:45 UTC (permalink / raw)
  To: ltp

Hi Petr,

I have merged it because CROSS_COMPILE seems unneeded.
Please tell me if you have any objection.

Best Regards,
Xiao Yang
On 2021/1/11 11:07, Li Zhijian wrote:
> The CROSS_COMPILE was no longer used by ltp since 400ac9bbe20.
>
> 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..602ca419e 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=$host"
>   }
>
>   build()




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE
  2021-01-11  3:07 [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE Li Zhijian
                   ` (2 preceding siblings ...)
  2021-01-11  8:45 ` Xiao Yang
@ 2021-01-11 15:28 ` Petr Vorel
  3 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2021-01-11 15:28 UTC (permalink / raw)
  To: ltp

Hi Li,

> The CROSS_COMPILE was no longer used by ltp since 400ac9bbe20.

> 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..602ca419e 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}-"
I looked what would require CROSS_COMPILE support. It's somehow duplicate to
autoconf --host parameter.

Although it wouldn't be difficult to add a support into configure.ac and
include/mk/config.mk.in via AC_ARG_VAR, it's use would require:

1) either migrate everything to pkg-config (but libnuma and libaio does not
support it) and use PKG_CONFIG_LIBDIR

2) fix host cpu detection in m4/ltp-host-cpu.m4 (parse CROSS_COMPILE).

=> IMHO it's not worth of doing it, thus good we removed it.

Kind regards,
Petr

> +	build $1 $2 "--host=$host"
>  }

>  build()

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-11 15:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11  3:07 [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE Li Zhijian
2021-01-11  3:07 ` [LTP] [PATCH 2/2] build.sh: support compiler with path prefix Li Zhijian
2021-01-11  3:45 ` [LTP] [PATCH 1/2] build.sh: Remove deprecated CROSS_COMPILE Xiao Yang
2021-01-11  8:45 ` Xiao Yang
2021-01-11 15:28 ` 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.