public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Installing cross-compiler for PowerPC 603, pSOS
@ 2000-01-14 11:35 JAY LULLA
  2000-04-01  0:00 ` JAY LULLA
  0 siblings, 1 reply; 6+ messages in thread
From: JAY LULLA @ 2000-01-14 11:35 UTC (permalink / raw)
  To: crossgcc, gcc-help; +Cc: jay.lulla, hsing.yuan, swamin

Hi. I would like to get some advice about cross-compiling GCC for a Sun
Solaris host, and PowerPC target.

We have already installed gcc-2.95.2, with its complete source.

Here are some issues I need to address:
- should the cross-compiler be installed in the same dir as the native
compiler, and then be called with a special flag, or should it be
installed in a whole new directory altogether?

- should we use flags such as 'with-as' 'with-ld' and 'with-headers' to
specify directories for the assembler, linker, and headers, or is it
best to leave these out, and then specify which assemblers, linkers etc
to use as flags when we actually use the cross-gcc? - If we use the
flags when we actually run gcc, we would have more flexibility in trying
different assemblers and linkers, or have the option of not linking at
all, right? - Or would you have the same flexibility by installing it
with default directories, and then overriding the defaults if you choose
to do so when running gcc?

- does it matter what version of 'make' one uses? ie whether we use
'make' from cc or from GNU?

- I've never used binutils before. What is it all about? Does it have
any useful tools for profiling the code (analyzing it to produce a
function call graph, for example)?
-----------------------------

On a related note, I notice that GCC has tools to make it compatible
with certain embedded operating systems. Are there any tools for pSOS? I
couldn't find any...

Thanks,
Jay Lulla
jay.lulla@ebay.sun.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Installing cross-compiler for PowerPC 603, pSOS
  2000-01-14 11:35 Installing cross-compiler for PowerPC 603, pSOS JAY LULLA
@ 2000-04-01  0:00 ` JAY LULLA
  0 siblings, 0 replies; 6+ messages in thread
From: JAY LULLA @ 2000-04-01  0:00 UTC (permalink / raw)
  To: crossgcc, gcc-help; +Cc: jay.lulla, hsing.yuan, swamin

Hi. I would like to get some advice about cross-compiling GCC for a Sun
Solaris host, and PowerPC target.

We have already installed gcc-2.95.2, with its complete source.

Here are some issues I need to address:
- should the cross-compiler be installed in the same dir as the native
compiler, and then be called with a special flag, or should it be
installed in a whole new directory altogether?

- should we use flags such as 'with-as' 'with-ld' and 'with-headers' to
specify directories for the assembler, linker, and headers, or is it
best to leave these out, and then specify which assemblers, linkers etc
to use as flags when we actually use the cross-gcc? - If we use the
flags when we actually run gcc, we would have more flexibility in trying
different assemblers and linkers, or have the option of not linking at
all, right? - Or would you have the same flexibility by installing it
with default directories, and then overriding the defaults if you choose
to do so when running gcc?

- does it matter what version of 'make' one uses? ie whether we use
'make' from cc or from GNU?

- I've never used binutils before. What is it all about? Does it have
any useful tools for profiling the code (analyzing it to produce a
function call graph, for example)?
-----------------------------

On a related note, I notice that GCC has tools to make it compatible
with certain embedded operating systems. Are there any tools for pSOS? I
couldn't find any...

Thanks,
Jay Lulla
jay.lulla@ebay.sun.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Installing cross-compiler for PowerPC 603, pSOS
  2000-01-14 13:25 ` Doug Evans
@ 2000-04-01  0:00   ` Doug Evans
  0 siblings, 0 replies; 6+ messages in thread
From: Doug Evans @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Moore, Jason; +Cc: 'JAY LULLA', crossgcc, gcc-help

Moore, Jason writes:
 > >Here are some issues I need to address:
 > >- should the cross-compiler be installed in the same dir as the native
 > >compiler, and then be called with a special flag, or should it be
 > >installed in a whole new directory altogether?
 > 
 > I believe that it has to me installed in a separate directory, but I am not
 > sure.  Everything I have read suggest that you must have 2 separate
 > compilers.  One native, and one cross.  One solution is to create a script
 > that can determine which version to use.

They _can_ be installed in the same directory (if by same directory you
mean same value for --prefix). gcc for the native host is named "gcc".
gcc for the target by default is named "${target_alias}-gcc".

 > You can install binutils in the same place as your other binutils, where
 > "ld" currently sits, but you must be sure to configure it for both your
 > target and host emulation modes, or else you'll have a linker that only does
 > one or the other.  Running the binutils "configure" with the
 > "--enable-targets='target','host'" will accomplish this.

Methinks you've got things confused a tad.
There's no need to specify --enable-targets for the task at hand.
Certainly you don't need a linker that handles both host and target.

