This is the mail archive of the
crossgcc@cygnus.com
mailing list for the crossgcc project.
Re: General questions about installing Cross GCC
- To: crossgcc@cygnus.com
- Subject: Re: General questions about installing Cross GCC
- From: linuxburken <linuxburken@bigfoot.com>
- Date: Wed, 07 Jul 1999 22:44:34 +0200
- References: <4.1.19990706173701.00ac7930@mail.dataservice.se>
- Reply-To: crossgcc@cygnus.com
Thank you Mr Evans!
for your information about the directories, how they work (why they are
created, etc).
>Are you saying you specify --target as either arm-unknown-coff or arm--coff?
>If so, don't. Specify "--target=arm-coff". config.sub is an internal
>utility, btw, I don't know of any user need to run it directly.
First, I specified the target as "--target=arm-coff", but then the C
compiler was named:
arm-unknown-coff-gcc, which was not what I wanted.
Then, I tried to specify the target in many different ways. And, if I
specified the target
as "--target=arm--coff" then the C compiler was named:
arm--coff-gcc, which was most close to what I wanted...
However, the correct way to specify the target for ARM with COFF seems to be:
../gcc-2.8.1/configure --target=arm-coff --prefix=/usr/local/ARM
--program-prefix=arm-coff- \
--with-gnu-as --with-gnu-ld
The C compiler is now correctly named:
arm-coff-gcc
Special thanks to Brendan Simon for this information!
CH
> Date: Tue, 6 Jul 1999 14:59:28 -0700
> Message-Id: <199907062159.OAA05725@canuck.cygnus.com.>
From: Doug Evans <devans@cygnus.com>
> To: crossgcc@cygnus.com
> SIn-reply-to: <4.1.19990706173701.00ac7930@mail.dataservice.se> (message from
linuxburken on Tue, 06 Jul 1999 19:44:36 +0200)
ubject: Re: General questions about installing Cross GCC
> Sender: owner-crossgcc@cygnus.com
> Precedence: bulk
Reply-To: crossgcc@cygnus.com
>
> Date: Tue, 06 Jul 1999 19:44:36 +0200
> From: linuxburken <linuxburken@bigfoot.com>
>
> [your editor isn't wrapping long lines, they come out as one long one.
> I have fixed this here.]
>
> I have some general questions about installing Cross GCC. The target I
> have been building the development toolkit is for the ARM chip. The
> directory were I want all files to be installed into is /usr/local/ARM,
> so I have been using the "--prefix=/usr/local/ARM" for all tools when I
> have been configuring them. When I specify the target using the
> "./config.sub" program it will give me the following answer:
>
> ./config.sub arm-coff
> arm-unknown-coff
>
> ./config.sub arm--coff
> arm--coff
>
>Are you saying you specify --target as either arm-unknown-coff or arm--coff?
>If so, don't. Specify "--target=arm-coff". config.sub is an internal
>utility, btw, I don't know of any user need to run it directly.
>
> This will give me toolkit names like: arm-unknown-coff-as,
> arm-unknown-coff-gcc, arm-unknown-coff-ld, etc... or arm--coff-as,
> arm--coff-gcc, arm--coff-ld. However, the GNU Pro Toolkit precompiled
> binaries have names like: arm-coff-as, arm-coff-gcc, arm-coff-ld, etc...
> How have Cygnus configured them? Have the toolkit name been renamed after
> it has been installed? Can I rename the tools after installation? Will
> gcc find the correct tool if I rename them? (I have been using the
> "--with-gnu-ld" for the binutils-2.9.1 and "--with-gnu-as" and
> "--with-gnu-ld" for the gcc-2.8.1)
>
>As stated above, configure with "--target=arm-coff".
>You will then see programs like arm-coff-gcc, arm-coff-ld, etc.
>
>Yes, you can rename them. As long as you leave $prefix/$target/bin/*
>alone (though I suppose even that can be worked around).
>
> Why does binutils-2.9.1 and gcc-2.8.1 install two copies of "as" and "gcc"
> (with different names) in the following directories:
>
> /usr/local/ARM/bin/arm--coff-as
> /usr/local/ARM/arm--coff/bin/as
>
> /usr/local/ARM/bin/arm--coff-gcc
> /usr/local/ARM/arm--coff/bin/gcc
>
> When should I use "/usr/local/ARM/bin/arm--coff-gcc", and when
> should I use "/usr/local/ARM/arm--coff/bin/gcc"?
>
>$prefix/$target/bin/as is for the compiler to use. Don't use it.
>[well you can, but it's not intended that you do so].
>$prefix/bin/${target}-as is for users to use.
>
>Same applies to gcc.
>
>[actually, the above should use $exec_prefix instead of $prefix, but
>$exec_prefix defaults to $prefix]
>
> Why does the binutils-2.9.1 and gcc-2.8.1 make the extra directory
> "/usr/local/ARM/arm--coff" with my configuration?
>
>This is for target specific include files ($prefix/$target/include) and
>libraries/object-files/linker-scripts ($prefix/$target/lib).
>It's also for as,ld for gcc to use ($prefix/$target/bin).
>
> One final question, when I installed newlib-1.8.1 it install all include
>files in:
> /usr/local/ARM/arm--coff/include. But, what about the include directory
> /usr/local/ARM/include? When is this directory used?
>
>$prefix/$target/include is for target specific include files.
>$prefix/include is for target independent include files.
>
> I hope some helpful soul could explain to me why the tools are named
> like this in my configuration and how the directories work.
>
>The reason for the seemingly unnecessary complexity is that the layout
>has been designed to allow several toolchains to live under the same
>tree at once. This includes allowing for several hosts.
>E.g solaris-cross-arm, solaris-cross-m68k, linux-cross-sh, and
>linux-cross-h8300 can all live under one $prefix ($exec_prefix is used
>to separate hosts).
>
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.