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: Cross compiler, binutils, build


Can I instruct the build to use binaries like <myarch>-ar-<version>
for e.g. building libgcc?

On Sat, Jul 27, 2013 at 1:26 AM, Andrew Haley <aph@redhat.com> wrote:
> On 07/27/2013 12:01 AM, Hendrik Greving wrote:
>> I am looking at how to best integrate building a cross compiler in our
>> source tree, which is a little bit old-baken and easy to break.
>> Nevertheless, I'd like to to it like you're supposed to do with new
>> GCC's. I am using 4.8.1 now. Rather than describing my specific
>> problem, let me ask very general here. What I want is to build
>> re-targeted binutils for <myarch> with program-prefix <myarch> and
>> program-suffix <version>.
>>
>> How best to build GCC and tell the built driver to use binutils above
>> as well as using this for building libgcc (and bootstrapping)?
>>
>> ./gcc/configure --prefix=<myprefix>
>>  --program-prefix=<myarch>-
>> --program=suffix=-<myversion>
>> --disable-multilib
>> --with-ld= DO I NEED THIS
>> --with-as= DO I NEED THIS
>> --target=<myarch-os>
>> --with-newlib --enable-languages=c
>> --with-sysroot= DO I NEED THIS?
>> --with-build-sysroot= DO I NEED THIS?
>>
>> What I saw was basically the compiler looking for <myarch-os>-ar while
>> building the libgcc library.
>
> Redirect to gcc-help.
>
> It's best to use an integrated tree.
>
> I copy the binutils source subdirs into gcc with a little script (available on
> request) then:
>
> /scratch/aarch64/trunk/configure --prefix=/usr/local/aarch64-redhat-linux --target=aarch64-redhat-linux --with-sysroot=/scratch/aarch64/rootfs
>
> That is all.  It builds everything: assembler, linker, the whole lot.
>
> There is no better way to do it.
>
> Andrew.
>


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