As with gcc, non-native versions of as,ld,objdump,etc. get installed
as ${target_alias}-{ad,ld,objdump,etc.}.  e.g. if you've configured
binutils for powerpc-eabi then you'll get powerpc-eabi-ld, etc.
Note however that these versions of as,ld are not what gcc uses.
${target_alias}-ld is for the user should s/he ever want to call it
directly. A copy of the target linker is installed in (assuming prefix
specified and exec-prefix isn't) $prefix/$target_alias/bin, and this
is what gcc uses.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Installing cross-compiler for PowerPC 603, pSOS
  2000-01-14 12:50 Moore, Jason
  2000-01-14 13:25 ` Doug Evans
@ 2000-04-01  0:00 ` Moore, Jason
  1 sibling, 0 replies; 6+ messages in thread
From: Moore, Jason @ 2000-04-01  0:00 UTC (permalink / raw)
  To: 'JAY LULLA', crossgcc, gcc-help

>Hi. I would like to get some advice about cross-compiling GCC for a Sun
>Solaris host, and PowerPC target.

I am trying to install gcc as a linux to sco cross compiler.  I have asked
several of these same questions over the last few days.

>We have already installed gcc-2.95.2, with its complete source.

>Here are some issues I need to address:
>- should the cross-compiler be installed in the same dir as the native
>compiler, and then be called with a special flag, or should it be
>installed in a whole new directory altogether?

I believe that it has to me installed in a separate directory, but I am not
sure.  Everything I have read suggest that you must have 2 separate
compilers.  One native, and one cross.  One solution is to create a script
that can determine which version to use.

>- should we use flags such as 'with-as' 'with-ld' and 'with-headers' to
>specify directories for the assembler, linker, and headers, or is it
>best to leave these out, and then specify which assemblers, linkers etc
>to use as flags when we actually use the cross-gcc? - If we use the
>flags when we actually run gcc, we would have more flexibility in trying
>different assemblers and linkers, or have the option of not linking at
>all, right? - Or would you have the same flexibility by installing it
>with default directories, and then overriding the defaults if you choose
>to do so when running gcc?

I was instructed to use with-as and with-ld.  You must use with-headers and
with-lib to specify the directory which contains the headers and libraries
for the target platform.  configure copies the headers and libraries over
when it runs.

>- does it matter what version of 'make' one uses? ie whether we use
>'make' from cc or from GNU?

From the CrossGCC FAQ page.

"4.4 Can I use a non-GNU make? 

Yes. 

However, there are a few things to be wary of: 

you must build in the source tree 
testing generally isn't done with non-GNU makes, so one is more likely to
run into build problems. These problems can be fixed of course, but it may
require effort on your part."

http://www.objsw.com/CrossGCC/ might be helpful

>- I've never used binutils before. What is it all about? Does it have
>any useful tools for profiling the code (analyzing it to produce a
>function call graph, for example)?
>-----------------------------

Binutils contains your linker, assembler and other tools needed to get the
compiler running.  All I know for sure is that you must configure and
install binutils for your target platform for the compiler to fully install.
I have a problem where "make all" for gcc can't find my ld.  I don't know
about code profiling.

You can install binutils in the same place as your other binutils, where
"ld" currently sits, but you must be sure to configure it for both your
target and host emulation modes, or else you'll have a linker that only does
one or the other.  Running the binutils "configure" with the
"--enable-targets='target','host'" will accomplish this.

>On a related note, I notice that GCC has tools to make it compatible
>with certain embedded operating systems. Are there any tools for pSOS? I
>couldn't find any...
>
>Thanks,
>Jay Lulla
>jay.lulla@ebay.sun.com

Don't know, but if you find out, could you let me know?

One other thing that might save you some time.  You need a file called
"libgcc1.a" for your target os.  The best way to get this is to:

1. Get a copy from someone who has installed gcc on your target.

2. Install gcc on your target yourself and then copy the file.

Best of luck to you!  I know it can be frustrating.  I have spent all week
getting to this point.

-Jason Moore
ja_moore@bigfoot.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Installing cross-compiler for PowerPC 603, pSOS
  2000-01-14 12:50 Moore, Jason
@ 2000-01-14 13:25 ` Doug Evans
  2000-04-01  0:00   ` Doug Evans
  2000-04-01  0:00 ` Moore, Jason
  1 sibling, 1 reply; 6+ messages in thread
From: Doug Evans @ 2000-01-14 13:25 UTC (permalink / raw)
  To: Moore, Jason; +Cc: 'JAY LULLA', crossgcc, gcc-help

Moore, Jason writes:
 > >Here are some issues I need to address:
 > >- should the cross-compiler be installed in the same dir as the native
 > >compiler, and then be called with a special flag, or should it be
 > >installed in a whole new directory altogether?
 > 
 > I believe that it has to me installed in a separate directory, but I am not
 > sure.  Everything I have read suggest that you must have 2 separate
 > compilers.  One native, and one cross.  One solution is to create a script
 > that can determine which version to use.

They _can_ be installed in the same directory (if by same directory you
mean same value for --prefix). gcc for the native host is named "gcc".
gcc for the target by default is named "${target_alias}-gcc".

 > You can install binutils in the same place as your other binutils, where
 > "ld" currently sits, but you must be sure to configure it for both your
 > target and host emulation modes, or else you'll have a linker that only does
 > one or the other.  Running the binutils "configure" with the
 > "--enable-targets='target','host'" will accomplish this.

Methinks you've got things confused a tad.
There's no need to specify --enable-targets for the task at hand.
Certainly you don't need a linker that handles both host and target.

As with gcc, non-native versions of as,ld,objdump,etc. get installed
as ${target_alias}-{ad,ld,objdump,etc.}.  e.g. if you've configured
binutils for powerpc-eabi then you'll get powerpc-eabi-ld, etc.
Note however that these versions of as,ld are not what gcc uses.
${target_alias}-ld is for the user should s/he ever want to call it
directly. A copy of the target linker is installed in (assuming prefix
specified and exec-prefix isn't) $prefix/$target_alias/bin, and this
is what gcc uses.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Installing cross-compiler for PowerPC 603, pSOS
@ 2000-01-14 12:50 Moore, Jason
  2000-01-14 13:25 ` Doug Evans
  2000-04-01  0:00 ` Moore, Jason
  0 siblings, 2 replies; 6+ messages in thread
From: Moore, Jason @ 2000-01-14 12:50 UTC (permalink / raw)
  To: 'JAY LULLA', crossgcc, gcc-help

>Hi. I would like to get some advice about cross-compiling GCC for a Sun
>Solaris host, and PowerPC target.

I am trying to install gcc as a linux to sco cross compiler.  I have asked
several of these same questions over the last few days.

>We have already installed gcc-2.95.2, with its complete source.

>Here are some issues I need to address:
>- should the cross-compiler be installed in the same dir as the native
>compiler, and then be called with a special flag, or should it be
>installed in a whole new directory altogether?

I believe that it has to me installed in a separate directory, but I am not
sure.  Everything I have read suggest that you must have 2 separate
compilers.  One native, and one cross.  One solution is to create a script
that can determine which version to use.

>- should we use flags such as 'with-as' 'with-ld' and 'with-headers' to
>specify directories for the assembler, linker, and headers, or is it
>best to leave these out, and then specify which assemblers, linkers etc
>to use as flags when we actually use the cross-gcc? - If we use the
>flags when we actually run gcc, we would have more flexibility in trying
>different assemblers and linkers, or have the option of not linking at
>all, right? - Or would you have the same flexibility by installing it
>with default directories, and then overriding the defaults if you choose
>to do so when running gcc?

I was instructed to use with-as and with-ld.  You must use with-headers and
with-lib to specify the directory which contains the headers and libraries
for the target platform.  configure copies the headers and libraries over
when it runs.

>- does it matter what version of 'make' one uses? ie whether we use
>'make' from cc or from GNU?

From the CrossGCC FAQ page.

"4.4 Can I use a non-GNU make? 

Yes. 

However, there are a few things to be wary of: 

you must build in the source tree 
testing generally isn't done with non-GNU makes, so one is more likely to
run into build problems. These problems can be fixed of course, but it may
require effort on your part."

http://www.objsw.com/CrossGCC/ might be helpful

>- I've never used binutils before. What is it all about? Does it have
>any useful tools for profiling the code (analyzing it to produce a
>function call graph, for example)?
>-----------------------------

Binutils contains your linker, assembler and other tools needed to get the
compiler running.  All I know for sure is that you must configure and
install binutils for your target platform for the compiler to fully install.
I have a problem where "make all" for gcc can't find my ld.  I don't know
about code profiling.

You can install binutils in the same place as your other binutils, where
"ld" currently sits, but you must be sure to configure it for both your
target and host emulation modes, or else you'll have a linker that only does
one or the other.  Running the binutils "configure" with the
"--enable-targets='target','host'" will accomplish this.

>On a related note, I notice that GCC has tools to make it compatible
>with certain embedded operating systems. Are there any tools for pSOS? I
>couldn't find any...
>
>Thanks,
>Jay Lulla
>jay.lulla@ebay.sun.com

Don't know, but if you find out, could you let me know?

One other thing that might save you some time.  You need a file called
"libgcc1.a" for your target os.  The best way to get this is to:

1. Get a copy from someone who has installed gcc on your target.

2. Install gcc on your target yourself and then copy the file.

Best of luck to you!  I know it can be frustrating.  I have spent all week
getting to this point.

-Jason Moore
ja_moore@bigfoot.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-14 11:35 Installing cross-compiler for PowerPC 603, pSOS JAY LULLA
2000-04-01  0:00 ` JAY LULLA
2000-01-14 12:50 Moore, Jason
2000-01-14 13:25 ` Doug Evans
2000-04-01  0:00   ` Doug Evans
2000-04-01  0:00 ` Moore, Jason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).