Re: [PATCH v2 1/1] Support cross-compilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Original Message-----
> In order to support cross-compilation of crash-utilty,
> the configure tool compiled from configure.c must be built
> for the host architecture where the cross-compilation will run
> instead of the target architecture where the crash-utility shall run.
> Therefore, we need to support two C compilers in Maklefile,
> one for the host and one for the target. The old CC makefile variable
> shall represent the compiler for the target architecture and
> the new CONF_CC makefile variable shall represent the host compiler.
> Both variables differ only when a cross-compilation is performed.
> Furthermore, there must be a way to override the target architecture
> which is deduced from the preprocessor macros defined by the compiler
> used for the compilation of configure.c, because otherwise the configure
> tool will deduce host's architecture instead of the desired target.
> With the new preprocessor define CONF_HOST_ARCH, it is possible to
> set the desired target architecture for the compiled crash-utility.
> When cross-compiling, pass the value of CONF_HOST_ARCH via
> the CONF_CFLAGS makefile variable, e.g. like this:
> 
>     make CONF_CC=gcc CC=s390x-linux-gnu-gcc CONF_FLAGS="-DCONF_HOST_ARCH=S390X"
> 
> Signed-off-by: Alexander Egorenkov <egorenar-dev@xxxxxxxxxx>
> ---
> 
> 
> v1 -> v2:
>  * Improved commit message
>  * Added a note how to cross-compile crash-utilty to README
>  * Moved CONF_CC makefile variable to correct place location

Thank you for updating, the v2 patch looks good to me.

Acked-by: Kazuhito Hagio <k-hagio-ab@xxxxxxx>

Kazu


--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux