On Wed, Sep 29, 2010, Tim Gardner wrote:
> Do you have an example of a package that correctly cross builds? The 
> issue I'm having with the kernel is that there are some native gcc steps 
> that compile tools executed during the build as well as some cross 
> compile steps. If I can correctly determine the schroot host arch as 
> well as the target arch, then I think I can accommodate the various 
> compile steps.

 lucid's x-loader should be relatively similar to the kernel's needs:
http://archive.ubuntu.com/ubuntu/pool/universe/x/x-loader/x-loader_1.4.3git20100305-0ubuntu5.dsc
 (I don't explain why my fixes were dropped in maverick, will chase
 that)

 The key bit is this rules snippet:
    DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
    DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

    CROSS_COMPILE := $(DEB_HOST_GNU_TYPE)-
    ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
    CROSS_COMPILE :=
    endif

 You have to "export CROSS_COMPILE" or pass it to the kernel $(MAKE) call.

-- 
Loïc Minier

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to