install gcc from host to image file

Florian Weimer
Fri Aug 9 07:26:00 GMT 2013

On 08/09/2013 05:03 AM, Hatte John wrote:

>     I have created one hard disk image file ,which has installed linux
> kernel on it , and its filesystem also works fine . Now I want to
> install gcc on it by host's gcc from source .
>     At earlier time ,I consider to set configure option --prefix to
> image mounted location on host , like this: --prefix=/mnt/image , but
> this is found not work at later,due to gcc depend on several files on
> host .
>   So I wan to get some suggestions from here .

--prefix should reflect the path of the final install location, /usr for 
system compilers.  To place the final installation, you can use DESTDIR, 
as described here:


Florian Weimer / Red Hat Product Security Team

More information about the Gcc-help mailing list