This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How can I install gcc in different partition?


The current linux os I'm using is in /dev/sda7, mounted as /(root).
I've mounted /dev/sda2 in /media/sda2. Now trying to install gcc in
/media/sda2/usr/bin.

How can a compiler make code? How can a cross compile make code? I
knew, compilers compiles code and generate object code.

On Mon, Jan 9, 2017 at 4:45 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 9 January 2017 at 02:47, ssmtpmailtesting ssmtpmailtesting wrote:
>> I'm on /dev/sda7. I want to install gcc with C++ support in /dev/sda2.
>>
>> 1. Is it possible to install gcc in /dev/sda2?
>
> This question doesn't really make sense. You don't install software
> directly to a disk device, you mount the disk somewhere in your
> filesystem and then install software to a directory in the filesystem.
>
>> 2. What are the dependencies to install gcc? Or which packages should
>> I install there in /dev/sda2 before installing gcc?
>
> The dependencies are all documented (but have nothing to do with the
> disk device you're using).
>
> https://gcc.gnu.org/install/prerequisites.html
>
> You should read the documentation on installation, and also
> https://gcc.gnu.org/wiki/InstallingGCC
>
>> 3. What is cross compiler? How can I install gcc as cross compiler?
>> When do we need to install gcc as cross compiler?
>
> A cross compiler is one that generates code for a different processor
> and/or OS from the system that runs the compiler. For example, you
> could use a cross-compiler on an x86_64 system to generate code for a
> an ARM system.
>
>> 4. Can someone explain the method of installing cross compiled gcc?
>
> It sounds like you don't need to. If you don't know what it is then
> you probably don't need it. If you do need it then read the docs.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]