Bug#572431: busybox: add cross compilation support
04.03.2010 10:51, Hector Oron wrote:
> Package: busybox
> Version: 1:1.14.2-2
> Severity: wishlist
> Tags: patch
>
>
> Hello,
>
> Could you please consider the following patch to be able to cross compile busybox package?
>
>
> diff -urN busybox-1.15.3/debian/patches/cross-compiler.patch busybox-1.15.3.foo//debian/patches/cross-compiler.patch
> --- busybox-1.15.3/debian/patches/cross-compiler.patch 1970-01-01 01:00:00.000000000 +0100
> +++ busybox-1.15.3.foo//debian/patches/cross-compiler.patch 2010-03-03 21:59:40.000000000 +0100
> @@ -0,0 +1,14 @@
> +Index: busybox-1.15.3.foo/scripts/gcc-version.sh
> +===================================================================
> +--- busybox-1.15.3.foo.orig/scripts/gcc-version.sh 2010-03-03 21:58:32.000000000 +0100
> ++++ busybox-1.15.3.foo/scripts/gcc-version.sh 2010-03-03 21:59:13.000000000 +0100
> +@@ -8,5 +8,9 @@
> +
> + compiler="$*"
> +
> ++if [ x"${compiler}" == x"${DEB_HOST_GNU_TYPE}-" ]; then
> ++ compiler=${compiler}-gcc
> ++fi
Are you sure this works as you expect? Note the double-dash
this statement adds.
[]
> +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
> +export CROSS_COMPILE = $(DEB_HOST_GNU_TYPE)-
> +endif
Besides, can't we add something like CC=prefix-gcc to the
upstream make arguments (or to conffile), without patching
anything?
Thanks,
/mjt
Reply to: