Build gcc from source

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Build gcc from source

Ailomanga sakamoto
Hello.
I want to build a multi-arch gcc that I can build 32  64  and  x32 binary. But there is no guide in the documentation. Could you tell me the detailed way?
Thanks.
Jack.
Reply | Threaded
Open this post in threaded view
|

Re: Build gcc from source

Jonathan Wakely-4
On Wed, 31 Oct 2018 at 15:42, Ailomanga sakamoto wrote:
>
> Hello.
> I want to build a multi-arch gcc that I can build 32  64  and  x32 binary. But there is no guide in the documentation.

Yes there is, see --with-multilib-list at
https://gcc.gnu.org/install/configure.html

Do you really mean multi-arch, or do you mean multi-lib? If you really
mean multi-arch (i.e. Debian and Ubuntu style directory layout) then
use the --enable-multiarch option, documented in the same page.

> Could you tell me the detailed way?

https://gcc.gnu.org/wiki/InstallingGCC and add the
--with-multilib-list=m32,m64,mx32 option.
Reply | Threaded
Open this post in threaded view
|

Re: Build gcc from source

Ailomanga sakamoto
Yes,I really mean multi-arch.
I use ubuntu 18.04 LTS, follow this page,the package "gcc-multilib, libc-dev:i386" must be installed.But I need arm-cross-toolchains,

?? Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Jonathan Wakely <[hidden email]>
Sent: Thursday, November 1, 2018 1:40:17 AM
To: [hidden email]
Cc: gcc-help
Subject: Re: Build gcc from source

On Wed, 31 Oct 2018 at 15:42, Ailomanga sakamoto wrote:
>
> Hello.
> I want to build a multi-arch gcc that I can build 32  64  and  x32 binary. But there is no guide in the documentation.

Yes there is, see --with-multilib-list at
https://gcc.gnu.org/install/configure.html

Do you really mean multi-arch, or do you mean multi-lib? If you really
mean multi-arch (i.e. Debian and Ubuntu style directory layout) then
use the --enable-multiarch option, documented in the same page.

> Could you tell me the detailed way?

https://gcc.gnu.org/wiki/InstallingGCC and add the
--with-multilib-list=m32,m64,mx32 option.
Reply | Threaded
Open this post in threaded view
|

Re: Build gcc from source

Jonathan Wakely-4
In reply to this post by Jonathan Wakely-4
On Thu, 1 Nov 2018 at 00:51, Ailomanga sakamoto <[hidden email]> wrote:
>
> Yes,I really mean multi-arch.

OK.

> I use ubuntu 18.04 LTS, follow this page,the package "gcc-multilib, libc-dev:i386" must be installed.But I need arm-cross-toolchains,

You said you want 32, 64 and x32 ... that means Intel, not ARM.

Please clarify what you're trying to do, so we can help you.

What kind of machine do you want to install GCC on? What kind of
machine do you want to compile code for?


>the package can't be installed so that building gcc was failed.it said that not find stubs-32.h.

That means you didn't install the libc-dev package for the necessary
architecture.

> Cloud you tell me how to build glibc to slove this problem? Thanks.

You should not need to build glibc, Ubuntu already provides ARM cross-compilers.

> John.
> ________________________________
> From: Jonathan Wakely
> Sent: Thursday, November 1, 2018 1:40:17 AM
> To: [hidden email]
> Cc: gcc-help
> Subject: Re: Build gcc from source
>
> On Wed, 31 Oct 2018 at 15:42, Ailomanga sakamoto wrote:
> >
> > Hello.
> > I want to build a multi-arch gcc that I can build 32  64  and  x32 binary. But there is no guide in the documentation.
>
> Yes there is, see --with-multilib-list at
> https://gcc.gnu.org/install/configure.html
>
> Do you really mean multi-arch, or do you mean multi-lib? If you really
> mean multi-arch (i.e. Debian and Ubuntu style directory layout) then
> use the --enable-multiarch option, documented in the same page.
>
> > Could you tell me the detailed way?
>
> https://gcc.gnu.org/wiki/InstallingGCC and add the
> --with-multilib-list=m32,m64,mx32 option.